Page 1 of 1

CheckEventLog Genrated Time displayed Wrongly

Posted: Wed Mar 01, 2017 11:49 am
by dhineshkumar
Hi.,

I am trying Event ID monitoring through NSclient CheckEventLog, with the below ouptut syntax.

syntax=Time:%generated%, Event ID:%id%, Source=%source%, Type=%level%, Message=%message%"

But the time Format is dispalyed like Time: 2w 3d 05:26. I tried with %generated% also, it is also giving the same result.

Please suggest a option to print the date details in DD/MM/YYYY TIME format.


Thanks
Dhinesh Kumar S.

Re: CheckEventLog Genrated Time displayed Wrongly

Posted: Wed Mar 01, 2017 5:04 pm
by mcapra
Can you share which version of NSClient++ is being used on the remote machine? A lot of this answer depends on the version of NSClient++.

You may need to set a time filter for the EventLog module and configure the detail syntax in the NSClient++ configuration:
https://docs.nsclient.org/reference/win ... l%20syntax

Re: CheckEventLog Genrated Time displayed Wrongly

Posted: Thu Mar 02, 2017 7:43 am
by dhineshkumar
Hi

The nsclient version is 0.4.419.

I am running the checks through nrpe with the below command.

check_nrpe -H $HOSTADDRESS$ -p 5666 -t 60 -c CheckEventLog -a file=Application file=System file=Security debug=true MaxCrit=1 "filter=id = <event id> AND generated > -1h" unique descriptions "syntax=Time:%generated%, Event ID:%id%, Source=%source%, Type=%level%, Message=%message%

Thanks.

Re: CheckEventLog Genrated Time displayed Wrongly

Posted: Thu Mar 02, 2017 2:45 pm
by mcapra
descriptions actually appears to be deprecated as of 0.4.2:
http://docs.nsclient.org/0.4.2/referenc ... scriptions

That aside, i'm not seeing anything in the NSClient++ documentation that clearly spells out how to change the date formatting. The documentation indicates that the previous directive I mentioned is the ticket, but I can't find any example of this.