Introduction to Zabbix host monitoring on OpenWrt
A short guide to getting started with network host monitoring using Zabbix server, frontend and agent on OpenWrt, for advanced users
The resulting system
- An Zabbix server and frontend system running on OpenWrt which also hosts the backend PostgreSQL database.
- The system also monitors itself using Zabbix Agent.
- Secured using TLS and X.509 certificates.
- Data is stored on a block device mounted on
/srv
Prerequisites
A sufficiently powerful system for the number of hosts you wish to monitor.
- A home router is unlikely to do the job.
- You need storage that can be written frequently as there are many metrics which gathered, often.
- In addition the metrics are stored in a PostgreSQL database (which, in this guide runs on the same machine as the Zabbix server and frontend).
- You needs lots of storage for the data. You could easily use 200GB over time.
Hosts (workstations and/or servers) and/or network devices to monitor.
A workstation which can use the OpenWrt ImageBuilder to generate the images to be used on the OpenWrt Zabbix system. For example, a modern Linux system, or a Windows system with WSL2 installed and working.
A workstation capable of SSH to, and browsing, the Zabbix server.
Steps
- Create the firmware image
- Prepare storage
- Configure database storage and logging
- Configure Apache and PHP
- Configure Zabbix Server
- Configure Zabbix Agent