Page 2 of 2

Re: NagiosXI service alert not showing Host Alias

Posted: Mon Aug 01, 2011 9:49 am
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.

Re: NagiosXI service alert not showing Host Alias

Posted: Wed Aug 03, 2011 8:38 am
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

Re: NagiosXI service alert not showing Host Alias

Posted: Wed Aug 03, 2011 10:02 am
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

Re: NagiosXI service alert not showing Host Alias

Posted: Wed Aug 03, 2011 10:07 am
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.