mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-23 22:26:27 +00:00
Add network monitor script as plugin
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This plugin checks for common network issues. Currently, it only checks
|
||||
# if the conntrack table is full.
|
||||
|
||||
conntrack_max=$(cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max)
|
||||
conntrack_count=$(cat /proc/sys/net/ipv4/netfilter/ip_conntrack_count)
|
||||
if (( conntrack_count >= conntrack_max )); then
|
||||
echo "Conntrack table full"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Conntrack table available"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user