On 13.04.2011 18:58, Mark D. Nagel wrote:
On 3/14/2011 7:50 AM, Dennis Kuhlmeier wrote:
just noticed that I couldn't change the alias value in an existing
host definition.
$HOSTALIAS$ just remained on the old value although the web
interface showed the current setting.
I built myself a little test setup and just returned $HOSTALIAS$ as
a check-result and could confirm that in Nagios Core 3.2.1
$HOSTALIAS$ changed without error when changing the alias
definition, since version 3.2.2 change is impossible.
Thanks for a fix in an upcoming version.
We have just diagnosed this problem as well. It seems to be due to this
"fix" released with 3.2.2:
* Fix for retaining host display name and alias, as well as service
display name (Folkert van Heusden)
Sadly, the additional retained attributes have no corresponding mask
bits to use in the retained_host_attribute_mask setting, and there is no
justification provided for incorporating this change, just that one
line. No UI I've seen lets you change these values (though one could
exist I'm sure). The result is, whatever value those fields had are kept
forever in the retention file regardless of what you change them to in
the actual configuration. The only solution I can see is to stop
Nagios, edit the retention file and start Nagios. There may be a string
you can send to the command pipe to change those (one would hope that is
the case), but I agree with you -- this "fix" needs to be pulled from
the code.
I recently removed that "feature" from icinga core, and then also built
an on demand patch against current 3.2.3 git tree for an omd user. since
it's unclear to me if the nagios devs would keep that as feature or not,
feel free to use the attached git patch yourself.
kind regards,
michael
--
DI (FH) Michael Friedrich
Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria
email: michael.friedr...@univie.ac.at
phone: +43 1 4277 14359
fax:+43 1 4277 14338
web:http://www.univie.ac.at/zid
http://www.aco.net
Icinga Core& IDOUtils Developer
http://www.icinga.org
>From 1e5261ada7d2732b11a59e672f9f9afa6e9aee0b Mon Sep 17 00:00:00 2001
From: Michael Friedrich
Date: Thu, 24 Mar 2011 13:37:53 +0100
Subject: [PATCH] do not retain display_name and host alias
---
xdata/xrddefault.c | 15 ---
1 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/xdata/xrddefault.c b/xdata/xrddefault.c
index 3484cdc..20566eb 100644
--- a/xdata/xrddefault.c
+++ b/xdata/xrddefault.c
@@ -361,8 +361,6 @@ int xrddefault_save_state_information(void){
fprintf(fp,"host {\n");
fprintf(fp,"host_name=%s\n",temp_host->name);
- fprintf(fp,"alias=%s\n",temp_host->alias);
- fprintf(fp,"display_name=%s\n",temp_host->display_name);
fprintf(fp,"modified_attributes=%lu\n",(temp_host->modified_attributes & ~host_attribute_mask));
fprintf(fp,"check_command=%s\n",(temp_host->host_check_command==NULL)?"":temp_host->host_check_command);
fprintf(fp,"check_period=%s\n",(temp_host->check_period==NULL)?"":temp_host->check_period);
@@ -433,7 +431,6 @@ int xrddefault_save_state_information(void){
fprintf(fp,"service {\n");
fprintf(fp,"host_name=%s\n",temp_service->host_name);
- fprintf(fp,"display_name=%s\n",temp_service->display_name);
fprintf(fp,"service_description=%s\n",temp_service->description);
fprintf(fp,"modified_attributes=%lu\n",(temp_service->modified_attributes & ~service_attribute_mask));
fprintf(fp,"check_command=%s\n",(temp_service->service_check_command==NULL)?"":temp_service->service_check_command);
@@ -1201,14 +1198,6 @@ int xrddefault_read_state_information(void){
temp_host->last_state=atoi(val);
else if(!strcmp(var,"last_hard_state"))
temp_host->last_hard_state=atoi(val);
- else if(!strcmp(var,"alias")){
- my_free(temp_host->alias);
- temp_host->alias=(char *)strdup(val);
- }
- else if(!strcmp(var,"display_name")){
- my_free(temp_host->display_name);
- temp_host->display_name=(char *)strdup(val);
- }
else if(!strcmp(var,"plugin_output")){
my_free(temp_host->plugin_output);
temp_host->plugin_output=(char *)strdup(val);
@@ -1480,10 +1469,6 @@ int xrddefault_read_state_information(void){
temp_service->last_state=atoi(val);
else if(!strcmp(var,"last_hard_state"))
temp_service->last_hard_state=atoi(val);
- else if(!strcmp(var,"display_name")){
- my_free(temp_service->display_name);
- temp_service->display_name=(char *)strdup(val);
- }
else if(!strcmp(var,"current_attempt"))
temp_service->current_attempt=atoi(val);
else if(!strcmp(var,"current_event_id"))
--
1.7.1.1
--
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation o