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.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: NagiosXI service alert not showing Host Alias

Post by mguthrie »

Ok, it looks like this is the continuation of a bug that was reported earlier.
http://tracker.nagios.com/view.php?id=149

I'll update the tracker with a note for this thread.
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 »

If I go in and rename the host and save it, the alias is written properly, and then I go rename the host back, apply changes and everything is good. So it looks like I just need to modify all hosts to make sure the alias is written properly....or someone could give me the sql command to update the proper field and database :D
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
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: NagiosXI service alert not showing Host Alias

Post by nscott »

BanditBBS,

Nice work! Now about that SQL query, I can give it to you, but please, please, please, backup your database before editing it directly! I cannot stress this enough, so if something goes funny, immediately after you edit something, you can just reload it. I don't mean to imply you don't already know this, but I must say it one more time to stress the importance of it.

The SQL command for it would be (from the nagioql database)

UPDATE tbl_host SET alias=''<your alias>" WHERE host_name='<hostname>';

You will need to apply configuration after you do this. Remember to backup! :D
Nicholas Scott
Former Nagios employee
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 »

Thanks for the reply but that's not what I wanted. Also, I understand doing the backup :)

What I was asking was for the command I can use to get the alias out of NagioSQL and write it to the ndoutil database by matching the host name automatically.

I think I asked that properly this time.
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