Plugins View all plugins
Resources
Live demo ↗ Request a plugin Sign in feinwerk.io ↗ Get the connector
New

The Feinwerk Connector is now in the Matomo Marketplace. Install it right inside Matomo, no download, no FTP. Read the news · Here is how →

On this page
Plugin documentation

Uptime Monitor

Uptime Monitor checks Matomo, its tracker and your websites and shows uptime, response times, outages and expiring certificates right in Matomo.

Plugin page Download ZIP

Overview

Notice it before data goes missing

When Matomo, its tracker or the tracking path on a website breaks, data gets lost without a sound. Usually you notice it days later as a gap in your reports. Uptime Monitor checks Matomo itself and every website from the Matomo server and shows the result where you already look: in Matomo, under Visitors › Uptime and in two dashboard widgets.

What is checked

  • Matomo itself: the interface, the tracker endpoint matomo.php and the JavaScript tracker matomo.js. Each check also looks at the content, so an error page that answers "200 OK" still counts as an outage.
  • Your websites: the main address of every website and more addresses if you want, the published Tag Manager containers (and whether the live version is the one Matomo published) and a tracking proxy.
  • Certificates: the expiry date of every TLS certificate, with a warning 14 days before (you choose the days).
  • Renamed trackers and tracking proxies: once a day the plugin reads your website's tracking code. It adopts a tracking proxy on the website's own address by itself and suggests a renamed tracker to super users. Every address can be changed by hand.

The tracker's response time, without test visits

Uptime Monitor measures how long Matomo needs for real tracking requests, on a small sample of the requests themselves. No test visits are recorded, and each sampled request costs one small database write. On top of that, every check measures the response time of the tracker endpoint.

Honest numbers

Time without a check never counts as reachable: uptime is always shown next to how much of the period was measured. An address the Matomo server cannot reach itself (a firewall, a private address) shows as "not checkable from this server", not as an outage. When a result is too old, it says "no recent check".

How often it checks

Without a cron of its own Uptime Monitor checks once an hour with Matomo's scheduled tasks. With a cron line, which the administration page shows ready to copy, it checks up to every minute. Admins of a website check at once with "Check now".

Alerts with Sentinel

With the free plugin Sentinel installed, four checks appear there: Matomo not reachable, website not reachable, certificate expires and slow tracker. Sentinel reports them by e-mail, Slack or Teams. When Sentinel reports no visits for a website that is down, the alert says so.

Privacy

The checks only go to your Matomo and to the addresses of your websites, with the User-Agent FeinwerkUptimeBot, which Matomo does not count as a visit. Only your vote goes to Feinwerk, if you answer the feedback question under the page; feedback = 0 switches the question off. Only the results of the checks and the time and duration of sampled tracking requests are stored, never anything about visitors.

Requirements

Matomo 6 or Matomo 5, PHP 8.1 or later with the curl extension. Uptime Monitor comes in English, German, French, Spanish and Italian, in light and dark mode.

Use cases

  • Matomo and its tracker in view: Interface, tracker endpoint and JavaScript tracker, with a check of the content, not just the status code.
  • Every website checked: Main address, more addresses, Tag Manager containers and the tracking proxy, for every website in Matomo.
  • Response time of real requests: The tracker's processing time from a small sample of real tracking requests, with no test visits.
  • Certificates in time: The expiry date of every TLS certificate, with a warning 14 days before.
  • Honest uptime: Time without a check never counts as reachable, and you always see how much was measured.
  • Alerts through Sentinel: Outages, expiring certificates and a slow tracker by e-mail, Slack or Teams.

Uptime Monitor checks from your Matomo server whether Matomo itself, its tracker and your websites are reachable, and shows uptime, response times, outages and expiring certificates right in Matomo. The checks never record a visit, and nothing goes to Feinwerk except a feedback vote you choose to give.

Setup

  1. Install Uptime Monitor with one click through the Feinwerk Connector (Administration › Feinwerk Plugins › Discover) or as a ZIP file, as described in Installing plugins, and activate it.
  2. Open Visitors › Uptime. The first check runs within the hour.
  3. For checks every minute, add the cron line shown under Administration › Diagnostic › Uptime Monitor (see below).

Uptime Monitor runs on Matomo 6 and Matomo 5, with PHP 8.1 or later and PHP's curl extension, which Matomo uses as well. The hourly checks run with Matomo's cron job (core:archive) or browser-triggered archiving.

