Email notification Wierdness


#1

I am working on getting our Nagios 1.2 app migrated to a new server, and upgraded to 2.9 on Fedora Core 6. I have it mostly working. I was testing the email notifications, and they come through, but this is what is in the body of the email (BTW, it is using the latest sendmail, 8.13-8.2):

[blockquote]Service ALERT

Notification Type: RECOVERY

Service: Root Disk Usage
Host: MySQL1 1.10
Address: mysql1
State: OK

Date/Time: $DATETIME$

Additional Info:

$OUTPUT$
[/blockquote]

Where would I look to fix the $DATETIME$ and $OUTPUT$ to show up correctly?

Thanks for your help!


#2

The notify commands are defined in commands.cfg.Use $LONGDATETIME$ or $SHORTDATETIME$ and you need to add either $HOSTOUTPUT$ or $SERVICEOUTPUT$. I think those are the changes to make it work with 2.9. Hope that helps.


#3

Justin, thanks for the info. I actually found that yesterday from another resource I can’t remember now. I found all the information in the 2.X documentation, I just didn’t know where to find it. It was in the "Using Macros in Commands " section. Thanks for your help!


#4

Justin/Ray,

I also have a problem similar to this. Well in fact I had the same issues with the $DATETIME$ and $OUTPUT$. Which both work perfectly, but I am also missing the $SERVICESTATE$ in the subject in emails about my service states.

Any thoughts?

Sean


#5

Courtauld, not sure why $SERVICESTATE$ isn’t working for you. It is listed in the documentation for 2.x. What version are you using? And it is typed correctly in the commands.cfg file?