zabbix(三)对服务的监控
httpd/nginx
1>给 server2 添加 httpd 监控
但是这个 http 监控的监控项只有一个,下面在 server3 上自定义 nginx 的监控
[root@server3 nginx-1.15.8]
[root@server3 nginx-1.15.8]
启用nginx
关闭日志,只允许本机查看状态监控
[root@server3 conf]
Active connections: 1
server accepts handled requests
222
Reading: 0 Writing: 1 Waiting: 0
多访问几次,增加数据量
2>自定义 nginx 监控项
(1)获取活跃链接数
[root@server3 ~]
1
[root@server3 ~]
[root@server3 zabbix_agentd.d]
[root@server3 zabbix_agentd.d]
UserParameter=nginx.active,curl -s http://127.0.0.1/status | grep Active | awk '{print $3}'
[ro