Page 1 of 1

Format error in e-mail notification

Posted: Fri Oct 16, 2015 4:08 pm
by rclav
Hello,

I'm running NSCLient++ 0.4.3.143 on a Windows Server 2008 operating system (let's call it HOST1). Every time I receive an e-mail notification about that particular server, the date format in the Additional Info field seems to be wrongly parsed. Furthermore, an unexpected (%count%) word appears somewhere within the message.

This only happens in notifications of that particular server. I have another Windows Server 2008 host (HOST2) being monitored by the same Nagios instance, and notifications from that server seem to be OK. I think it may be related to the NSClient++ version I'm using on HOST1 (the second server is running a slightly older version).

What could be happening? Is there a way to solve this problem without installing an older version of NSClient++?

Example:

***** Nagios *****

Notification Type: PROBLEM

Service: Log <ServerName>
Host: <ServerName>
Address: <ServerIP>
State: WARNING

Date/Time: Fri Oct 16 15:49:12 CLT 2015

Additional Info:

error: 2w 2d 17:23, Microsoft-Windows-TerminalServices-RemoteConnectionManager: Autoreconnect failed to reconnect user to session because authentication failed. (Access is denied. ) (%count%)


Best regards,

rclav

Re: Format error in e-mail notification

Posted: Mon Oct 19, 2015 2:54 pm
by tmcdonald
To get some clarification, what is wrong with the date? CLT appears to be Chile Standard Time: http://www.timeanddate.com/time/zones/clt

And for the %count% variable (not macro, big difference), how are you referencing that in your notification command?

Re: Format error in e-mail notification

Posted: Mon Oct 19, 2015 9:24 pm
by Box293
I believe the count business is related to NSClient++.

Is this an active check or a passive check?

When the service is in this state, can you please send a screenshot of the service so we can see the output.

Also, can you provide any information that is logged in /usr/local/nagios/var/nagios.log in relation to this service.

Re: Format error in e-mail notification

Posted: Mon Oct 26, 2015 5:25 pm
by rclav
Thanks for your answers.
tmcdonald wrote:To get some clarification, what is wrong with the date? CLT appears to be Chile Standard Time: http://www.timeanddate.com/time/zones/clt

And for the %count% variable (not macro, big difference), how are you referencing that in your notification command?
The line that is displaying a wrongly formatted date is error: 2w 2d 17:23 in the Additional Info field. This doesn't happen when I receive a notification from the other host (which is being monitored by the same nagios daemon, running in another server [a third one]). Where can I see the notification commands? (I didn't configure the nagios monitor myself, just installed and configured NSClient++ in one of the hosts).
Box293 wrote:I believe the count business is related to NSClient++.

Is this an active check or a passive check?

When the service is in this state, can you please send a screenshot of the service so we can see the output.

Also, can you provide any information that is logged in /usr/local/nagios/var/nagios.log in relation to this service.
The notification I've mentioned corresponds to a passive check. I've looked at the log files and they only provide information about the active checks. I think my problem is related to the NSClient++ version I'm using.

Thanks for any help you can provide.

Re: Format error in e-mail notification

Posted: Tue Oct 27, 2015 10:43 am
by tgriep
The Notification commands are defined in the commands.cfg file and if Nagios was installed to the default folders, it can be found here.

Code: Select all

/usr/local/nagios/etc/commands.cfg
If you want to log passive checks, you can edit the nagios.cfg file and change the following from

Code: Select all

log_passive_checks=0
to

Code: Select all

log_passive_checks=1
Save it out and restart the nagios process. That may help you in debugging this issue.