How to Set Up Custom Nginx Monitoring and Triggers in Zabbix 7.2
This guide walks you through installing the zabbix-get service, deploying and starting Nginx, creating a Bash script for status checks, adding a custom UserParameter, validating the items on the Zabbix server, and configuring UI items and triggers to monitor Nginx health.
zabbix7.2 latest version nginx custom monitoring – set trigger
Install zabbix-get service
dnf install -y zabbix-getInstall and start Nginx
dnf install -y nginx
systemctl restart nginx
netstat -pltunNginx monitoring script
#!/bin/bash
if pgrep -x "nginx" > /dev/null
then
echo 0
else
echo 1
fiAdd custom key configuration
UserParameter=nginx_status,/bin/bash /etc/zabbix/zabbix_agentd.d/nginx_status.shValidate on Zabbix server
zabbix_get -s 192.168.25.152 -k agent.ping
zabbix_get -s 192.168.25.152 -k nginx.statusCreate Nginx monitoring item in UI
Set Nginx trigger
Stop Nginx to see monitoring change
systemctl stop nginx
netstat -pltunStart Nginx to restore normal state
systemctl start nginxSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Raymond Ops
Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
