Page 1 of 1

Unable to schedule downtime: error with Nagios Core

Posted: Tue Aug 09, 2016 4:30 pm
by combatzak
We have recently started using NagiosXI, and I have encountered an error when attempting to schedule downtime for a host using the left navigation column Scheduled Downtime link.

Image

Our environment details are as follows:
  • OS Version: CentOS 7 64-bit
    NagiosXI version: 5.2.9
    Installation Type: Manual
    Special Configurations: SSL enabled
I found this thread which indicates that a nearly identical issue was fixed as early as version 5.2.3, however, we are using version 5.2.9 and encountering this problem.

I am able to confirm that I can successfully schedule downtime for a host through its host management page (using Nagios Core advanced settings). However even after scheduling downtime this way, the record's duration is incorrect. For example, a host scheduled for a 48-hour window shows a duration of 9h, 6m, 7s in the scheduled downtime page. I have confirmed that my account's date/time settings are set to use the standard YYYY-MM-DD HH:MM:SS format. This issue may or may not be related to the inability to schedule downtime described above.

Image

Following advice from the above thread, I have included a tail of the /var/log/httpd/ssl_error_log file from the server (error_log was empty, likely because we are using SSL).

Code: Select all

[Mon Aug 08 03:50:12.995301 2016] [ssl:warn] [pid 818] AH01909: RSA certificate configured for 127.0.0.1:443 does NOT include an ID which matches the server name
[Tue Aug 09 10:01:50.403173 2016] [:error] [pid 23244] [client 12.216.75.178:50524] PHP Notice:  Undefined index: flash_msg in /usr/local/nagiosxi/html/login.php on line 79, referer: https://monitor.broadvine.com/
[Tue Aug 09 10:09:52.566904 2016] [:error] [pid 23264] [client 12.216.75.178:50690] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 535, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/downtime.php
[Tue Aug 09 10:09:52.566924 2016] [:error] [pid 23264] [client 12.216.75.178:50690] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 535, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/downtime.php
[Tue Aug 09 10:09:52.566928 2016] [:error] [pid 23264] [client 12.216.75.178:50690] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 535, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/downtime.php
[Tue Aug 09 15:08:51.719732 2016] [:error] [pid 31891] [client 12.216.75.178:58359] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 2474, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/status.php?&show=services&hoststatustypes=15&servicestatustypes=28&serviceattr=10
[Tue Aug 09 15:08:51.719751 2016] [:error] [pid 31891] [client 12.216.75.178:58359] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 2474, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/status.php?&show=services&hoststatustypes=15&servicestatustypes=28&serviceattr=10
[Tue Aug 09 15:08:51.719755 2016] [:error] [pid 31891] [client 12.216.75.178:58359] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 2474, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/status.php?&show=services&hoststatustypes=15&servicestatustypes=28&serviceattr=10
[Tue Aug 09 15:09:07.081480 2016] [:error] [pid 24725] [client 12.216.75.178:58358] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 1139, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/status.php?&show=services&hoststatustypes=15&servicestatustypes=16
[Tue Aug 09 15:09:07.081498 2016] [:error] [pid 24725] [client 12.216.75.178:58358] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 1139, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/status.php?&show=services&hoststatustypes=15&servicestatustypes=16
[Tue Aug 09 15:09:07.081502 2016] [:error] [pid 24725] [client 12.216.75.178:58358] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 1139, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/status.php?&show=services&hoststatustypes=15&servicestatustypes=16
[Tue Aug 09 16:32:06.215939 2016] [:error] [pid 4375] [client 12.216.75.178:59531] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 535, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/downtime.php
[Tue Aug 09 16:32:06.215958 2016] [:error] [pid 4375] [client 12.216.75.178:59531] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 535, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/downtime.php
[Tue Aug 09 16:32:06.215970 2016] [:error] [pid 4375] [client 12.216.75.178:59531] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 535, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/downtime.php
[Tue Aug 09 17:10:19.675803 2016] [:error] [pid 4061] [client 12.216.75.178:60205] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 535, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/downtime.php
[Tue Aug 09 17:10:19.675822 2016] [:error] [pid 4061] [client 12.216.75.178:60205] PHP Notice:  Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 535, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/downtime.php
[Tue Aug 09 17:10:19.675826 2016] [:error] [pid 4061] [client 12.216.75.178:60205] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/xicore/downtime.php on line 535, referer: https://monitor.broadvine.com/nagiosxi/includes/components/xicore/downtime.php
I appreciate any guidance or assistance with these issues.

Re: Unable to schedule downtime: error with Nagios Core

Posted: Tue Aug 09, 2016 5:11 pm
by ssax
Are you using HTTPS with a self-singed certificate?

Make sure that you have your shortname and FQDN in your /etc/hosts file on your XI server as well, this is usually the cause of it.

Validate the URL in Admin > System Settings > Program URL and External URL.

Re: Unable to schedule downtime: error with Nagios Core

Posted: Wed Aug 10, 2016 8:40 am
by combatzak
Thank you for the advice, updating the hosts file appears to have corrected the problem with being unable to schedule downtime. However, it appears that the duration for downtime records is still incorrect in some cases. Specifically, if I schedule a 48-hour downtime window for a host, the duration shown is 9h 6m 7s. This is a relatively minor problem as the downtime still seems to behave as expected, only the displayed duration is incorrect.

Re: Unable to schedule downtime: error with Nagios Core

Posted: Wed Aug 10, 2016 11:02 am
by lmiltchev
I was going to file a bug report, but the "9 hour duration" issue is already fixed in our development revision, so the fix will be in the upcoming Nagios XI 5.3.0.

Re: Unable to schedule downtime: error with Nagios Core

Posted: Wed Aug 10, 2016 12:53 pm
by combatzak
Sounds good. Thank you for your help. I will confirm the behavior is changed when 5.3.0 is released.

Re: Unable to schedule downtime: error with Nagios Core

Posted: Wed Aug 10, 2016 1:42 pm
by mcapra
Since this is a known issue, is it alright if we lock this thread?