Back to blog

Shopware

FroshTools Health in Zabbix: our new open-source template

By Rune Laenen 3 min read

If you work with Shopware, you probably know FroshTools, the plugin by Friends of Shopware. It runs on almost every shop we manage. One of its most useful parts is the Health status card in the admin. At a glance, it shows whether your PHP version is still supported, whether the message queue is stuck, whether scheduled tasks are still running and whether your MySQL settings are right.

The problem is that the card only tells something to whoever opens it. And nobody opens the admin of every shop each morning to check that everything is still green. A stuck queue or a scheduled task that hasn't run in days only gets noticed once something else starts to break: emails that don't go out, an index that stops updating, a sitemap that goes stale.

That's why we built a Zabbix template that follows up on those health checks automatically. It's open source on GitHub: runelaenen/FroshToolsZabbix.

Why not just monitor the server?

We do that too, but it isn't enough. CPU, memory, disk and uptime tell you whether the server is technically fine. They don't tell you whether Shopware is doing its job. A shop can be perfectly reachable and return an HTTP 200 while the queue hasn't processed anything for hours.

That knowledge is already built into FroshTools. The plugin knows which checks exist, what the recommended value is and what the current value is. Rebuilding all of that in Zabbix seemed like a waste. So we simply read what FroshTools already calculates.

It's the same idea as our product feed monitoring: don't just check whether something is reachable, check whether it does what it should.

What you need

Component Version
Zabbix server / proxy 7.0 or newer
Shopware 6.6 or 6.7
FroshTools 3.x, with the /health/status endpoint

Set up in five minutes

The full steps are in the README, but in short:

  1. Install FroshTools in Shopware, if you haven't already.
  2. Create a read-only role with only the Frosh Tools → Viewer permission.
  3. Create an integration with that role. Note down the access key ID and the secret.
  4. Import our template in Zabbix.
  5. Create a host, link the template and fill in the three macros: {$SHOPWARE.URL}, {$SHOPWARE.CLIENT_ID} and {$SHOPWARE.CLIENT_SECRET}.

Silencing checks

Not every warning is a problem. Sometimes a shop deliberately runs a distro PHP build that does include the security fixes, even though the version number looks old. You don't want a check like that popping up every five minutes.

There are two ways to handle this. We prefer doing it in FroshTools itself, because the decision is then documented in the shop:

frosh_tools:
    checker:
        acknowledged_checks:
            php-version: "Distro PHP build includes the security fixes"
        disabled_checks:
            - system-time

An acknowledged check drops to INFO, with a required reason. Our integration then no longer raises a problem for it. A disabled check disappears completely, and Zabbix simply disables its items.

If you can't or don't want to touch the shop config, you can also configure this in Zabbix by setting the {$FROSH.CHECK.NOT_MATCHES} macro to a regex of check ids, for example ^(system-time|queue)$.

Open source, and contributions are welcome

We published the template under the MIT license on GitHub. We use it ourselves on the client shops we manage. Run into something, or have an improvement? Feel free to open an issue or pull request.

Want someone to keep an eye on your Shopware shop's monitoring, without running a Zabbix server yourself? Take a look at Care, or get in touch and we'll figure out together what your shop needs.

Let's talk

Have an e-commerce project in mind?

We're a boutique e-commerce agency. Tell us what you're building and we'll help you move faster.