In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to achieve zabbix custom monitoring nginx status". In daily operation, I believe many people have doubts about how to achieve zabbix custom monitoring nginx status. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to achieve zabbix custom monitoring nginx status". Next, please follow the editor to study!
Zabbix Custom Monitoring nginx status
Zabbix_server192.168.200.145zabbix_agentd, nginx192.168.200.1461. Open the status interface
Enable status:
[root@localhost ~] # vim / usr/local/nginx/conf/nginx.conflocation / status {stub_status on; allow 192.168.200.146; allow 192.168.200.145 deny all;} [root@localhost ~] # nginx-s reload
Detailed information on the status page:
The meaning indicated by the status code Active connections 2 how many connections have been handled by all the open connections accepts successfully created how many handshakes requests have processed the total number of requests Readingnginx read the number of Header messages from the client, indicating the number of connections that are in the state of receiving requests the number of Header messages returned by Writingnginx to the client, indicating that the request has been received And the number of connections in the process of processing the request or sending the response Waiting turns on keep-alive, this value is equal to active-(reading + writing), which means that Nginx has finished processing the resident connection 2 waiting for the next request instruction. Write the monitoring script [root@localhost scripts] # vim checkstatus.shallows! / bin/baship=$ (ip a | grep 'inet' | grep-v '127.0.0.1' | awk-F' [/] +'{print $3}') case $1 in "Reading") curl-s http://$ip | awk 'NR==4 {print $2}';; "Writing") curl-s http://$ip | awk 'NR==4 {print $4}' "Waiting") curl-s http://$ip | awk 'NR==4 {print $6}' esac// add profile [root@localhost scripts] # vim / usr/local/etc/zabbix_agentd.confUnsafeUserParameters=1UserParameter=check_status [*], / bin/bash / scripts/check_Reading.sh $1 [root@localhost scripts] # pkill zabbix_agentd [root@localhost scripts] # zabbix_agentd / / Test [root@zabbix] # zabbix_get-s 192.168.200.146-k check_status Waiting13. Configure monitoring items
4. Configure trigger
5. Test [root@localhost scripts] # ab-n 1500000 http://192.168.200.146/status
At this point, the study on "how to implement zabbix custom monitoring nginx status" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.