WordPress ร— Zabbix

Monitor WordPress
with Zabbix

A full-stack WordPress plugin that exposes 40+ site metrics via a secured REST API and pushes data directly to Zabbix via the Sender protocol โ€” with pre-built graphs, triggers, and a dashboard template.

40+
Metric Items
11
Trigger Rules
6
Pre-built Graphs
8
Metric Groups
Zabbix ยท WordPress Overview
60s
load_time_ms
memory_mb
LIVE
124ms
Load Time
32 MB
Memory
23
DB Queries
Site: UP
OPcache: ON
WP_DEBUG: OFF
Cron: OK
Metric Coverage

40+ Metrics Across 8 Groups

Every metric is exposed via a single REST API call and mapped to a dedicated Zabbix item key. Dependent items extract values from the master JSON payload with zero extra HTTP requests.

โšก
Performance

PHP execution time, memory usage, and WordPress memory limits.

load_time_ms
memory_usage_mb
memory_peak_mb
memory_limit_mb
๐Ÿ—„
Database

Query counts, execution time, slow queries, and database size growth.

query_count
query_time_ms
slow_queries
db_size_mb
autoload_size_kb
๐Ÿ‘ฅ
Users

Registered users, new signups, admin accounts, and active sessions.

total
new_24h
admin_count
active_sessions
๐Ÿ“„
Content

Posts, pages, media library, and comment moderation queue.

published_posts
published_pages
media_files
comments_pending
comments_spam
๐Ÿ”Œ
Plugins

Plugin inventory, update availability, and must-use plugins.

active
inactive
needs_update
mu_plugins
๐Ÿ˜
PHP

PHP version, ini settings, and OPcache efficiency metrics.

version
memory_limit_mb
opcache_enabled
opcache_hit_rate
๐Ÿ’พ
Server

Disk space usage, WP_DEBUG status, and server environment flags.

disk_total_gb
disk_free_gb
disk_used_pct
wp_debug
โฑ
Cron

WP-Cron event counts, overdue jobs, and next scheduled execution.

total_events
overdue_events
next_event_in
Architecture

Built for Production Monitoring

Dual collection modes, a ready-to-import Zabbix template, and a zero-dependency PHP implementation that works on any WordPress 5.9+ installation.

HTTP Agent Pull Mode

Zabbix polls the WordPress REST API using HTTP Agent items. A single master item fetches the full JSON payload; all other items are Dependent Items using JSONPath โ€” one HTTP request per cycle.

Zabbix Sender Push Mode

WordPress pushes metrics to Zabbix via the native Zabbix Sender TCP protocol (port 10051). WP-Cron handles scheduling at configurable intervals from 30 seconds to 1 hour.

Secured REST API

Bearer token authentication with auto-generated 32-character tokens. Optional IP allowlist restricts access to your Zabbix server. Token regeneration available at any time.

Zabbix XML Template

Import-ready XML template for Zabbix 6.0+. Includes 40+ items, 11 triggers with severity levels and dependencies, 6 graphs, and a pre-built WordPress Overview dashboard.

Admin Dashboard Widget

Live metrics widget on the WordPress admin dashboard. Shows performance, database, user, and cron data at a glance with last push status and a direct link to settings.

Configurable Metric Groups

Enable or disable any of the 8 metric groups independently. Disabled groups are excluded from both the REST API response and the Zabbix push payload to reduce overhead.

Installation

Up and Running in Minutes

No agent required on the WordPress server. Just install, configure two macros in Zabbix, and metrics start flowing.

01

Install the Plugin

Upload the plugin ZIP via Plugins โ†’ Add New โ†’ Upload Plugin, or extract the folder to /wp-content/plugins/ and activate.

$ unzip wp-zabbix-monitor.zip -d /var/www/html/wp-content/plugins/
02

Copy Your API Token

Go to Settings โ†’ Zabbix Monitor โ†’ REST API tab. Copy the auto-generated token โ€” you will need it in the Zabbix host macro {$WP_API_TOKEN}.

03

Import the Zabbix Template

