[Bug 1234376] Re: HOSTALIAS doesn't update after changing config files

Evan Broder evan at ebroder.net
Tue Dec 9 03:31:25 UTC 2014


** Description changed:

- Description:	Ubuntu 12.04.2 LTS
- Release:	12.04
+ [Impact]
+ Under nagios 3.2.3 with state retention enabled, any host aliases or display names assigned to a host would be persisted into the retention file, and would supersede subsequent configuration changes. As a result, changes to either hosts' aliases or display names would not be reflected in either the nagios CGI interface or notification macros (like HOSTALIAS)
  
- nagios3:
-   Installed: 3.2.3-3ubuntu1
-   Candidate: 3.2.3-3ubuntu1
+ There are numerous references to this bug online, including several upstream nagios issues:
+ http://tracker.nagios.org/view.php?id=238
+ http://tracker.nagios.org/view.php?id=272
  
- The problem is described here http://tracker.nagios.org/view.php?id=238
+ And several blog posts:
+ http://ten-fingers-and-a-brain.com/2011/10/nagios-doesnt-update-the-host-alias-macro-%E2%80%93-workaround/
+ http://www.claudiokuenzler.com/blog/179/nagios-notifications-contain-wrong-host-alias-name#.VIZph-pGjUY
  
- The solution that worked for me is here
- http://www.claudiokuenzler.com/blog/179/nagios-notifications-contain-
- wrong-host-alias-name but instead of fully deleting
- /var/lib/nagios3/retention.dat I stopped the nagios service update the
- alias and restarted it.
+ [Test Case]
+ Although the bug is in nagios3-core, it's easiest to observe using nagios3-cgi:
+ 
+ 1. Install nagios3-cgi
+ 2. Edit /etc/nagios3/cgi.cfg and set use_authentication=0
+ 3. Edit /etc/apache2/conf.d/nagios3.conf and remove the AuthName, AuthType, AuthUserFile, and require lines
+ 4. Restart apache2 to pick up the new config
+ 5. Open http://localhost/cgi-bin/nagios3/extinfo.cgi?type=1&host=localhost
+ 6. Observe that the host is described as "Host localhost (localhost)" - "localhost" is both the host name and the alias
+ 7. Edit /etc/nagios3/conf.d/localhost_nagios2.cfg and change alias to "otherhost" (line 10 or so)
+ 8. Restart nagios3 to pick up the new config
+ 9. Open http://localhost/cgi-bin/nagios3/extinfo.cgi?type=1&host=localhost again
+ 
+ Buggy behavior: host is still described as "Host localhost (localhost)"
+ Fixed behavior: host description is updated to "Host otherhost (localhost)" to reflect alias change
+ 
+ [Regression Potential]
+ It's difficult to understand what the upstream intent was when this bug was introduced to know if it's addressing a broader issue - both the introduction and resolution of the issue lack useful commentary in the commit messages.
+ 
+ However, this patch is definitely a behavior change: previously changes
+ to the disk configuration would not be reflected in the nagios runtime
+ configuration without manual intervention. It's possible there are use
+ cases which rely on this behavior. However, it seems unlikely to me that
+ a user would change a configuration file and restart the daemon and not
+ intend for those changes to take effect
+ 
+ This issue has proven to be frustrating to our usage of nagios in
+ production, and my belief is that fixing it would create less net
+ confusion than leaving it. However, maybe that's not enough to satisfy
+ the SRU bar.
+ 
+ Outside of that change, the patch is very narrow and regression
+ potential seems low.

** Patch added: "nagios3_3.2.3-3ubuntu1.1.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/nagios3/+bug/1234376/+attachment/4276679/+files/nagios3_3.2.3-3ubuntu1.1.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to nagios3 in Ubuntu.
https://bugs.launchpad.net/bugs/1234376

Title:
  HOSTALIAS doesn't update after changing config files

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nagios3/+bug/1234376/+subscriptions



More information about the Ubuntu-server-bugs mailing list