Use DNS for populating hostname?


Every time we change a host’s name in our DNS server we need to update the hostname in the Nagios config files so it reflects the DNS name. Can DNS be used to populate the hostname in the Nagios config files?


I don’t think so, cause if that variable is changed in any of the .cfg files, nagios should be reloaded with altered configuration.
Maybe it could be done with some script, but i wouldn’t advise it, 'cause you could get in configuration problem if you set nagios to reload every now and then without your knowledge.

I would suggest entering ip addresses in nagios host configurations, so the DNS chagnes wouldn’t have any effect on Nagios.