Page 1 of 5
Recurring downtime scheduling for wrong dates
Posted: Wed Jan 20, 2016 8:00 pm
by Fred Kroeger
Some of my HostGroup Recurring Downtimes are now being scheduled for wrong dates.
I discovered this earlier in the week and rather than waste time fault finding, I upgraded from NagiosXI5 3.2 to 3.2.3 , then deleted the scheduled downtimes.
The new scheduled downtimes then got rescheduled for the same wrong dates.
This is the setup for the recurring downtime (HostGroup)
Recurring.PNG
This is what has been scheduled
Scheduled.PNG
You can see from the Setup that the scheduled day is correct (Sat) but it is not one of the Valid dates (14->20)
Now this used to work pre v3.2 so something has changed along the way.
Regards.... Fred
Re: Recurring downtime scheduling for wrong dates
Posted: Thu Jan 21, 2016 10:27 am
by hsmith
Can we make sure that your times are not off?
Code: Select all
date
mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
php -r "echo date('r').PHP_EOL;"
Re: Recurring downtime scheduling for wrong dates
Posted: Thu Jan 21, 2016 7:48 pm
by Fred Kroeger
Sure - results are below . What puzzles me is that I have a list of dates and the date that has been scheduled is not one of those.
Code: Select all
# date ; mysql -uroot -pXX -e "SELECT NOW();" ; php -r "echo date('r').PHP_EOL;"
Fri Jan 22 08:47:07 WST 2016
+---------------------+
| NOW() |
+---------------------+
| 2016-01-22 08:47:07 |
+---------------------+
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php.ini on line 457 in Unknown on line 0
Fri, 22 Jan 2016 08:47:07 +0800
Re: Recurring downtime scheduling for wrong dates
Posted: Fri Jan 22, 2016 11:17 am
by tgriep
We have a new recurringdowntime.pl script That should fix this problem.
First lets make a backup of the current file. Login as root and run the following
Code: Select all
cp -p /usr/local/nagiosxi/cron/recurringdowntime.pl /usr/local/nagiosxi/cron/recurringdowntime.pl.bak
Then upload the attached file to this folder
Then run this to set the owner / permissionsto for the script.
Code: Select all
chown nagios.nagios /usr/local/nagiosxi/cron/recurringdowntime.pl
chmod 755 /usr/local/nagiosxi/cron/recurringdowntime.pl
You will have to delete the bad entries from the Scheduled Downtime menu.
Let us know if this works for you.
Re: Recurring downtime scheduling for wrong dates
Posted: Sun Jan 24, 2016 9:05 pm
by Fred Kroeger
Thanks - have copied over the updated script. The "bad" entries are already gone as they ran this last weeked. The new "bad" ones aren't scheduled yet as it is too far in the future, so I will monitor the scheduled list - I am expecting to see entries for Sat 20th Feb.
regards.. Fred
Re: Recurring downtime scheduling for wrong dates
Posted: Mon Jan 25, 2016 10:10 am
by lmiltchev
Fred, is it all right if we temporarily lock this thread then? You can PM us if you need to reopen it in the end of February or just start a new thread. Thanks!
Re: Recurring downtime scheduling for wrong dates
Posted: Thu Jan 28, 2016 11:23 pm
by Fred Kroeger
Sure - not a problem. Still looking each day, but nothing scheduled yet for Feb.
regards... Fred
Re: Recurring downtime scheduling for wrong dates
Posted: Fri Jan 29, 2016 4:07 am
by Fred Kroeger
Not sure if this is related to the updated config file, but I just discovered I can no longer schedule downtime manually. Both from the Host screen and the Scheduled Downtime screen.
From the Host screen (via the Advanced Tab) it just exits - but from the Scheduled downtime screen , I get the following message pop-up
Code: Select all
Something went wrong with the command submitted to Nagios Core.
Any ideas or what I need to look for ? BTW- I am filling in all the mandatory fields OK
Running NagiosXI 5.2.3
regards... Fred
Re: Recurring downtime scheduling for wrong dates
Posted: Fri Jan 29, 2016 4:35 am
by WillemDH
Fred,
I had the same problem some time ago. There is bug with users who have the date format in their user settings to something different then YYYY-MM-DD HH:MM:SS.
Try to set it to YYYY-MM-DD HH:MM:SS. and try again. Grtz
Re: Recurring downtime scheduling for wrong dates
Posted: Fri Jan 29, 2016 11:46 am
by lmiltchev
Not sure if this is related to the updated config file, but I just discovered I can no longer schedule downtime manually. Both from the Host screen and the Scheduled Downtime screen. From the Host screen (via the Advanced Tab) it just exits - but from the Scheduled downtime screen , I get the following message pop-up
Something went wrong with the command submitted to Nagios Core.
What are the permissions of the users scheduling downtime?
Admin->Manage Users->Edit->show a screenshot of the "Security Settings" section
There were two bugs filed internally to our system (same error message) that *should* be fixed:
- Scheduled Downtime - Cannot add scheduled downtime when self-signed SSL certificate is used.
- User with all privs cannot schedule downtime
I wonder if any of these somehow resurfaced...
Fred, have you tried WillemDH's suggestion? Did it help?