Operations 4 min read

How to Set Up Custom Nginx Monitoring and Triggers in Zabbix 7.2

This guide walks you through installing the Zabbix‑get client, deploying and managing Nginx on a Linux host, creating a shell script for status checks, adding a custom UserParameter, validating the checks from the Zabbix server, and configuring UI items and triggers to monitor Nginx availability.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
How to Set Up Custom Nginx Monitoring and Triggers in Zabbix 7.2

Install zabbix-get

dnf install -y zabbix-get

Install and start Nginx

dnf install -y nginx
systemctl restart nginx
netstat -pltun

Create Nginx monitoring script

#!/bin/bash
if pgrep -x "nginx" > /dev/null
then
  echo 0
else
  echo 1
fi

Add custom key to Zabbix agent configuration

UserParameter=nginx_status,/bin/bash /etc/zabbix/zabbix_agentd.d/nginx_status.sh

Validate monitoring items from the Zabbix server

zabbix_get -s 192.168.25.152 -k agent.ping
zabbix_get -s 192.168.25.152 -k nginx.status

Create Nginx monitoring item and trigger via Zabbix UI

Test trigger by stopping Nginx

systemctl stop nginx
netstat -pltun

Restart Nginx and verify recovery

systemctl start nginx
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

NGINXshell scriptZabbix
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.