File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "plugin" : " custom" ,
3
+ "pluginConfig" : {
4
+ "invoke_interval" : " 30s" ,
5
+ "timeout" : " 5s" ,
6
+ "max_output_length" : 80 ,
7
+ "concurrency" : 3
8
+ },
9
+ "source" : " network-custom-plugin-monitor" ,
10
+ "rules" : [
11
+ {
12
+ "type" : " temporary" ,
13
+ "reason" : " ConntrackFull" ,
14
+ "path" : " ./config/plugin/network_problem.sh" ,
15
+ "timeout" : " 3s"
16
+ }
17
+ ]
18
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # This plugin checks for common network issues. Currently, it only checks
4
+ # if the conntrack table is full.
5
+
6
+ conntrack_max=$( cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max)
7
+ conntrack_count=$( cat /proc/sys/net/ipv4/netfilter/ip_conntrack_count)
8
+ if (( conntrack_count >= conntrack_max )) ; then
9
+ echo " Conntrack table full"
10
+ exit 1
11
+ fi
12
+
13
+ echo " Conntrack table available"
14
+ exit 0
15
+
You can’t perform that action at this time.
0 commit comments