In Zabbix: Configuration โ†’ Templates โ†’ Import. Upload the file included in the plugin:

wp-zabbix-monitor/zabbix-template/wordpress-monitoring.xml
04

Create a Zabbix Host

Create a host in Data collection โ†’ Hosts and assign the template WordPress by WP Zabbix Monitor. Set the interface to None (HTTP Agent does not require an agent interface).

05

Set Host Macros

On the host's Macros tab, add:

{$WP_URL} = https://example.com
{$WP_API_TOKEN} = your-token-here
06

(Optional) Enable Push Mode

Under Zabbix Connection tab, enter your Zabbix server hostname and port, set the host name to match Zabbix, enable Push Metrics, and choose a push interval. WordPress will push via TCP port 10051 using WP-Cron.

REST API

Zabbix HTTP Agent Integration

The REST API is the backbone of pull-mode monitoring. Zabbix's HTTP Agent item type polls the endpoint and the master item's JSON is parsed by dependent items using JSONPath.

Endpoints

GET
/wp-json/wpzm/v1/ping
Health check. Returns plugin version and server timestamp.No auth
GET
/wp-json/wpzm/v1/metrics
Full metrics payload for all enabled groups.
GET
/wp-json/wpzm/v1/metrics?groups=performance,database
Filtered payload โ€” only the specified groups.
GET
/wp-json/wpzm/v1/metrics/{group}
Single metric group by name.

Authentication

Pass the API token as a Bearer header or ?token= query parameter:

curl -H "Authorization: Bearer <your-token>" \ "https://example.com/wp-json/wpzm/v1/metrics"

Example Response

200 OKapplication/json
GET /wp-json/wpzm/v1/metrics
{
"timestamp": 1704067200,
"site_url": "https://example.com",
"wp_version": "6.4.2",
"performance": {
"load_time_ms": 124.5,
"memory_usage_mb": 32.4,
"memory_peak_mb": 38.1,
"memory_limit_mb": 256,
"wp_memory_limit_mb": 256
},
"database": {
"query_count": 23,
"query_time_ms": 18.3,
"slow_queries": 0,
"db_size_mb": 45.2,
"autoload_size_kb": 312.8
},
"users": {
"total": 1482,
"new_24h": 7,
"admin_count": 2,
"active_sessions": 34
},
"plugins": {
"active": 18,
"inactive": 3,
"needs_update": 2,
"mu_plugins": 1
}
}
Zabbix Template

Import-Ready XML Template

The bundled Zabbix 6.0+ template includes all items, triggers with dependency chains, pre-built graphs, and a WordPress Overview dashboard โ€” ready to import in one click.

Items

Master HTTP Agent item
Polls REST API every 60s
1
Ping / availability item
Polls every 30s, no auth
1
Dependent metric items
JSONPath from master
38+
Collection mode
HTTP Agent or Trapper
โ€”

Triggers (11)

HIGHSite is unreachable
HIGHPage load time critical (>3000ms)
WARNPage load time elevated (>1000ms)
WARNSlow database queries detected
WARNHigh database query count
HIGHDisk usage critical (>90%)
WARNDisk usage elevated (>80%)
INFOPlugin updates available
WARNCron events overdue
WARNWP_DEBUG enabled in production
WARNPHP OPcache is disabled

Graphs (6)

Performance Overview
load_time_msmemory_usage_mb
Database Activity
query_countquery_time_msslow_queries
User Growth
users.totalusers.new_24h
Disk Usage
disk_used_pctdisk_free_gb
OPcache Hit Rate
opcache_hit_rate
Database Size Growth
db_size_mbautoload_size_kb
๐Ÿ“Š
WordPress Overview Dashboard
Pre-built Zabbix dashboard with all 6 graphs arranged in a 2ร—2 grid. Auto-refreshes every 30 seconds.

Template File Location

# After installing the plugin, the template is at: wp-content/plugins/wp-zabbix-monitor/zabbix-template/wordpress-monitoring.xml # Import via Zabbix UI: Configuration โ†’ Templates โ†’ Import