summaryrefslogtreecommitdiffstats
path: root/roles/ands_monitor/templates/scripts/check_server_status.sh.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ands_monitor/templates/scripts/check_server_status.sh.j2')
-rwxr-xr-xroles/ands_monitor/templates/scripts/check_server_status.sh.j211
1 files changed, 11 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 caa63ce..b02f031 100755
--- a/roles/ands_monitor/templates/scripts/check_server_status.sh.j2
+++ b/roles/ands_monitor/templates/scripts/check_server_status.sh.j2
@@ -32,3 +32,14 @@ if [ -z "$disks" -o "$disks" -ne 0 ]; then
echo "Not all disks are online:"
/opt/MegaRAID/storcli/storcli64 /c0 show | grep -P "(HDD|SSD)" | grep -v "Onln"
fi
+
+ifaces=$(ovs-vsctl show | grep -oP "could not open network device\s*\Kveth[a-f0-9]+" | wc -l)
+if [ "$ifaces" -gt 50 ]; then
+ echo "Too many rogue interfaces ($ifaces) is registered on OpenVSwitch bridge. It could introduce large delays in pod scheduling..."
+fi
+
+#Check various known problems
+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