schedule downtime issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

schedule downtime issue

Post by sitaonair »

Hi,

We are experiencing issues when scheduling downtime on Nagios XI.

When using nagios Core, no issue occurs,
nagios_core.PNG
when using XI, the action fails.
error.PNG
Note : I found another topic related to the same error. It was about ssl cert verification. I tried to apply the "downtime.php" patch, but it didn't worked.


Nagios XI Installation Profile
System:
Nagios XI Version : 5.2.3
onair-tel-ops-nagxi-01 2.6.32-573.7.1.el6.x86_64 x86_64
CentOS release 6.7 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Server Name: onair-tel-ops-nagxi-01
Server Address: 10.121.8.59
Server Port: 80
Date/Time
PHP Timezone: UTC
PHP Time: Wed, 06 Jan 2016 09:20:37 +0000
System Time: Wed, 06 Jan 2016 09:20:37 +0000
Nagios XI Data
License ends in: MVUPPO

nagios (pid 27158) is running...
NPCD running (pid 2092).
ndo2db (pid 2356) is running...
CPU Load 15: 0.77
Total Hosts: 114
Total Services: 1449
Function 'get_base_uri' returns: http://onair-tel-ops-nagxi-01/nagiosxi/
Function 'get_base_url' returns: http://onair-tel-ops-nagxi-01/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://onair-tel-ops-nagxi-01/nagiosxi/ ... rofile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: schedule downtime issue

Post by rkennedy »

Note : I found another topic related to the same error. It was about ssl cert verification. I tried to apply the "downtime.php" patch, but it didn't worked.
With that said, are you using / forcing SSL on your XI by any chance?
Former Nagios Employee
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

Re: schedule downtime issue

Post by sitaonair »

I tried the same operation when connected on nagios XI with SSL, same behavior.

My first investigations shows that the error occurs when command is submited to nagios Core.
I suspect that the date format submitted by XI to Nagios Core is wrong. Unfortunately, the nagios XI php code is obfuscated, so I couldn't dig deeper.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: schedule downtime issue

Post by tmcdonald »

Any errors in /var/log/httpd/error_log when you try this and it fails? What about /usr/local/nagios/var/nagios.log?
Former Nagios employee
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: schedule downtime issue

Post by ssax »

Grab the server name from the address bar in your web browser and throw it into your /etc/hosts file on the XI server:

For example, let's say that I type in http://myxiserver/nagiosxi in my address bar to get to the XI server.
- Edit your /etc/hosts file and add myxiserver to the end of the 127.0.0.1 entry
- Now try scheduling downtime again and let us know the result.
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

Re: schedule downtime issue

Post by sitaonair »

ssax wrote:Grab the server name from the address bar in your web browser and throw it into your /etc/hosts file on the XI server:

For example, let's say that I type in http://myxiserver/nagiosxi in my address bar to get to the XI server.
- Edit your /etc/hosts file and add myxiserver to the end of the 127.0.0.1 entry
- Now try scheduling downtime again and let us know the result.
when scheduling a host downtime :

Code: Select all

[Fri Jan 08 07:51:03 2016] [error] [client 10.121.8.180] PHP Notice:  Undefined variable: service in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 44, referer: http://onair-tel-ops-nagxi-01/nagiosxi/includes/components/xicore/downtime.php?cmd=schedule&type=host
when scheduling a service downtime :

Code: Select all

[Fri Jan 08 08:09:25 2016] [error] [client 10.121.8.180] PHP Notice:  Undefined variable: service in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 44, referer: http://onair-tel-ops-nagxi-01/nagiosxi/includes/components/xicore/downtime.php?cmd=schedule&type=service
It seems that theses errors are not affecting the downtime functionnalities
ssax wrote:Grab the server name from the address bar in your web browser and throw it into your /etc/hosts file on the XI server:

For example, let's say that I type in http://myxiserver/nagiosxi in my address bar to get to the XI server.
- Edit your /etc/hosts file and add myxiserver to the end of the 127.0.0.1 entry
- Now try scheduling downtime again and let us know the result.
Host added in host file (host is available in our DNSs also), Still the same issue.

I didn't mentionned in my 1st post: I test the schedulled dowtime with nagios with this debugging options :

/usr/local/nagios/etc/nagios.cfg

Code: Select all

debug_file=/usr/local/nagios/var/nagios.debug
debug_level=2048
debug_verbosity=2
I found nothing relevant in nagios debug file
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: schedule downtime issue

Post by tgriep »

Can you login to the Core interface, select a host or service from the menu and schedule it for downtime.
Do you get an error and can you post it here?
To access the Core interface, use this URL and login with the nagiosadmin user name and password.

Code: Select all

http://XIserver/nagios/
Be sure to check out our Knowledgebase for helpful articles and solutions!
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

Re: schedule downtime issue

Post by sitaonair »

Hi,

My first post indicated that the "schedule downtime" works fine on Nagios Core. The screenshot named "nagios_core" show the result for a scheduled downtime.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: schedule downtime issue

Post by rkennedy »

I know there was a bug in the past that was similar to this, but it should be fixed in the latest version.

I noticed in core that you are logged in as the user 'tsenay'. In XI, what privileges do they have? Is it a user or an admin account?

Are you using a self signed certificate?

I'd like to try and replicate this, and to do so I need as much information as possible.
Former Nagios Employee
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

Re: schedule downtime issue

Post by sitaonair »

Hi,

My personal account has an admin profile.
About SSL, The configuration has been left by default on apache server. Probably this certificate is provided by the package manager (yum on CentOS)

SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

Do you think I can try with another certificate (self signed or a trusted one ?)
Locked