root / plugins / ossec / ossec-agents @ ef960abc
Historique | Voir | Annoter | Télécharger (666 octets)
| 1 |
#!/bin/bash |
|---|---|
| 2 |
|
| 3 |
if [ "$1" = "autoconf" ]; then |
| 4 |
echo "yes" |
| 5 |
exit 0 |
| 6 |
fi |
| 7 |
|
| 8 |
if [ "$1" = "config" ]; then |
| 9 |
echo "graph_title Ossec Agents Status" |
| 10 |
echo "graph_args --base 1000 -l 0" |
| 11 |
echo "graph_vlabel Number of Ossec Agents" |
| 12 |
echo "graph_category Ossec" |
| 13 |
echo "graph_scale no" |
| 14 |
echo "active.label ACTIVE" |
| 15 |
echo "active.draw LINE2" |
| 16 |
echo 'active.min 0' |
| 17 |
echo "inactive.label INACTIVE" |
| 18 |
echo "inactive.draw LINE2" |
| 19 |
echo 'inactive.min 0' |
| 20 |
exit 0 |
| 21 |
fi |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
ACTIVE=`/var/ossec/bin/list_agents -c | grep -wv "** No agent available" | wc -l` |
| 27 |
INACTIVE=`/var/ossec/bin/list_agents -n | grep -wv "** No agent available" | wc -l` |
| 28 |
|
| 29 |
echo "active.value ${ACTIVE}"
|
| 30 |
echo "inactive.value ${INACTIVE}"
|
| 31 |
exit 0 |
