Page 1 of 2

Fail XI monitoring wizard on CentOS 5.2.5

Posted: Sun Mar 06, 2016 5:29 am
by ankit_bansal3
We have develop an NagiosXI monitoring wizard which i am able to import in NagiosXI 5.2.3 centOS version. But its failing in Latest NagiosXI CentOS 5.2.5.
Unfortunately, there is no separate guideline from NagiosXI side for monitoring wizard development for 5.2.5 specific.

Can anybody help on this.

Re: Fail XI monitoring wizard on CentOS 5.2.5

Posted: Sun Mar 06, 2016 7:16 pm
by Box293
How are you importing it?

This guide should cover all versions of XI:

https://support.nagios.com/kb/article.php?id=53

What do you mean "its failing"?

Run this command in an SSH session:

Code: Select all

tail /var/log/httpd/* -f
When it fails, what is generated in the SSH session?

Re: Fail XI monitoring wizard on CentOS 5.2.5

Posted: Mon Mar 07, 2016 2:09 am
by ankit_bansal3
Fail i means is that, we have developing our own XI monitoring Wizard.
Same wizard we are able to upload in NagiosXI Console 5.2.3 CentOS.
But upload is failing in NagiosXI Console 5.2.5 CentOS.
I have attached the screenshot for the same.

Re: Fail XI monitoring wizard on CentOS 5.2.5

Posted: Mon Mar 07, 2016 2:25 pm
by hsmith
Box293 wrote:Run this command in an SSH session:

Code: Select all
tail /var/log/httpd/* -f



When it fails, what is generated in the SSH session?
Can you please follow these steps and let us know what the outcome is?

Re: Fail XI monitoring wizard on CentOS 5.2.5

Posted: Mon Mar 07, 2016 2:47 pm
by jomann
Please also verify that the name of the wizard matches the name of the folder and the zip file that you are uploading.

Re: Fail XI monitoring wizard on CentOS 5.2.5

Posted: Tue Mar 08, 2016 12:26 am
by ankit_bansal3
Below is the output for tail /var/log/httpd/* -f

Code: Select all

==> /var/log/httpd/access_log <==
::1 - - [08/Mar/2016:10:54:55 +0530] "POST /nagiosxi/backend/ HTTP/1.1" 200 1590 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.94.35.34 - - [08/Mar/2016:10:54:55 +0530] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_tray_alert_html%22%2C%22args%22%3A%22%22%7D&nsp=15c5244676bf6d43e0103501a0ad13b7 HTTP/1.1" 200 477 "http://10.94.172.36/nagiosxi/admin/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [08/Mar/2016:10:54:56 +0530] "POST /nagiosxi/backend/ HTTP/1.1" 200 1590 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.94.35.34 - - [08/Mar/2016:10:54:55 +0530] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=15c5244676bf6d43e0103501a0ad13b7 HTTP/1.1" 200 1134 "http://10.94.172.36/nagiosxi/admin/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [08/Mar/2016:10:55:01 +0530] "POST /nagiosxi/backend/ HTTP/1.1" 200 717 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
::1 - - [08/Mar/2016:10:55:01 +0530] "POST /nagiosxi/backend/ HTTP/1.1" 200 758 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.94.35.34 - - [08/Mar/2016:10:55:00 +0530] "POST /nagiosxi/admin/configwizards.php HTTP/1.1" 200 58201 "http://10.94.172.36/nagiosxi/admin/configwizards.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [08/Mar/2016:10:55:03 +0530] "POST /nagiosxi/backend/ HTTP/1.1" 200 800 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.94.35.34 - - [08/Mar/2016:10:55:04 +0530] "GET /nagiosxi/ajaxhelper.php?cmd=getusermeta&opts=view_rotation_enabled&nsp=15c5244676bf6d43e0103501a0ad13b7 HTTP/1.1" 200 - "http://10.94.172.36/nagiosxi/admin/configwizards.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [08/Mar/2016:10:55:24 +0530] "POST /nagiosxi/backend/ HTTP/1.1" 200 800 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
::1 - - [08/Mar/2016:10:55:25 +0530] "POST /nagiosxi/backend/ HTTP/1.1" 200 1590 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.94.35.34 - - [08/Mar/2016:10:55:25 +0530] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=15c5244676bf6d43e0103501a0ad13b7 HTTP/1.1" 200 1134 "http://10.94.172.36/nagiosxi/admin/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
::1 - - [08/Mar/2016:10:55:25 +0530] "POST /nagiosxi/backend/ HTTP/1.1" 200 1590 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
10.94.35.34 - - [08/Mar/2016:10:55:25 +0530] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_tray_alert_html%22%2C%22args%22%3A%22%22%7D&nsp=15c5244676bf6d43e0103501a0ad13b7 HTTP/1.1" 200 477 "http://10.94.172.36/nagiosxi/admin/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"

Re: Fail XI monitoring wizard on CentOS 5.2.5

Posted: Tue Mar 08, 2016 12:28 am
by ankit_bansal3
@jomann:
Yes, all folder structure as per guidelines.
Same wizard we are able to upload in 5.2.3 and lower version.

Re: Fail XI monitoring wizard on CentOS 5.2.5

Posted: Tue Mar 08, 2016 11:50 am
by ankit_bansal3
Look like in latest NagiosXI 5.2.5, the install Config wizard behavior has changed.

I have analyses the NagiosXI framework code and found that they have add an additional check for install wizard portion.
Which will limit the Config-Wizard file size name to 40 char.

/usr/local/nagiosxi/cron/cmdsubsys.php => case COMMAND_INSTALL_CONFIGWIZARD:

If this is true, all the existing wizard which having long name will fail in upload.

Can anybody confirm if this analysis if correct and is there any document from NagiosXI side on this changes available.
I am bit more scared that there can be many more changes with any release note entry

Re: Fail XI monitoring wizard on CentOS 5.2.5

Posted: Tue Mar 08, 2016 3:04 pm
by lgroschen
does your name contain hyphens "-"? Can you please post the name and attach the zip file here?

Re: Fail XI monitoring wizard on CentOS 5.2.5

Posted: Tue Mar 08, 2016 3:40 pm
by bheden
I can confirm that this functionality shouldn't effect most configwizards names.

The conditional looks something like this:

Code: Select all

If Length of ConfigWizard Name is greater than 40 characters then..
  Break the string up into an array, if words are separated by a hyphen
  If the last part of the array is exactly equal to 40 characters then..
    Only use the first part of the array (the part before the first hyphen) as the ConfigWizard name
Else
  Use the original name
This is specifically intended for aiding in the download and use of zip files from Git sources (where you can download the zip files directly).

Hope this helps!