Recurring downtime scheduling for wrong dates

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Recurring downtime scheduling for wrong dates

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Recurring downtime scheduling for wrong dates

Post 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;"
Former Nagios Employee.
me.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Recurring downtime scheduling for wrong dates

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Recurring downtime scheduling for wrong dates

Post 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

Code: Select all

/usr/local/nagiosxi/cron/
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.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Recurring downtime scheduling for wrong dates

Post 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
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Recurring downtime scheduling for wrong dates

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Recurring downtime scheduling for wrong dates

Post by Fred Kroeger »

Sure - not a problem. Still looking each day, but nothing scheduled yet for Feb.

regards... Fred
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Recurring downtime scheduling for wrong dates

Post 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
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Recurring downtime scheduling for wrong dates

Post 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
Nagios XI 5.8.1
https://outsideit.net
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Recurring downtime scheduling for wrong dates

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked