Recurring Downtime - not working after upgrade to 2024R1.0.1

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
vappukuttan
Posts: 52
Joined: Tue Mar 05, 2019 7:43 am

Recurring Downtime - not working after upgrade to 2024R1.0.1

Post by vappukuttan »

Hello,

Not sure if this has been reported. We have a few "Recurring Downtime" setups for Services. Since the upgrade to 2024R1.0.1 (from 5.11.3), we dont see them triggering at the times its supposed to. This has been causing some un-wanted notifications which should have been suppressed.

What can I check to see whats going on. We checked the "Event Log" and dont see the messages that we expect when the downtime is setup.

Thank you,
Vinod
User avatar
lgute
Posts: 117
Joined: Mon Apr 06, 2020 2:49 pm

Re: Recurring Downtime - not working after upgrade to 2024R1.0.1

Post by lgute »

Hi @vappukuttan, thanks for reaching out.

What OS/version are you running?

This may be related to an issue that has been reported with Ubuntu 22 and Vixie cron.

You could try this, as a temporary work around, after making a backup of the recurring_downtime.php script.

Code: Select all

cp /usr/local/nagiosxi/cron/recurring_downtime.php /usr/local/nagiosxi/cron/recurring_downtime.php.`date +%s`
sed -i '199,208s/^/\/\//' /usr/local/nagiosxi/cron/recurring_downtime.php
Please let us know if you have any other questions or concerns.

-Laura
vappukuttan
Posts: 52
Joined: Tue Mar 05, 2019 7:43 am

Re: Recurring Downtime - not working after upgrade to 2024R1.0.1

Post by vappukuttan »

Hello,

Thank you for the quick response on this. I checked the /usr/local/nagiosxi/var/recurringdowntime.log and I do see a lot of messages with "This script is already running pid" lines. I have made the recommended changes, hopefully the next ones will start to work. I will update this thread if I still see issues.

Thank you again,
Vinod
kvang
Posts: 34
Joined: Wed Aug 23, 2023 11:28 am

Re: Recurring Downtime - not working after upgrade to 2024R1.0.1

Post by kvang »

Hi vappukuttan,

Any update on this? Curious if it worked out or not. :)

Thanks!
tgoodmanzenith
Posts: 1
Joined: Tue Aug 01, 2023 1:44 pm

Re: Recurring Downtime - not working after upgrade to 2024R1.0.1

Post by tgoodmanzenith »

I'm running 2024R1.0.1 on RHEL 8 and was experiencing the same issue with reoccurring downtimes not getting scheduled. The following messages were in /usr/local/nagiosxi/var/recurringdowntime.log

Code: Select all

Wed, 14 Feb 2024 08:01:01 -0800 schedule_downtimes() called
Wed, 14 Feb 2024 08:01:01 -0800 This script is already running pid: 249662 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/recurring_downtime.php >> /usr/local/nagiosxi/var/recurringdowntime.log 2>&1
I made the changes suggested above and now downtimes are getting scheduled correctly.

The odd thing is that if I ran the following from the command line it worked as expected and scheduled the downtime

Code: Select all

sudo su - nagios /usr/bin/php /usr/local/nagiosxi/cron/recurring_downtime.php
sgardil
Posts: 143
Joined: Wed Aug 09, 2023 9:58 am

Re: Recurring Downtime - not working after upgrade to 2024R1.0.1

Post by sgardil »

In our next update we will be changing the way this process works. Currently it stops the process if there is a pid of the same cron job running. It will be changed to make a lockfile if it is running and will run after that lock is cleared. Feel free to keep an eye on our changelog for it to be released.
Post Reply