Let's create a new FAQ to document how to monitor that a Piwik server is running smoothly.
What do you think?
To monitor for Piwik service, setup the following checks:
We recommend to use
https:// in the checks URLs so you're also checking Piwik works over secured connection.
Likely the tool you use for monitoring will let you know the services Uptime (eg. 99%) which is useful metric.
FAQ was created: How do I monitor that Piwik service is up and running?
I read @mattab FAQ and was wondering if the check involved the database at all. If "MySQL has gone away" the test to index.php?module=API&method=API.getPiwikVersion would still work right ?
If it's the case (no DB call) I will create a new FC for a second test involving the DB.
I'm aware a check could be done directly to MySQL with monitoring tools but having the check from within Piwik would be more simple to setup I think.
the index.php check will detect when Mysql server is down and http status should be 500
however the piwik.php check will still work when mysql is down, I looked whether we could provide a piwik.php check that detects the db is down, but it's not easy, so decided not to do it
BTW, the FAQ seems incomplete. We need the &token_auth= . If not, we still get a 200-OK but also an error message saying we don't get view rights in the XML response :
Does the check also check whether the archiving job is running successfully?
No it doesn't