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:
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):Test, if it was successfull:
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
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#
- Github - WP-CLI
- ChatGPT for helping me to understand the LLD in Zabbix