Windows Server Application Event Monitoring
Posted: Fri Jun 12, 2015 10:44 am
I have been migrating service checks from Nagios Core where I was checking with WMI to Nagios XI where I am using the NSClient++. I have a couple checks where I am looking at the Windows event log for event codes. For example I was using thus check before -
check_wsc.pl!ntevent!1,Application,,"5666|5669",,10,c,i
# checks windows event log
# ntevent!(eventtypes, logfiles, sourcenames, eventcodes, searchstring, period,
# type of returned state if found, type of returned state if not found,options
# eventtypes - list of EventTypes (integer) to query, for exampe: "1|2" or
# just "3" (Type 1 = Critical, 2 = Warning, 3 = Informational).
# logfiles - list of LogFiles to query, for exampe: "Application|System"
# or just "Security"
# sourcenames - source to query, for example: Service Control
# Manager|eventlog
# eventcodes - event codes to query, for example: 51|7023
# searchstring - string for searching in event body
# period - period in minutes to query
# type of returned state if found - state returned if some events found
# with query, i - OK, w - Warning, c-
# Critical, default is "c"
# type of returned state if not found - state returned if no events found
# with query, "i"
# options - /W2K search for string to be done compatible with WMI for hosts
# to be checked having aWindows2000 operating system; Default.
# Windows 2003 style (using LIKE operator).
How can I run the same check with Nagios XI using the NSClient++?
check_wsc.pl!ntevent!1,Application,,"5666|5669",,10,c,i
# checks windows event log
# ntevent!(eventtypes, logfiles, sourcenames, eventcodes, searchstring, period,
# type of returned state if found, type of returned state if not found,options
# eventtypes - list of EventTypes (integer) to query, for exampe: "1|2" or
# just "3" (Type 1 = Critical, 2 = Warning, 3 = Informational).
# logfiles - list of LogFiles to query, for exampe: "Application|System"
# or just "Security"
# sourcenames - source to query, for example: Service Control
# Manager|eventlog
# eventcodes - event codes to query, for example: 51|7023
# searchstring - string for searching in event body
# period - period in minutes to query
# type of returned state if found - state returned if some events found
# with query, i - OK, w - Warning, c-
# Critical, default is "c"
# type of returned state if not found - state returned if no events found
# with query, "i"
# options - /W2K search for string to be done compatible with WMI for hosts
# to be checked having aWindows2000 operating system; Default.
# Windows 2003 style (using LIKE operator).
How can I run the same check with Nagios XI using the NSClient++?