check_logfiles using NRDP to send individual alerts
Posted: Thu Apr 07, 2016 4:50 am
Dear forum,
I am using check_logfiles to monitor event id in windows servers. I get output for 10 errors, in a single msg like below,
CRITICAL - (7 errors, 1 warnings in eventid - server4.protocol-2016-04-07-10-13-44) - 2016-04-07T10:10:20 8128 Using 'xplog70.dll' version '2009.100.6000' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required. ...|winupdate_lines=7 winupdate_warnings=1 winupdate_criticals=7 winupdate_unknowns=0
I would need to individual alerts instead single alert for multiple event ids. For this I tried with nrdp, looks like it is not working. Could someone help with this.
Config file:
Also could you let me know how to enable trace logs for check_logfiles. In Linux I used -d option and it worked, I tried the same here it is not creating any logs.
Thanks
I am using check_logfiles to monitor event id in windows servers. I get output for 10 errors, in a single msg like below,
CRITICAL - (7 errors, 1 warnings in eventid - server4.protocol-2016-04-07-10-13-44) - 2016-04-07T10:10:20 8128 Using 'xplog70.dll' version '2009.100.6000' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required. ...|winupdate_lines=7 winupdate_warnings=1 winupdate_criticals=7 winupdate_unknowns=0
I would need to individual alerts instead single alert for multiple event ids. For this I tried with nrdp, looks like it is not working. Could someone help with this.
Config file:
Code: Select all
$seekfilesdir = 'C:\\Program Files\\NSClient++\\log';
# where the state information will be saved.
$protocolsdir = 'C:\\Program Files\\NSClient++\\log';
# where protocols with found patterns will be stored.
$scriptpath = 'C:\\Program Files\\NSClient++\\scripts';
# where scripts will be searched for.
$MACROS = {
CL_HOSTNAME => 'hostname',
CL_NSCA_HOST_ADDRESS => 'nagios',
CL_SERVICEDESC => 'WIN_EventID_Monitoring_Passive',
CL_NSCA_PORT => 5667,
CL_NSCA_TO_SEC => 60
};
@searches = ({
tag => 'winupdate',
type => 'eventlog',
options => 'eventlogformat="%w src:%s id:%i %m",nosavethresholdcount',
eventlog => {
eventlog => 'application',
include => {
eventid => '19019,17152,17664,8128,33090,17137,17573',
},
},
criticalpatterns => '.*',
options => 'script',
script => 'ps_nrdp.ps1',
scriptparams => '-url http://nagios/nrdp/ -token xxxxxxxxx -host $CL_HOSTNAME$ -service $CL_SERVICEDESC$ -state $CL_SERVICESTATEID$ -output "$CL_SERVICEOUTPUT$"',
});Thanks