What is checked

Target Address Reachable when
Interface Matomo's login page, index.php?module=Login (index.php with a single sign-on login plugin) Matomo's login page answers (a login host for single sign-on can be set)
Tracker endpoint matomo.php without parameters, so no visit is recorded Matomo's own answer for this address arrives
JavaScript tracker matomo.js the file is Matomo's tracker
Website the website's main address it answers with a success status
Tag Manager container each published web container it is the file of the live version
Tracking proxy found on the website or set by hand it delivers Matomo's tracker or passes on Matomo's own answer

The checks of Matomo's own addresses, the containers and the tracking proxy also look at the content: an error page that answers "200 OK" counts as an outage there. A website address counts as reachable when it answers with a success status. Time without a check counts as "not measured", never as reachable, and uptime always comes with the share of the period that was measured. An address the Matomo server cannot reach itself (a firewall, a private address) shows as "not checkable from this server", not as an outage.

Once a day the plugin reads your websites' tracking code. A tracking proxy on the website's own address is adopted by itself; it counts as an outage only after it once answered. A renamed tracker is suggested to super users. Every address can be changed by hand.

Uptime Monitor measures the tracker's response time on a small sample of real tracking requests, one in 100 by default, with one small database write per sampled request. With the plugin QueuedTracking it shows the time until a request is queued. Certificates are checked for their expiry date, with a warning 14 days before (adjustable).

