Re: Command to check Windows logs
Posted: Mon Oct 26, 2015 10:53 pm
Hope the file provides enough details.
Thanks.
Thanks.
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
filter = level IN (error) AND (id IN (3006,3007)Code: Select all
filter = level IN (error) AND (id IN (3006,3007))Code: Select all
[/settings/eventlog/real-time/filters/RAID_Windows_Event]
log= application
filter=level =1
id= 3006,3007
severity= CRITICAL
ok message= Found no RAID related eventlogs last three days.
target= NSCA
maximum age= 3dCode: Select all
$evt=new-object System.Diagnostics.Eventlog("Application")
$evt.Source="Culham.net"
$evtNumber=3006
$evtDescription="This is a test event"
$infoevent=[System.Diagnostics.EventLogEntryType]::Error
$evt.WriteEntry($evtDescription,$infoevent,$evtNumber)
$infoevent=[System.Diagnostics.EventLogEntryType]::Error
$evt.WriteEntry($evtDescription,$infoevent,$evtNumber)Code: Select all
n1= NSCAClient
[/settings/NSCA/n1]
channel = NSCA1
[/settings/NSCA/n1/targets/default]
host=X.X.X.X
encryption=none
password=mypassword
A set of options to configure the real time checks
[/settings/eventlog/real-time]
; DEBUG - Log missed records (usefull to detect issues with filters) not usefull in production as it is a bit of a resource hog.
debug = 0
; REAL TIME CHECKING - Spawns a backgrounnd thread which detects issues and reports them back instantly.
enabled = true
; LOGS TO CHECK - Comma separated list of logs to check
log = application,system
; STARTUP AGE - The initial age to scan when starting NSClient++
startup age = 20m
; A set of filters to use in real-time mode
[/settings/eventlog/real-time/filters]
[/settings/eventlog/real-time/filters/default]
; DESTINATION - The destination for intercepted messages
;destination=NSCA
; MAXIMUM AGE - How long before reporting "ok" (if this is set to off no ok will be reported only errors)
;maximum age= 20m
; OK MESSAGE - This is the message sent periodically whenever no error is discovered.
ok message= eventlog found no records test default
; SYNTAX - Format string for dates
syntax=%type% %id% %source%: %message%
[/settings/eventlog/real-time/filters/Log_win_app_warning]
log= application
filter=level= 2 AND (id NOT IN (4,5))
severity= warning
ok message= Autoreset, found no records in application eventlog
target=NSCA1
maximum age= 20m