Monitoring Windows Server 2008 Logs
Posted: Wed May 16, 2012 10:00 am
I'm trying to monitor Windows event logs but have trouble with logs that have spaces in them. On my server, I'm running
./check_nrpe -H x.x.x.x -p 5666 ds_check
My ds_check on the server side is below. There is one log entry on 5/10/2012 with this event ID, so it should be grabbing:
ds_check=CheckEventLog file="directory service" MaxWarn=0 MaxCrit=1 "filter.eventID==2087 filter=in" truncate=1024 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
I ran this ds_check as a simple test to see if the alias worked because I had basically followed the syntax of this, which is working no problem:
eventid137=CheckEventLog file=system MaxWarn=0 MaxCrit=1 "filter.eventID==137 filter=in" truncate=1024 unique descriptions "syntax=%severity%: %source%: %id%: %message% (%count%)"
Regarding the Directory Service log, I've tried:
"file=directory service"
file="directory service"
file=directory\service
file=directory/service
"file=directory\service"
file="directory\service"
file="directory/service"
file="directory/service"
and basically any variation of quotes and back/forward slashes. Can Event logs that have spaces in the names be monitored? I've also tried entering the direct full file path to the Event log with no avail.
./check_nrpe -H x.x.x.x -p 5666 ds_check
My ds_check on the server side is below. There is one log entry on 5/10/2012 with this event ID, so it should be grabbing:
ds_check=CheckEventLog file="directory service" MaxWarn=0 MaxCrit=1 "filter.eventID==2087 filter=in" truncate=1024 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
I ran this ds_check as a simple test to see if the alias worked because I had basically followed the syntax of this, which is working no problem:
eventid137=CheckEventLog file=system MaxWarn=0 MaxCrit=1 "filter.eventID==137 filter=in" truncate=1024 unique descriptions "syntax=%severity%: %source%: %id%: %message% (%count%)"
Regarding the Directory Service log, I've tried:
"file=directory service"
file="directory service"
file=directory\service
file=directory/service
"file=directory\service"
file="directory\service"
file="directory/service"
file="directory/service"
and basically any variation of quotes and back/forward slashes. Can Event logs that have spaces in the names be monitored? I've also tried entering the direct full file path to the Event log with no avail.