Free Variable Definitions Disappearing - when Cloned!

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
CGraham
Posts: 115
Joined: Tue Aug 16, 2011 2:43 pm

Free Variable Definitions Disappearing - when Cloned!

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Free Variable Definitions Disappearing - when Cloned!

Post 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!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: Free Variable Definitions Disappearing - when Cloned!

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Free Variable Definitions Disappearing - when Cloned!

Post 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?
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: Free Variable Definitions Disappearing - when Cloned!

Post 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.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Free Variable Definitions Disappearing - when Cloned!

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Free Variable Definitions Disappearing - when Cloned!

Post by lmiltchev »

I was able to recreate it, so I can confirm this bug.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
CGraham
Posts: 115
Joined: Tue Aug 16, 2011 2:43 pm

Re: Free Variable Definitions Disappearing - when Cloned!

Post 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.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Free Variable Definitions Disappearing - when Cloned!

Post 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.
User avatar
CGraham
Posts: 115
Joined: Tue Aug 16, 2011 2:43 pm

Re: Free Variable Definitions Disappearing - when Cloned!

Post 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.
Locked