Case Study

Five monitoring checks could not see anything, and the test we ran as root said they worked

We put monitoring on a customer’s WordPress server and read every new check back before trusting it. Five of them, the ones that watch the web server, PHP, the database, cron and certificate renewal, were reporting nothing. The cause was SELinux: the monitoring agent was not allowed to ask systemd about services, and it left no trace in the audit log. A hand test passed only because it ran as root. We swapped the five checks for ones the agent can read, proved each one before switching its alerts on, and had the server fully covered within nine minutes of starting.

October 2026  ·  4 min read

SECTOR

Organisation running its main website on a dedicated server

SCALE

New monitoring for a WordPress server

PLATFORM

Oracle Linux 10 with SELinux enforcing, nginx, PHP-FPM 8.4, MariaDB 10.11, Zabbix 7.4

ENGAGEMENT

Silent monitoring gap, caught on the first read-back

5 checks

Reporting nothing on the first read-back, each one a core service

73 / 0

Monitoring items after the fix, and how many of them were unsupported

9 minutes

From starting the setup to every check proven and every alert enabled

Environment

Two ways to test a monitoring checkRun as root from a shell, the Zabbix agent test can read systemd unit state and passes. Run as the agent service under SELinux, the same check is denied and the item becomes unsupported, with nothing in the audit log. Replacing the checks with process counts gave readings the agent can take.The same check, run two waysRoot shellzabbix_agent2 -tunconfinedsystemd.unit.infotest passeslooks fineAgent serviceconfined by SELinuxenforcingsystemd.unit.infoUNSUPPORTED × 5no audit log entryproc.num checksall four read 1then triggers enabledOnly the bottom row is what monitoring actually does.

Scroll the diagram sideways to see all of it →

A test that runs with more rights than the real thing proves nothing about the real thing.

The problem

A server with no monitoring at all. The server had no agent, no monitoring configuration and nothing listening for a monitoring server. We set it up with a script that can be re-run safely: a host and group in Zabbix, checks on the site’s certificate with alerts at 21 days, at 7 days and if it ever becomes invalid, a web scenario that loads the homepage and the contact page with strict TLS, and Zabbix Agent 2 in active mode so the server only connects out. The setup also added checks for the services that matter here: nginx, PHP-FPM, MariaDB, cron and the certificate renewal timer, all read through systemd.unit.info.

Investigation

Read every check back before trusting it. Monitoring that has never fired is easy to mistake for monitoring that works, so the last step of every setup is to read back what each item actually returns. On the first read-back, 60 items existed and 26 had reported data so far. Five were marked unsupported, every one of the systemd.unit.info checks, with the same error: Cannot get unit property: SELinux policy denies access: Permission denied. Nothing was written to the SELinux audit log. A hand test of the same keys with zabbix_agent2 -t passed. That test ran as root, unconfined. The real agent runs as a confined service, and SELinux does not let it ask systemd about other units.

The hand test passed because it ran as root. The real agent never runs as root, so the test proved nothing about it.

What we did not do

Replace the checks rather than loosen the policy. One option was a custom SELinux module letting the agent query systemd. We did not write one, and we did not chase why the denial left no audit entry. Process checks answer the question that matters for these services, is it running or not, with access the agent already has and no change to the server’s policy. The trade-off is real: a process count cannot read systemd’s own view of a unit, and a timer has no process at all.

At a glance

Challenge

New monitoring on an Oracle Linux 10 WordPress server: five service checks returned nothing, while a root test of the same checks passed.

Approach

SELinux stopped the confined agent from reading systemd unit state, without an audit log entry. The root test bypassed the confinement.

Result

Five unit checks replaced by four process checks, each proven before its alert went live. 73 items, 0 unsupported.

The fix

  1. Remove the blind checks: the five systemd.unit.info items deleted
  2. Count the processes instead: proc.num[nginx,,,nginx: master process], proc.num[php-fpm,,,php-fpm: master process], proc.num[mariadbd] and proc.num[crond]
  3. Create the triggers switched off, and enable them only after all four checks returned 1, so no alert could fire on an unproven reading
  4. Cover the renewal timer another way: it has no process to count, so the certificate expiry alerts at 21 and 7 days do the job
  5. Prove the certificate check end to end: interval dropped to one minute, the reading came back valid with 89 days left, interval set back to one hour

Outcome

Every check returns data, and every alert has been seen to work. After the fix the host had 73 items, none unsupported, no open problems, and 9 relevant triggers enabled and in the OK state. The whole setup, including finding and fixing the blind checks, took nine minutes. Not included on purpose: log monitoring, which was left out for the customer’s privacy, and deeper MariaDB and nginx statistics. Any other server with SELinux enforcing that uses the same unit checks may have the same blind spot, and it will not show unless someone reads the items back. The lesson we take: never accept a monitoring check until you have seen it return a real value from the real agent, and treat a test run as root as no test at all.

More case studies

nginx Open Files Limit Under SELinux

1,024 → 65,000 open files per worker, verified live

SELinux Enforcing Broke the Database Connection

500 → 200 homepage with SELinux enforcing

PHP Update Broke the Control Panel

200 → 500 → 200 control panel, same configuration

Is your monitoring watching, or just switched on?

We set up monitoring that is proven check by check, so an alert you never see means nothing is wrong.