Page 1 of 2

Free Variable Definitions Disappearing - when Cloned!

Posted: Wed Sep 12, 2012 12:52 pm
by CGraham
I brought this up previously but couldn't re-create the issue in Nagios. Now we know that when you clone an existing host, the Free Variables move to the newly cloned host but are removed from the original host. Anyway, not sure what I need to do to get a bug report opened.

Installed Version: 2011R3.2

Nagios XI Installation Profile
Download Profile
System:
hostname 2.6.32-220.13.1.el6.i686 i686
CentOS release 6.2 (Final)
Gnome Installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
Server Name: -----
Server Address: -----
Server Port: 80
Date/Time
PHP Timezone: America/New_York
PHP Time: Wed, 12 Sep 2012 13:49:45 -0400
System Time: Wed, 12 Sep 2012 13:49:45 -0400
Nagios XI Data
nagios (pid 7528) is running...
NPCD running (pid 1973).
ndo2db (pid 2020) is running...
CPU Load 15: 1.17
Total Hosts: 616
Total Services: 6079

Re: Free Variable Definitions Disappearing - when Cloned!

Posted: Wed Sep 12, 2012 2:23 pm
by scottwilkerson
To my utter disbelief that this could happen, I tested it and in fact it does.

you can file a bug report with any information you have at
http://tracker.nagios.com/

I have already spoken with this to our developer in charge of the CCM, but the bug report would be useful.

Thanks!

Re: Free Variable Definitions Disappearing - when Cloned!

Posted: Wed Dec 05, 2012 3:16 pm
by XenoPhage
I'm seeing this same problem in 2012R1.2 and I don't see it noted as fixed in the release notes for 2012R1.3 ... I looked through the tracker and I see a bug report that was fixed in 2012R1.0. It appears this may be a regression, though. I've created a new bug for this issue here : http://tracker.nagios.com/view.php?id=325

Re: Free Variable Definitions Disappearing - when Cloned!

Posted: Wed Dec 05, 2012 4:19 pm
by mguthrie
Which object type are you attempting to clone where is it failing. I was able to verify this is working for hosts and services on my test machine. Are you seeing with something like contacts or a template?

Re: Free Variable Definitions Disappearing - when Cloned!

Posted: Wed Dec 05, 2012 4:35 pm
by XenoPhage
Nope, seeing this on a host.

More information :

Create a new host, add a few free variables. Clone that host. Initially, both hosts will have the free variables and everything appears to be ok. However, if you go into the newly cloned host and click save, the original host loses its free variables. I verified this on a test instance running 2012R1.1 as well.

Re: Free Variable Definitions Disappearing - when Cloned!

Posted: Wed Dec 05, 2012 4:54 pm
by mguthrie
Ok, I see it now. I was looking at the newly cloned object, not the old one. Thanks for the report, we'll get it fixed for the next release.

Re: Free Variable Definitions Disappearing - when Cloned!

Posted: Wed Dec 05, 2012 5:06 pm
by lmiltchev
I was able to recreate it, so I can confirm this bug.

Re: Free Variable Definitions Disappearing - when Cloned!

Posted: Mon Dec 10, 2012 2:54 pm
by CGraham
I'm seeing a new issue with Free Variables in NagiosXI 2012R1.2

I create a free variable on a host

Code: Select all

"MessageCount DIRECT=OS:[server]\\private$\\tn32 1000 5000"
Save the host. Open the host back up and it's changed to this...

Code: Select all

"MessageCount DIRECT=OS:[server]private$ n32 1000 5000"
The \\ is gone and the \\t is being interpolated as a tab....

I tried saving with single quotes:

Code: Select all

'MessageCount DIRECT=OS:[server]\\private$\\tn32 1000 5000'
But that just disappears after saving it.

Re: Free Variable Definitions Disappearing - when Cloned!

Posted: Mon Dec 10, 2012 3:03 pm
by mguthrie
Oh that will be fun to try and sanitize that correctly ;) Alright, I'll take a look at that as well and see what I can find out. It may be as simple as single quoting and using addslashes() to the input processing.

Re: Free Variable Definitions Disappearing - when Cloned!

Posted: Mon Dec 10, 2012 5:56 pm
by CGraham
If you can post a fix that would be great. I'm getting alarms on MSMQ monitors for any server the guys touch.