Jump to content

Main Page//Nagios script/ClamAv status

From TetraWiki

ClamAv Process status In Nagios

If default Pluging doesn't work properly and if you were not able to find the exact reason behind that or the server is critical to have any experiment

You can simply make your own script, like below

 #!/bin/bash
 STATE_OK=0
 STATE_WARNING=1
 STATE_CRITICAL=2
 STATE_UNKNOWN=3
 STATE_DEPENDENT=4
 CLAMD=`ps -ef | grep clamd| grep -v grep| wc -l`
 case "${CLAMD}" in
       0)  echo "CLAMD is not running"; exit ${STATE_CRITICAL}
       ;;
       1)  echo "CLAMD OK - CLAMD is running"; exit ${STATE_OK}
       ;;
        *)  echo "CLAMD is running "; exit ${STATE_OK}
        ;;
 esac

The above is done for JbIndia on clamav process I have made may more scripts you can view them in Miraexim Like sldap services and many more.