Format error in e-mail notification

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rclav
Posts: 2
Joined: Fri Oct 16, 2015 3:36 pm

Format error in e-mail notification

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Format error in e-mail notification

Post 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?
Former Nagios employee
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Format error in e-mail notification

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rclav
Posts: 2
Joined: Fri Oct 16, 2015 3:36 pm

Re: Format error in e-mail notification

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Format error in e-mail notification

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked