Upgraded from 3.2.1 to 3.5 - macros broke?

Jason Gauthier jgauthier at lastar.com
Wed Sep 4 19:11:32 CEST 2013


To follow up on my own email. It looks like this is not just the upgrade. I moved my 3.2.1 binary back in, and it still happens.

And I've found that it's not limited to the notification commands:

[1378314473] SERVICE ALERT: Server86;Server86 - Ping;UNKNOWN;SOFT;1;check_ping: Invalid hostname/address - 19216874204
[1378314493] SERVICE ALERT: Server86;Server86 - SAP;CRITICAL;SOFT;1;TCP CRITICAL - Invalid hostname, address or socket: 19216874204
[1378314503] HOST ALERT: Server86;DOWN;SOFT;1;check_ping: Invalid hostname/address - 19216874204
[1378314533] SERVICE ALERT: Server86;Server86 - Ping;UNKNOWN;HARD;2;check_ping: Invalid hostname/address - 19216874204
[1378314543] HOST ALERT: Server86;DOWN;SOFT;2;check_ping: Invalid hostname/address - 19216874204
[1378314553] SERVICE ALERT: Server86;Server86 - SAP;CRITICAL;HARD;2;TCP CRITICAL - Invalid hostname, address or socket: 19216874204
[1378314553] SERVICE ALERT: Server86;Server86 - Load;WARNING;HARD;10;85% CPU load.
[1378314563] HOST ALERT: Server86;DOWN;SOFT;3;check_ping: Invalid hostname/address - 19216874204
[1378314573] HOST ALERT: Server86;DOWN;SOFT;4;check_ping: Invalid hostname/address - 19216874204

(the periods are removed from the IPs)
I really have no idea what caused this, but I am reviewing my config and changes I made while testing splunk, and opsgenie integration.


From: Jason Gauthier
Sent: Wednesday, September 04, 2013 10:28 AM
To: 'nagios-users at lists.sourceforge.net'
Subject: Upgraded from 3.2.1 to 3.5 - macros broke?

Greetings,

It seems during a recent upgrade, my notifications broke!  Well, I did digging and found notification themselves are working, but the macro variables are completely botched.

I took "notify-by-email", and changed it to this:
/usr/bin/printf "\"%b\" \"Notification Type: $NOTIFICATIONTYPE$ ($SERVICEACKAUTHOR$)\n\nService: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\nComment: $SERVICEACKCOMMENT$\" | /bin/mail -s \"** $NOTIFICATIONTYPE$ alert - $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$ **\" $CONTACTEMAIL$" >> /tmp/nagiosnotify.log

So, it will write the contents to a file instead of just directly piped to mail.  Here is what I see:

"Notification Type: RECOVERY ($)

Service: $
Host: v-ww7b2
Address: 19216876178
State: $

Date/Time: W Sp 4 10:18:11 EDT 2013

Additional Info:

$

Comment: $" | /bin/mail -s "** RECOVERY alert - v-ww7b2/$ is $ **" bv


It seems like all of the variable are wrong. For instance, the host is v-windows7lab2.
The email address starts with "bv", but it ends with a whole lot more!

I'm not sure what would be causing this, and would appreciate any input.

Thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20130904/09c3d402/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list