2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/ossec/ossec-agents

32 lines
666 B
Plaintext
Raw Normal View History

2011-06-14 14:10:35 +02:00
#!/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
ACTIVE=`/var/ossec/bin/list_agents -c | grep -wv "** No agent available" | wc -l`
INACTIVE=`/var/ossec/bin/list_agents -n | grep -wv "** No agent available" | wc -l`
echo "active.value ${ACTIVE}"
echo "inactive.value ${INACTIVE}"
exit 0