Skip to main content
  1. Posts/

Zabbix Template: Wordpress Updates

·251 words·2 mins· loading · loading ·
Table of Contents
thetorminal/zabbix-wordpress-updates

Zabbix template for Wordpress update monitoring

Shell
0
0

Description
#

Based on “WP-CLI” (CLI query to check updates): Github - WP-CLI

Shows number of available Wordpress Core, Plugin and Theme updates on a host for all available Wordpress installations at /var/www/*.
LLD (low level discovery) is used inside of a discovery rule to scan all folders at /var/www/*.

Example notification:

wordpress_zabbix_updates

Tested with:

  • Zabbix Server 7.0.8 & 7.2.3
  • zabbix-agent2 (on Debian 12 server)
  • Various Wordpress-Versions

Getting Started
#

Dependencies
#

  • Github - WP-CLI installed on the host (Installation Guide)
  • Zabbix-Server with timeouts set up to 15 seconds! (Timeout=15)
  • Host with zabbix-agent2 and a Wordpress installation

Installing
#

On Zabbix frontend server:
#

  • Download and import the template wordpress-updates.yaml
  • Assign the Template Wordpress Updates to the Wordpress host(s) you want to monitor

On all hosts you want to monitor:
#

Automatically (Bash-Script-Installer):

  • download and run the file installer_wp_updates.sh, which will run all manual steps automatically.

Manual:

  • Install and configure package zabbix-agent2 (if not installed):
    apt-get install zabbix-agent2
    
  • Install WP-CLI: (Installation Guide from WP_CLI):
    curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
    php wp-cli.phar --info
    chmod +x wp-cli.phar
    sudo mv wp-cli.phar /usr/local/bin/wp
    
    Test, if it was successfull:
    wp --info
    
  • download “wp_discovery.sh” to new directory /etc/zabbix/scripts/ and change permission:
    mkdir /etc/zabbix/scripts
    curl -L https://raw.githubusercontent.com/thetorminal/Zabbix-Wordpress-updates/refs/heads/main/wp_discovery.sh -o /etc/zabbix/scripts/wp_discovery.sh
    chown zabbix:zabbix /etc/zabbix/scripts/wp_discovery.sh && chmod 0755 /etc/zabbix/scripts/wp_discovery.sh
    
  • add “wp_updates.conf” to /etc/zabbix/zabbix_agent2.d/:
    curl -L https://raw.githubusercontent.com/thetorminal/Zabbix-Wordpress-updates/refs/heads/main/wp_updates.conf -o /etc/zabbix/zabbix_agent2.d/wp_updates.conf
    
  • restart zabbix-agent2
    systemctl restart zabbix-agent2
    

Version History
#

  • 0.1
    • Initial Release

Acknowledgments
#

torminal
Author
torminal
IT enthusiast

Related

Zabbix Template: Docker Image Updates
257 words·2 mins· loading · loading
Template to monitor the number of available Docker image updates on a host with Zabbix.
Zabbix Template: Drbd
101 words·1 min· loading · loading
Template to display a warning when the primary DRBD host becomes the secondary or the secondary goes offline.
Ansible Wordpress Updates
170 words·1 min· loading · loading
This playbook allows you to update multiple wordpress installations in /var/www