Jump to content

Main Page//Nagios script/ClamAv status: Difference between revisions

From TetraWiki
No edit summary
 
Line 1: Line 1:
[[category:Nagios]]


== ClamAv Process status In Nagios ==
== ClamAv Process status In Nagios ==

Latest revision as of 07:47, 24 October 2013


ClamAv Process status In Nagios[edit]

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.