Need help getting maintenance emails working

Ok, I had a situation where two days ago several of my displays have XML Configuration file errors (Error in XML document (0,0). In the Xibo admin portal I could see those three displays weren’t communicating with the server. NOT A SINGLE EMAIL WAS SENT TELLING ME THE DISPLAYS WEREN’T COMMUNICATING!

I need step by step how to setup emails and maintenance so that I can get alerted that there is an issue with the displays. The actual error occurred two days ago but I didn’t find the error until the displays turned on this morning and people saw the error message.

Can someone please send me step by step how to get this setup? I’ve not found a single good document or guide on how to get them setup and tested to make sure they are working properly.

I can manually create this error by deleting the or corrupting the XML file.

Thanks!

Have you seen the section about maintenance emails here: Xibo CMS Post-Installation Setup Guide ?

Yes. I think I have it setup correctly as once I corrected those three displays I got emails that said they were back online.

Question though: Why didn’t I get an email when they went offline? Is there a configuration for that?

Thanks,
Dave

The “online” emails are sent when the displays connect back up - it is the offline emails that are sent using the maintenance procedures. So I suspect its not quite set up correctly.

If you call the maintenance.php file manually do you get output?

This is what I get when I hit the maintenance page:

http://localhost/Xibo/maintenance.php?key=key

Email Alerts
Tidy Logs
Done.
Tidy Stats
Done.
Wake On LAN
Done.

The maintenance scheduled task runs every 5 minutes. Results = 0xff

Well, that all looks normal - there isn’t anything under the email alerts heading because all of your displays are online at present so there isn’t anything to do.

Can you knock a display offline and repeat the test? You will need to wait for the collection interval OR the global time out if you have one set.

I took a display offline and waited for the global timeout. Here is what maintenance.php shows:

Email Alerts
A
Tidy Logs
Done.
Tidy Stats
Done.
Wake On LAN
Done.

I did receive an email that the display was last seen…

I have no idea why I didn’t see those emails the other day when the displays went offline.

Here is something curious? When you asked me to check maintenance.php I hit the website and it took at least 2 minutes for the page to come up. I’m wondering if there was a reboot and the page wasn’t compiled (JITed in the .NET world). I don’t know PHP at all.

Thanks,
Dave

Hi Dave,

Scripts aren’t complied in PHP they are parsed and run each time. I suspect it took a long time to come up because you have a lot of logs/stats to tidy up.

You may want to run two versions of the maintenance.php file - one with ?quick=1 on the end of the URL/script call. That will bypass any issue with logs taking too long to execute.

The A means “Alert” and is our shorthand to indicate that an email should have been sent out.

I suspect when it is running routinely on a schedule it is timing out due to log sizes.

I have the task setup to run every 5 minutes. 0xff is success, correct? How could the logs build up that much in 5 minutes?

Thanks,
Dave

0xff sounds like error to me not success. I think 0 is success?

The logs didn’t build up in 5 minutes - they built up in the time that the maintenance script hasn’t been being run properly.

We’ve had a few people with issues running the script under Windows. In those cases, it’s been best to download the Windows version of wget and use that to access the same URL you’ve been testing with rather than calling the PHP script directly with task scheduler. That will also mean that maintenance requests go in your access log file so you can check it’s running as you expect.

Thanks! I switch to WGET and it’s working fine now using the task scheduler. I receive emails when the displays go offline and come back online.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.