root / plugins / other / radwho_cnt @ 7da1b039
Historique | Voir | Annoter | Télécharger (597 octets)
| 1 | 03d23de4 | Alexey Illarionov | #!/bin/sh |
|---|---|---|---|
| 2 | # Plugin to monitor the FreeRadius active users count |
||
| 3 | # Usage: Link or copy into /etc/munin/node.d/ |
||
| 4 | # Config variables: |
||
| 5 | # radwho - radwho binary |
||
| 6 | |||
| 7 | radwho=${radwho:-/usr/local/bin/radwho}
|
||
| 8 | |||
| 9 | if [ "$1" = "config" ]; then |
||
| 10 | echo 'graph_title FreeRadius active users count' |
||
| 11 | echo 'graph_args --base 1000 -l 0' |
||
| 12 | echo 'graph_vlabel users' |
||
| 13 | echo 'graph_noscale true' |
||
| 14 | echo 'graph_category other' |
||
| 15 | echo 'usercnt.label users' |
||
| 16 | echo 'graph_info FreeRadius active users count.' |
||
| 17 | echo 'usercnt.info FreeRadius active users count' |
||
| 18 | exit 0 |
||
| 19 | fi |
||
| 20 | |||
| 21 | echo "usercnt.value $($radwho -rci 2>/dev/null | wc -l)" |
