NagiosXI service alert not showing Host Alias

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

NagiosXI service alert not showing Host Alias

Post by BanditBBS »

When I first installed XI I emailed support with a problem of the notification messages not showing the host_alias. even if the proper variable was in the notification message it would always show the host name instead which isn't enough information. After trouble-shooting the issue, it was a bug in the version I was running of XI and it was resolved by upgrading XI and running a quick sql command to correct the database.

This host notifications and still working great. However, I just realized the service notifications are not working properly. The host_alias is not being displayed which shows a much better description of the host.

Here is the configured service alert message.

Code: Select all

***** Nagios XI Alert *****

Notification Type: %type%

Service: %service%
Host: %host%
Host Description: %hostalias%
Address: %hostaddress%
State: %servicestate%
Info:
%serviceoutput%
Date/Time: %datetime%

Nagios URL: %xiserverurl%
As you can see, %hostalias% is in the message but it is sending the %host% field data instead and I'm seeing %host% twice since it is configured to send that the line above the alias.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI service alert not showing Host Alias

Post by lmiltchev »

It seems like it could be a bug in the event handler - we will be looking into it.
We will update you as soon as we find out what the problem is.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: NagiosXI service alert not showing Host Alias

Post by BanditBBS »

It's weird, some of my hosts are showing the ALIAS in the service alerts now, while some still are not.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: NagiosXI service alert not showing Host Alias

Post by mguthrie »

What version of XI are you using?
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: NagiosXI service alert not showing Host Alias

Post by BanditBBS »

Upgraded to 1.6 the other day. Running the VM image.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: NagiosXI service alert not showing Host Alias

Post by mguthrie »

We did have a bug in earlier versions that would prevent the host alias from updating correctly if it was changed in the Core Config Manager. Have any of these aliases been updated recently?
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: NagiosXI service alert not showing Host Alias

Post by BanditBBS »

No, not that I can think of. Should I go in and modify some of the ones not working and see if they start working?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: NagiosXI service alert not showing Host Alias

Post by BanditBBS »

After testing a little more. The same ones not sending the alias on a service alert are also not sending the alias in a host alert. So the alias may not be getting saved properly.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: NagiosXI service alert not showing Host Alias

Post by mguthrie »

It's probably getting saved ok, but just not updated in ndoutils. Can you run:

Code: Select all

service ndo2db restart
service nagios restart

Then can you run:

Code: Select all

mysql -u root -p'nagiosxi' nagios
SELECT host_id,host_object_id,instance_id,alias FROM nagios_hosts WHERE alias='<yourAlias>';
And see what you get for results.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: NagiosXI service alert not showing Host Alias

Post by BanditBBS »

mguthrie wrote:

Code: Select all

mysql -u root -p'nagiosxi' nagios
SELECT host_id,host_object_id,instance_id,alias FROM nagios_hosts WHERE alias='<yourAlias>';
And see what you get for results.
Ok, I ran the commands and the alias field for some of the hosts is populated with the host and not what is entered in the alias in XI. In XI the host HVACSSOH06 has a description of 'HVAC SS 80 Mezzenine' but doing :

Code: Select all

SELECT host_id,host_object_id,instance_id,alias FROM nagios_hosts WHERE alias='HVAC SS 80 Mezzenine';
returns 0 rows and doing:

Code: Select all

SELECT host_id,host_object_id,instance_id,alias FROM nagios_hosts WHERE alias='HVACSSOH06';
returns 1 row.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked