diff options
Diffstat (limited to 'roles')
-rwxr-xr-x | roles/ands_monitor/templates/scripts/check_server_status.sh.j2 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/roles/ands_monitor/templates/scripts/check_server_status.sh.j2 b/roles/ands_monitor/templates/scripts/check_server_status.sh.j2 index b02f031..0bef13c 100755 --- a/roles/ands_monitor/templates/scripts/check_server_status.sh.j2 +++ b/roles/ands_monitor/templates/scripts/check_server_status.sh.j2 @@ -43,3 +43,13 @@ vssize=$(du -sm /var/log/openvswitch/ovs-vswitchd.log | cut -f 1) if [ "$vssize" -gt 128 ]; then echo "Current OpenVSwitch log is over $vssize MB. It could indicate some severe problems in pod networking..." fi + +host google.com &> /dev/null +if [ $? -ne 0 ]; then + echo "DNS problems, can't resolve google.com" +fi + +ping -c 1 -W 2 8.8.8.8 &> /dev/null +if [ $? -ne 0 ]; then + echo "Networkign problems, can't ping Google's public DNS server" +fi |