Page 1 of 2
NagiosXI service alert not showing Host Alias
Posted: Thu Jul 14, 2011 10:12 am
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.
Re: NagiosXI service alert not showing Host Alias
Posted: Thu Jul 14, 2011 12:33 pm
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.
Re: NagiosXI service alert not showing Host Alias
Posted: Thu Jul 28, 2011 12:26 pm
by BanditBBS
It's weird, some of my hosts are showing the ALIAS in the service alerts now, while some still are not.
Re: NagiosXI service alert not showing Host Alias
Posted: Thu Jul 28, 2011 5:01 pm
by mguthrie
What version of XI are you using?
Re: NagiosXI service alert not showing Host Alias
Posted: Fri Jul 29, 2011 8:24 am
by BanditBBS
Upgraded to 1.6 the other day. Running the VM image.
Re: NagiosXI service alert not showing Host Alias
Posted: Fri Jul 29, 2011 9:50 am
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?
Re: NagiosXI service alert not showing Host Alias
Posted: Fri Jul 29, 2011 9:53 am
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?
Re: NagiosXI service alert not showing Host Alias
Posted: Fri Jul 29, 2011 10:00 am
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.
Re: NagiosXI service alert not showing Host Alias
Posted: Fri Jul 29, 2011 10:18 am
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.
Re: NagiosXI service alert not showing Host Alias
Posted: Mon Aug 01, 2011 8:15 am
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.