[Bug 1234376] [NEW] HOSTALIAS doesn't update after changing config files
Launchpad Bug Tracker
1234376 at bugs.launchpad.net
Tue Dec 9 03:39:46 UTC 2014
You have been subscribed to a public bug by Evan Broder (broder):
[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)
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
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
[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.
** Affects: nagios3 (Ubuntu)
Importance: Undecided
Status: Fix Released
** Affects: nagios3 (Ubuntu Precise)
Importance: Undecided
Status: Confirmed
--
HOSTALIAS doesn't update after changing config files
https://bugs.launchpad.net/bugs/1234376
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.
More information about the Ubuntu-sponsors
mailing list