Site Down Notifications Not Working for WordPress

We have a number of WordPress installations on a cPanel server and most of the time, we get notifications when one of them is down. However, the newest site on the server has gone down a few times and we haven’t gotten notified.

A few notifications do come through, so far when there’s a Socket timeout. But when we get an error like the following, nothing is sent.

Parse error: syntax error, unexpected ‘/public’ in /home/clientname/public_html/wp-includes/taxonomy.php on line 4851

The above error in a plugin file caused the site to go down. We didn’t know until the client called us about it. Are there any settings we should be aware of in WordPress to make sure site down notifications are being sent correctly? Are there any plugins that may interfere with icinga’s processes, such as firewalls?

I think the most important bit of missing information from your posting is:

  • what Service Check plugin are you using to test whether the site is up or
    down?

Show us some of your config for performing these checks and we might be able to
take things further.

Antony.

Just the normal HTTP service check. Below is what we have in place throughout the icinga2 setup.

apply Service “http-” for (http_vhost => config in host.vars.vhosts) {
import “generic-service”

check_command = “http”

vars += config
vars.http_vhost = http_vhost
vars.http_onredirect = “follow”

notes = "HTTP checks for " + http_vhost

assign where host.vars.vhosts
}

apply Service “ssh” {
import “generic-service”

check_command = “ssh”

assign where (host.address || host.address6) && host.vars.os == “Linux”
}

apply Service for (http_vhost => config in host.vars.http_vhosts) {
import “generic-service”

check_command = “http”

vars += config
}

object Host “serverexample.com” {
import “generic-host”
check_command = “hostalive”
address = “0.0.0.0”
vars.disks = “disk”
vars.os = “Linux”

vars.vhosts[“www.clientdomain.com”] = {
}

}

You check if http is reachable which icinga reports correct

What you need to check additional is either if the http Statuscode is 200

or you look for some special Word that you know is rendered into the HTML Site when its working as supposed like i.e. „Welcome“

These two parameters can be configured at the http check

Greetings
Wolfgang