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
}


Copyright 2021. All rights reserved.

Posted 22 January 2017 by admin in category "simple memo

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.