Jump to content

Main Page//Nagios script/ClamAv status

From TetraWiki
Revision as of 16:04, 11 September 2013 by Amit (talk | contribs) (Created page with " == 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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 servises and many more.