使用zabbix监控nginx

在zabbix agentd客户端上,查看nginx是否加载了--with-http_stub_status_module。因为zabbix监控nginx是根据 nginx的Stub Status模块,抓取Status模块所提供的数据。假如以前没开启,现在想启用StubStatus 模块,在编译nginx 的时候要加上参数 --with-http_stub_status_module,执行./configure && make就可以了,不用make install。不过,一般情况下都是安装了的。

1.在nginx的配置文件中,添加status配置。

 location/nginx-status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 192.168.1.10; #(zabbix服务器的IP地址,一般是内网地址)
deny all;
}

2.访问设置好的nginx-status链接,如图所示:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcIAAACcCAIAAABjiTwhAAAAA3NCSVQICAjb4U/gAAAgAElEQVR4Xu2dd2AUxffA7y699wRSSIBQQg8ttNB7BwmIFIGINEUpX1QEFQH9AdJEAVFUQEDpvfceeiAkBBLSSCW9Xa7/Zmav397dbu4CCbz5I7mbfTPz3mdm307bG65MJuNAAAJAAAgAgcoS4FU2IaQDAkAACAABTADcKLQDIAAEgIBJBMCNmoQPEgMBIAAEwI1CGwACQAAImEQA3KhJ+CAxEAACQADcKLQBIAAEgIBJBMCNmoQPEgMBIAAEwI1CGwACQAAImEQA3KhJ+CAxEAACQADcKLQBIAAEgIBJBMCNmoQPEgMBIAAEwI1CGwACQAAImEQA3KhJ+CAxEAACQADcKLQBIAAEgIBJBMCNmoQPEgMBIAAEwI1CGwACQAAImEQA3KhJ+CAxEAACQICtG5WkbunI46LQfOUzUZXgE7/cNdqPy3XqtOwRv0oKgEwZE3hr6kKQfGB2qDVut1335TM2HwSBADMCLN2o6MXeX2+RU0diNm+LEzArg15K8HhxMNei99Eircv82H3HMzic0psHrr+S0CeFWDMTeKvrQvjy2PzwkPc2PKyax76ZqwKyq4kE2LlRQfw/mx9xOJYeVhxO0p+/3S+vvMmC53t3J9Ilt28x6cPWtTyDh07p4WNBJwBx5ibw9taFKPP0wh6Nh6y+U+HavJmjublBfkBATgAdacc4lN/53B8lc3//1/kN0H+3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ORCTl8Jz8mnYfM3fd/tVdFB0vy8DJ++7snDcgxN1CkpfyIteq6ZA5W+8++Wdyzz54P7xmsPDqtzYqZteXI1rXtpUVvkzKktXvP2vTzZjds/q1IGtaZgzSwoeHjyVa0g2zi+NPrBjVZdY5vIXUun7EzD7IrfGCxn3azd3Y/jmbhtMPxV7+eXqfEE809EbJ7XxbDf7896gn/35Yl+kcpkOzkZ3JSN2u8yiavUzWQf0GUC8j1OnfnWwoNTlw3ftuvLz9kx51HTml6clppW4t29Riqq3hwqsEsuEimV2tNGRW7ZlWlxpG2xxNmpZDjYys2U8Bc2svLbj0Gfbidh0X7LmPXvWXvzQpEZblvri5dWIArmLrfgd03o43tx5vdX4A+XVWL9B+DbSZvFP/GtSoJkWgX/HsgjuWNKNipKHi59Q0Jxyqieo1Rw2A/DrrCmi/DtqmDeprZP/bgNLi/ORsNOLmuvm76m5ukpUmxWSjxJY+AdTvqBrICC7pJwCQ9bMx/xWgbX6mujmCG1VnYlWrZUO0eCW7umzVhSz1TarSkufHvh8z4SDaj+A4cFoX9S2bukwhxiABgGwQj5kvAm0zA6XNjou6vLQX3tHI8ugfe7ZbGEV+C8WvaYu6HjayiqKspLjEV8SrWreac/j0qv7V+gWh6l9zAPl11hHQrnra4Ea1GcvKnx9dv2LjnjM3H6cVU9skLZ1qBzdv323gmI8+HtXWy8gLR9r5wXcaAgCZBkqVRQHtKkMrzxjcaFUThvyBABB4ywnA3OhbXsFgHhAAAlVNANxoVROG/IEAEHjLCYAbfcsrGMwDAkCgqgmAG61qwpA/EAACbzkBcKNveQWDeUAACFQ1AXCjVU0Y8gcCQOAtJwBu9C2vYDAPCACBqiYAbrSqCUP+QAAIvOUE/h/KmO+Cl3OcCAAAAABJRU5ErkJggg==" alt="" />

3.nginx Status 详细说明:

Active connections:对后端发起的活动连接数;

server accepts 2349542:nginx 总共处理了2349542个连接;

handled:成功创建了64603417次握手;

requests:总共处理了8798670请求。

Reading:nginx读取客户端的header数;

Writing: nginx 返回给客户端的header数;

Waiting: nginx 请求处理完成,正在等待下一请求指令的连接。

4.在agentd上编写监控nginx的脚本,并且设置属主和属组为zabbix,赋予执行权限。

 cd /usr/local/zabbix/scripts
cat nginx_status.sh
#!/bin/bash
# Script to fetch nginx statuses for tribily monitoring systems
# Author: krish@toonheart.com
# License: GPLv2
# Set Variables
BKUP_DATE=`/bin/date +%Y%m%d`
LOG="/data/log/zabbix/webstatus.log"
HOST=127.0.0.1
PORT=""
# Functions to return nginx stats
function active {
/usr/bin/curl "http://$HOST:$PORT/nginx-status" >/dev/null| grep 'Active' | awk '{print $NF}'
}
function reading {
/usr/bin/curl "http://$HOST:$PORT/nginx-status" >/dev/null| grep 'Reading' | awk '{print $2}'
}
function writing {
/usr/bin/curl "http://$HOST:$PORT/nginx-status" >/dev/null| grep 'Writing' | awk '{print $4}'
}
function waiting {
/usr/bin/curl "http://$HOST:$PORT/nginx-status" >/dev/null| grep 'Waiting' | awk '{print $6}'
}
function accepts {
/usr/bin/curl "http://$HOST:$PORT/nginx-status" >/dev/null| awk NR== | awk '{print $1}'
}
function handled {
/usr/bin/curl "http://$HOST:$PORT/nginx-status" >/dev/null| awk NR== | awk '{print $2}'
}
function requests {
/usr/bin/curl "http://$HOST:$PORT/nginx-status" >/dev/null| awk NR== | awk '{print $3}'
}
# Run the requested function
$
chmod o+x nginx_status.sh
chown zabbix.zabbix nginx_status.sh
ll
total
-rwxr-xr-x zabbix zabbix May : nginx_status.sh
上一篇:Arduino 入门程序示例之一个 LED(2015-06-11)


下一篇:数据集分享*cifar-10 cifar-100 猫狗 康奈尔抓取数据集**