mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
33 lines
788 B
Plaintext
33 lines
788 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
if [ "$1" = "autoconf" ]; then
|
||
|
echo "yes"
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
if [ "$1" = "config" ]; then
|
||
|
echo "graph_title Ossec agents status"
|
||
|
echo "graph_args --base 1000 -l 0"
|
||
|
echo "graph_vlabel Number of ossec agents"
|
||
|
echo "graph_category ossec"
|
||
|
echo "graph_scale no"
|
||
|
echo "active.label active"
|
||
|
echo "active.draw LINE2"
|
||
|
echo 'active.min 0'
|
||
|
echo "inactive.label inactive"
|
||
|
echo "inactive.draw LINE2"
|
||
|
echo 'inactive.min 0'
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
### where to find the ossec tools
|
||
|
ossecdir="/var/ossec/bin"
|
||
|
|
||
|
### count the lines from the output of the list_agents tool
|
||
|
ACTIVE=`$ossecdir/list_agents -c | grep -wv "** No agent available" | wc -l`
|
||
|
INACTIVE=`$ossecdir/list_agents -n | grep -wv "** No agent available" | wc -l`
|
||
|
|
||
|
echo "active.value ${ACTIVE}"
|
||
|
echo "inactive.value ${INACTIVE}"
|
||
|
exit 0
|