mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Update plugin
This commit is contained in:
parent
7f3c3007a5
commit
1ded68fc87
1 changed files with 9 additions and 7 deletions
|
@ -7,6 +7,10 @@
|
||||||
|
|
||||||
chilli_sessions_ - Wildcard-plugin to monitor sessions state on Coova Chilli.
|
chilli_sessions_ - Wildcard-plugin to monitor sessions state on Coova Chilli.
|
||||||
|
|
||||||
|
=head DESCRIPTION
|
||||||
|
|
||||||
|
This wildcard plugin is for monitor the number of device with state pass/dnat/none on Coova Chilli instances.
|
||||||
|
|
||||||
=head1 CONFIGURATION
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
This plugin does not normally require configuration.
|
This plugin does not normally require configuration.
|
||||||
|
@ -71,9 +75,7 @@ case "$1" in
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
suggest)
|
suggest)
|
||||||
INSTANCES_LIST=$(ls /var/run/chilli_*.sock)
|
find "$CHILLI_PATH_SOCK/" -name "chilli_*.sock" | while read file; do
|
||||||
|
|
||||||
for file in $INSTANCES_LIST; do
|
|
||||||
basename "$file" .sock | cut -d _ -f 2
|
basename "$file" .sock | cut -d _ -f 2
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -107,9 +109,9 @@ if [ "$INSTANCE" = "total" ]; then
|
||||||
STATE_DNAT=$("$CHILLI_PATH_BIN" list | grep -wc "dnat")
|
STATE_DNAT=$("$CHILLI_PATH_BIN" list | grep -wc "dnat")
|
||||||
STATE_NONE=$("$CHILLI_PATH_BIN" list | grep -wc "none")
|
STATE_NONE=$("$CHILLI_PATH_BIN" list | grep -wc "none")
|
||||||
else
|
else
|
||||||
STATE_PASS=$("$CHILLI_PATH_BIN" -s $CHILLI_PATH_SOCK/chilli_"$INSTANCE".sock list | grep -wc "pass")
|
STATE_PASS=$("$CHILLI_PATH_BIN" -s "$CHILLI_PATH_SOCK/chilli_$INSTANCE.sock" list | grep -wc "pass")
|
||||||
STATE_DNAT=$("$CHILLI_PATH_BIN" -s $CHILLI_PATH_SOCK/chilli_"$INSTANCE".sock list | grep -wc "dnat")
|
STATE_DNAT=$("$CHILLI_PATH_BIN" -s "$CHILLI_PATH_SOCK/chilli_$INSTANCE.sock" list | grep -wc "dnat")
|
||||||
STATE_NONE=$("$CHILLI_PATH_BIN" -s $CHILLI_PATH_SOCK/chilli_"$INSTANCE".sock list | grep -wc "none")
|
STATE_NONE=$("$CHILLI_PATH_BIN" -s "$CHILLI_PATH_SOCK/chilli_$INSTANCE.sock" list | grep -wc "none")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "pass.value $STATE_PASS"
|
echo "pass.value $STATE_PASS"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue