Zabbix 7.4 on managed MySQL, with alerts that reach the right person
An example of a typical engagement: a monitoring server for a small team running services in the cloud and on-premises, delivered from scratch and handed over with documentation.
- Scope
- New Zabbix server
- Version
- Zabbix 7.4
- Database
- Cloud SQL for MySQL
- Alerts to
- Telegram, email
The situation
The team had no central view of their servers. Problems were discovered when users complained, and the few existing checks were scripts that emailed everyone, so nobody read them anymore.
What was built
- Zabbix server on a small VM with the database on managed MySQL, so backups, patching and storage growth are handled by the cloud provider instead of by hand.
- Agents and templates for Linux hosts, network devices and the web services, with thresholds tuned to the real workload instead of defaults.
- Alert routing: critical problems go to Telegram immediately, lower severities are grouped into an email digest, and an unacknowledged critical alert escalates to a second person.
- Custom checks for things stock templates do not cover, such as an API health endpoint and a backup job that must finish every night.
- Maintenance windows so planned work does not trigger alerts.
A small example: a custom check
Backup freshness is a good case. The backup script writes a timestamp file, and Zabbix alerts if it is older than 26 hours:
UserParameter=backup.age,echo $(( $(date +%s) - $(stat -c %Y /var/backups/last_ok) )) # Trigger last(/db-01/backup.age)>93600
Result
- Problems are seen by the team before users report them.
- Far fewer alerts, because each one has a severity, an owner and a reason to exist.
- The team can add hosts and checks on their own, using the handover notes.
Running something similar?
Send a few lines about your setup and I will tell you what I would do and how long it takes.
contact@techmediaconsulting.com