时间:2023-06-11 17:03:01 | 来源:网站运营
时间:2023-06-11 17:03:01 来源:网站运营
第十五篇:zabbix使用模板监控nginx:[root@web01 ~]# yum install -y nginx[root@web01 ~]# vim /etc/nginx/nginx.conf..... include /etc/nginx/default.d/*.conf; location / { } location /nginx_status { stub_status; } error_page 404 /404.html; location = /404.html { }... [root@web01 ~]# [root@web01 ~]# systemctl start nginx.service [root@web01 ~]# systemctl enable nginx.service http://10.0.0.7/nginx_statusActive connections(活动连接数): 2 server accepts(接受的) handled(已处理) requests(接收到的请求) 2 2 2 Reading: 0 Writing: 1 Waiting: 1 [root@web01 ~]# curl http://127.0.0.1/nginx_status[root@web01 ~]# curl http://127.0.0.1/nginx_status 2>/dev/null|awk 'NR==1{print $NF}'。。。[root@web01 ~]# systemctl restart zabbix-agent.service [root@zabbix ~]# zabbix_get -s 10.0.0.7 -k nginx_status[active]关键词:模板,使用