How does this work? I’ve activated it and it should do a GET request to all sites, but I don’t see anything in the access logs of the sites, so is it even working? How would it be recognised in access logs? Does it have specific user agent?
A GET request also does a complete pageload. Uptime Robot reduces load and traffic by only doing a HEAD request. Is dat also possible?
In my settings (/wp-admin/admin.php?page=MonitoringSites - Page settings) the “Up HTTP Codes” is filled only with 403 (no 2xx codes). I guess it’s based on an old setting, because I’ve entered 403 in the past to ignore the status as it was sometimes shown when there was no issue.
Notifications are sent by email, but monitoring like this is much more suited to send a signal to Discord/Slack or another webhook. Can that please be added as well? It shouldn’t be too hard. The basics can be found in GitHub - sprucely-designed/mainwp-discord-notifications and (in time) it could be used for other notifications as well.
I am not 100% sure if the checks should be logged in access log. I will need to look into it but from what I see in the code, the monitoring feature runs HTTP requests via cURL. By deafut, GET method is used, but it can be changed to other methods as well. Checks are using the User-Agent: 'Mozilla/5.0 (compatible; MainWP/5.3; +http://mainwp.com)'
I talked quickly to the dev team and they said that they will add the option to do only HEAD requests, we should have this ready in RC2.
By default, 2XX codes are considered as Up Status, however, we did not have them pre-selected in the settings, so we will make this tweak and in RC2, 2xx codes will be pre-selected. 403 Code was set for you since you had it in the Ignored list in Basic Uptime monitoring.
We are still thinking about this, but the way we will handle the notifications, however for the initial release, we will add a hook in the process that will fire after checks so custom code can be hooked for various needs.
I guess this would be expected, because it loads content from the site. Of course I mean the access log of the child sites. UptimeRobot and other site monitoring tools are logged as well.
Great!
That would be nice, although I might need a hand to create the notifications, but we’ll see how that goes.
I do see the lines in the log, but very irregular and definitely not every 5 minutes like I’ve set in the MainWP Settings - General Settings - Uptime Monitoring on the Monitoring Interval. Can I see some logging if checks are fired or not? How are they fired?
I’ve got both UptimeRobot (this is the last week) and a cron job on my server doing requests to my dashboard: GET /wp-cron.php?doing_wp_cron every 5 minutes, so if it’s cron based there should be enough activity.
Requests should be sent to all my 325 sites, so I hope it’s not a capacity issue? I don’t see a higher load on my server, so that’s not the problem.
Thanks for the hook and the snippet. I’ll defenitely will test that later (with RC2)!
In the MainWP > Settings > Advanced Settings there is an option that allows you t set Maximum simultaneous uptime monitoring requests , by default it’s 10, but you can set it anywhere between 1 and 100:
In case there is a visual problem with this setting on your setup, you can redownload the RC2 version from the Early Release page and install it, that should fix it.
Hi Jos, it might be that the scheduled before you made the change was not processed yet and is still in the queue.
In my test setup, I have 10 sites and when I change the number of monitors to be processed in one batch it works correctly.
Can you please give it more time and see how it goes? If there is still the problem, can you please make a copy of the CEM log and send it via support ticket so our dev team can check?
The number of checks is indeed increasing, and so is the interval of the checks (from 5 to now 2 minutes). it’s still logged that [count_monitors=10], so maybe that’s just a logging issue?
There are no other messages that indicate an issue, only the success message and the fact that data=EMPTY (because of the HEAD request I think).