The screens

  • Visitors › Uptime (everyone who may view the website; anonymous visitors of a public dashboard see only the website's part): Matomo's card first, with uptime, the tracker's response time and the certificate, then the website's addresses, its Tag Manager containers and its tracking proxy, then the outages of the chosen period. Admins of the website change the check targets with Edit check targets and check at once with Check now (once a minute).
  • Dashboard widgets: "Uptime: Matomo" and "Uptime: Website" in the category Uptime.
  • Administration › Diagnostic › Uptime Monitor (super users): all websites in one list, Matomo's own addresses, the cron line and whether alerts go out through Feinwerk Sentinel.

How often it checks

Without a cron job of its own, the checks run once an hour with Matomo's scheduled tasks. For checks every minute, add this line to the crontab of the Matomo server, for the user that runs Matomo's other cron jobs:

* * * * * php /path/to/matomo/console feinwerkuptimemonitor:check

The hourly task then pauses by itself. Every run has a time budget (60 seconds by default, run_budget_seconds) and checks the addresses it could not reach in time first the next time. With browser-triggered archiving, Matomo may run its hourly tasks inside a tracking request, so the hourly check then takes at most 15 seconds. With many websites that covers only part of the addresses per hour; the others then show "no recent check". Use the cron line there.

Settings

Under Administration › System › General settings › Feinwerk Uptime Monitor (super users):

  • Tracker address: only if tracking runs on another address than Matomo, for example a separate tracking host.
  • Login host for single sign-on: only if Matomo sends visitors who are not logged in to another host.
  • Allow private addresses: off by default, so that nobody can use the checks to look into your internal network. When it is on, the admins of every website can have the Matomo server request addresses in your internal network; switch it on only for a Matomo or websites in an intranet. Link-local and cloud metadata addresses stay blocked.
  • Slow tracker from (ms) (default 1000) and Certificate warning (days before expiry) (default 14).

Each setting can also be set in config/config.ini.php, plus these options:

[FeinwerkUptimeMonitor]
run_budget_seconds = 60        ; time budget of one check run
tracker_timing_sample = 100    ; measure 1 in this many tracking requests; 0 switches the measurement off

Certificates are verified like Matomo's own requests: with the file in [General] custom_cacert_pem when it is set (for example behind a proxy that inspects TLS), otherwise with the server's trust store.

allowLoopbackForWebsites = 1 in the same section (config file only, off by default) lets website addresses point to the Matomo server itself (127.0.0.1), for websites hosted on the same server. It lets the admins of every website send requests to services on the Matomo server: set it only when you trust every website admin.

Alerts with Feinwerk Sentinel

With the free plugin Sentinel installed, four checks appear in its settings:

  • U01 Matomo not reachable (Matomo itself),
  • U02 Website not reachable (website, container or tracking proxy, per website),
  • U03 Certificate expires (warning from your setting, critical 3 days before),
  • U04 Slow tracker.

Sentinel sends them by email, Slack or Microsoft Teams. Without a cron job of your own, Uptime Monitor and Sentinel run hourly, so an alert can come up to two hours after an outage began; with the cron line, up to one hour. Alerts about Matomo itself go to the super users chosen in Sentinel's settings, its email addresses for the instance and its instance webhook. When Sentinel reports no visits or fewer visits for a website that is down, the alert says so. A completely stopped Matomo cannot report itself; those hours show as not measured.

API

Every function of the screens is an API method. idSite=0 stands for Matomo itself; with it, getUptime, getResponseTimes and getIncidents take timezoneOf=<idSite> to follow that website's day instead of UTC. Times are ISO 8601 in UTC, response times in milliseconds. Wrong input is answered with HTTP 400 and a message naming the parameter and the allowed values.

Method Example
getStatus ?module=API&method=FeinwerkUptimeMonitor.getStatus&idSite=1&format=json
getUptime ?module=API&method=FeinwerkUptimeMonitor.getUptime&idSite=1&period=month&date=today&format=json
getResponseTimes ?module=API&method=FeinwerkUptimeMonitor.getResponseTimes&idSite=0&period=day&date=today&targetKey=processing&format=json
getIncidents ?module=API&method=FeinwerkUptimeMonitor.getIncidents&idSite=1&period=week&date=today&state=open&format=json
getCertificates ?module=API&method=FeinwerkUptimeMonitor.getCertificates&idSite=1&format=json
getTargets, addTarget, updateTarget, deleteTarget read and change check targets (changes by POST)
detectTargets look for addresses on the website, apply=0 only shows them
checkNow check at once (POST, once a minute)
getSitesOverview all websites (super users)

Feedback and support

Under Visitors › Uptime you can tell us with one click whether the uptime page shows Matomo and your website correctly. Your vote goes from your Matomo server to Feinwerk together with the plugin and Matomo version, your browser family and the interface language, nothing else. To switch the question off:

[FeinwerkUptimeMonitor]
feedback = 0

Support next to it opens the Feinwerk contact form.

Privacy

The checks send requests only to your Matomo and to the addresses of your websites, with the User-Agent FeinwerkUptimeBot, which Matomo's bot detection does not count as a visit. Nothing is sent to Feinwerk unless you answer the feedback question (see Feedback and support). The plugin stores the results of the checks and, for the tracker's response time, the time and duration of sampled tracking requests, never anything about visitors. Raw results are kept 14 days, hourly values 90 days, daily values and outages 400 days.

Technical reference

PropertyValue
Technical nameFeinwerkUptimeMonitor
Current version5.0.1
Matomo≥ 5.0.0, < 7.0.0-b1
PHP≥ 8.1.0
Licensefree
Database changesnone in the current version

FAQ

Is Uptime Monitor free?

Yes. Uptime Monitor is free. Admins and super users see short tips on other Feinwerk offers in the Matomo interface; one line in Matomo's config file switches them off.

Where do I find it?

Under Visitors › Uptime for every website you may view, and in the dashboard widgets "Uptime: Matomo" and "Uptime: Website". Super users find all websites on one page under Administration › Diagnostic › Uptime Monitor.

How often does it check?

Without a cron of its own, once an hour with Matomo's scheduled tasks. With the cron line shown on the administration page, up to every minute. With many websites we recommend the cron line.

Do the checks count as visits?

No. The tracker endpoint is called without parameters, and Matomo does not count the User-Agent `FeinwerkUptimeBot` as a visit. Uptime Monitor measures the tracker's response time on real tracking requests.

What does "not checkable from this server" mean?

The Matomo server cannot reach the address itself, for example because of a firewall or a private address. That is not an outage and does not count into the uptime. For a Matomo in an intranet, super users can allow private addresses.

How do I get alerts?

Install the free plugin Sentinel. Four checks for Matomo, websites, certificates and the tracker appear there, and Sentinel reports them by e-mail, Slack or Teams.

What happens when the Matomo server is down completely?

A server that has stopped completely cannot report itself. The hours without a check show as not measured afterwards, never as reachable.

Which data is stored?

Only the results of the checks and the time and duration of sampled tracking requests, never anything about visitors. Raw results are kept 14 days, hourly values 90 days, daily values and outages 400 days.