January
22
nagios: monitor cxs_report
/usr/lib64/nagios/plugins/check_cxs_report
#!/bin/bash
#
# Plugin to check cxs report
# By Vasliy T.
##########################################################
normal=0
crit=1
use=`/scripts/cxs_report |grep -i "Fingerprint\|Virus\|Known\|hidden script"|wc -l`
if [[ "$use" -eq "$normal" ]]
then
echo "OK: Malware not Detected"
exit 0
else
echo "Critical: $use viruses found"
exit 2
fi
/etc/nagios/nrpe.cfg
command[cxs]=/usr/bin/sudo /usr/lib64/nagios/plugins/check_cxs_report
/etc/nagios/conf.d/server.cfg
define service{
use generic-service
host_name server
service_description cxs
check_command check_nrpe_1arg!cxs
}