Looking for something hard coded in a notification

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Chaffy
Posts: 2
Joined: Mon Mar 13, 2017 11:10 am

Looking for something hard coded in a notification

Post by Chaffy »

Forgive my ignorance, I'm new to the Nagios world. We have notifications setup that are sent out via sms. In these notifications there is a line of text that we can't seem to find to edit. It is in the Info: section. How can I view what the $HOSTOUTPUT contains?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Looking for something hard coded in a notification

Post by tgriep »

Here is the definition of the $HOSTOUTPUT$ macro
"The first line of text output from the last host check (i.e. "Ping OK")."

If you want to see more Nagios Macros and there definitions, take a look at this link.
https://assets.nagios.com/downloads/nag ... olist.html
If you want to change the information / macros in the Notification Emails, take a look at this guide that has examples on how to do that.
https://assets.nagios.com/downloads/nag ... iables.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Chaffy
Posts: 2
Joined: Mon Mar 13, 2017 11:10 am

Re: Looking for something hard coded in a notification

Post by Chaffy »

Thank you for the post tgriep! I found the first link in my search before posting this question. That second link is very helpful. What I'm seeing in the text notifications is Info: Server1 OK but the Server1 is not the actual box the notification is for. I assumed this got hard coded into $HOSTOUTPUT$ somehow. Where does $HOSTOUTPUT$ get it's information? I may not be asking this the right way, most likely because this is a foreign language to me. Thanks again tgriep!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Looking for something hard coded in a notification

Post by tgriep »

The $HOSTOUTPUT$ should get it's data from the MYSQL database and that data is mirrored to the status.dat file.
Maybe the MYSQL database needs to be repaired.
Login to the Nagios server as root and follow this process to repair the system.

Code: Select all

service nagios stop
killall -9 nagios
service ndo2db stop
mysqlcheck -f -r -u root -pnagiosxi --databases nagios
service ndo2db start
service nagios start
Try that and see if the notifications have the correct information.
If not, we will have to see the notification that is generated and the System Profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and post or PM it to us.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked