案例:zabbix 配置 nginx 監控
1. 修改配置文件
vim?/usr/local/nginx/conf/nginx.conf ?location?/nginx_status?{ ????????????????stub_status; ????????} 說明: nginx_status 自定義字段,訪問地址(例:192.168.169.131/nginx_status) stub_status 固定參數 #?重啟?nginx ./nginx?reload
瀏覽器訪問狀態說明: Active?connections??Nginx正處理的活動鏈接數個數;重要 server??????????????Nginx啟動到現在共處理了多少個連接。 accepts?????????????Nginx啟動到現在共成功創建幾次握手。 handled?requests????Nginx總共處理了幾次請求。 Reading?????????????Nginx讀取到客戶端的?Header?信息數。 Writing?????????????Nginx返回給客戶端的?Header?信息數。 Waiting?????????????Nginx已經處理完正在等候下一次請求指令的駐留鏈接,開啟。 Keep-alive的情況下,Waiting這個值等于active-(reading?+?writing)。 請求丟失數=(握手數-連接數)可以看出,本次狀態顯示沒有丟失請求
2. 編寫 nginx 監控腳本
#/bin/bash #Description:Automated?monitoring?nginx?performance?and?process?nginx_status?scripts NGINX_PORT=80? NGINX_COMMAND=$1 nginx_ping(){ ????/sbin/pidof?nginx?|wc?-l ????} nginx_active(){ ????/usr/bin/curl?-s?"http://127.0.0.1:"$NGINX_PORT"/nginx_status/"?|awk?'/Active/?{print?$NF}' ????} nginx_reading(){ ????/usr/bin/curl?-s?"http://127.0.0.1:"$NGINX_PORT"/nginx_status/"?|awk?'/Reading/?{print?$2}' ????} nginx_writing(){ ????/usr/bin/curl?-s?"http://127.0.0.1:"$NGINX_PORT"/nginx_status/"?|awk?'/Writing/?{print?$4}' ????} nginx_waiting(){ ????/usr/bin/curl?-s?"http://127.0.0.1:"$NGINX_PORT"/nginx_status/"?|awk?'/Waiting/?{print?$6}' ????} nginx_accepts(){ ????/usr/bin/curl?-s?"http://127.0.0.1:"$NGINX_PORT"/nginx_status/"?|awk?'NR==3?{print?$1}' ????} nginx_handled(){ ????/usr/bin/curl?-s?"http://127.0.0.1:"$NGINX_PORT"/nginx_status/"?|awk?'NR==3?{print?$2}' ????} nginx_requests(){ ????/usr/bin/curl?-s?"http://127.0.0.1:"$NGINX_PORT"/nginx_status/"?|awk?'NR==3?{print?$3}' ????} case?$NGINX_COMMAND?in ????ping) ????????nginx_ping ????????;; ????active) ????????nginx_active ????????;; ????reading) ????????nginx_reading ????????;; ????writing) ????????nginx_writing ????????;; ????waiting) ????????nginx_waiting ????????;; ????accepts) ????????nginx_accepts ????????;; ????handled) ????????nginx_handled ????????;; ????requests) ????????nginx_requests ????????;; ????*) ????????echo?$"USAGE:$0?{ping|active|reading|writing|waiting|accepts|handled|requests}" esac
#?修改文件權限 chmod?u+x?/etc/zabbix/zabbix_agentd.d/zabbix_nginx.sh
3. 修改 zabbix 配置文件
vim?/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf #?增加 UserParameter=nginx_status[*],/bin/bash?/etc/zabbix/zabbix_agentd.d/zabbix_nginx.sh?$1
#?修改完成重啟?zabbix-agent systemctl?restart?zabbix-agent.service
4. 服務端驗證
[root@zabbix?~]#?zabbix_get?-s?192.168.169.131?-k?nginx_status[active]
5. 添加模塊
模塊名稱:Template Nginx Web Status Monitor(自定義)
可見名稱:NGINX STATUS MONITOR(自定義)
6. 創建應用集
名稱:NGINX_STATUS
7. 創建監控項
名稱:Nginx_Status_Ping
鍵值:nginx_status[ping]
8. 定義觸發器
超過50個并發連接就執行報警
nginx 服務down了執行報警
9. 關聯主機
將需要監控的主機添加上此模板
10. nginx 模板文件
zbx_export_templates.xml
<?xml version="1.0" encoding="UTF-8"?><zabbix_export> ????<version>4.0</version> ????<date>2022-05-21T12:29:43Z</date> ????<groups> ????????<group> ????????????<name>Linux?servers</name> ????????</group> ????</groups> ????<templates> ????????<template> ????????????<template>Template?Nginx?Web?Status?Monitor</template> ????????????<name>NGINX?STATUS?MONITOR</name> ????????????<description></description> ????????????<groups> ????????????????<group> ????????????????????<name>Linux?servers</name> ????????????????</group> ????????????</groups> ????????????<applications> ????????????????<application> ????????????????????<name>NGINX_STATUS</name> ????????????????</application> ????????????</applications> ????????????<items> ????????????????<item> ????????????????????<name>Nginx_Status_accepts</name> ????????????????????<type>0</type> ????????????????????<snmp_community></snmp_community> ????????????????????<snmp_oid></snmp_oid> ????????????????????<key>nginx_status[accepts]</key> ????????????????????<delay>30s</delay> ????????????????????<history>90d</history> ????????????????????<trends>365d</trends> ????????????????????<status>0</status> ????????????????????<value_type>3</value_type> ????????????????????<allowed_hosts></allowed_hosts> ????????????????????<units></units> ????????????????????<snmpv3_contextname></snmpv3_contextname> ????????????????????<snmpv3_securityname></snmpv3_securityname> ????????????????????<snmpv3_securitylevel>0</snmpv3_securitylevel> ????????????????????<snmpv3_authprotocol>0</snmpv3_authprotocol> ????????????????????<snmpv3_authpassphrase></snmpv3_authpassphrase> ????????????????????<snmpv3_privprotocol>0</snmpv3_privprotocol> ????????????????????<snmpv3_privpassphrase></snmpv3_privpassphrase> ????????????????????<params></params> ????????????????????<ipmi_sensor></ipmi_sensor> ????????????????????<authtype>0</authtype> ????????????????????<username></username> ????????????????????<password></password> ????????????????????<publickey></publickey> ????????????????????<privatekey></privatekey> ????????????????????<port></port> ????????????????????<description></description> ????????????????????<inventory_link>0</inventory_link> ????????????????????<applications> ????????????????????????<application> ????????????????????????????<name>NGINX_STATUS</name> ????????????????????????</application> ????????????????????</applications> ????????????????????<valuemap></valuemap> ????????????????????<logtimefmt></logtimefmt> ????????????????????<preprocessing></preprocessing> ????????????????????<jmx_endpoint></jmx_endpoint> ????????????????????<timeout>3s</timeout> ????????????????????<url></url> ????????????????????<query_fields></query_fields> ????????????????????<posts></posts> ????????????????????<status_codes>200</status_codes> ????????????????????<follow_redirects>1</follow_redirects> ????????????????????<post_type>0</post_type> ????????????????????<http_proxy></http_proxy> ????????????????????<headers></headers> ????????????????????<retrieve_mode>0</retrieve_mode> ????????????????????<request_method>0</request_method> ????????????????????<output_format>0</output_format> ????????????????????<allow_traps>0</allow_traps> ????????????????????<ssl_cert_file></ssl_cert_file> ????????????????????<ssl_key_file></ssl_key_file> ????????????????????<ssl_key_password></ssl_key_password> ????????????????????<verify_peer>0</verify_peer> ????????????????????<verify_host>0</verify_host> ????????????????????<master_item></master_item> ????????????????</item> ????????????????<item> ????????????????????<name>Nginx_Status_active</name> ????????????????????<type>0</type> ????????????????????<snmp_community></snmp_community> ????????????????????<snmp_oid></snmp_oid> ????????????????????<key>nginx_status[active]</key> ????????????????????<delay>30s</delay> ????????????????????<history>90d</history> ????????????????????<trends>365d</trends> ????????????????????<status>0</status> ????????????????????<value_type>3</value_type> ????????????????????<allowed_hosts></allowed_hosts> ????????????????????<units></units> ????????????????????<snmpv3_contextname></snmpv3_contextname> ????????????????????<snmpv3_securityname></snmpv3_securityname> ????????????????????<snmpv3_securitylevel>0</snmpv3_securitylevel> ????????????????????<snmpv3_authprotocol>0</snmpv3_authprotocol> ????????????????????<snmpv3_authpassphrase></snmpv3_authpassphrase> ????????????????????<snmpv3_privprotocol>0</snmpv3_privprotocol> ????????????????????<snmpv3_privpassphrase></snmpv3_privpassphrase> ????????????????????<params></params> ????????????????????<ipmi_sensor></ipmi_sensor> ????????????????????<authtype>0</authtype> ????????????????????<username></username> ????????????????????<password></password> ????????????????????<publickey></publickey> ????????????????????<privatekey></privatekey> ????????????????????<port></port> ????????????????????<description></description> ????????????????????<inventory_link>0</inventory_link> ????????????????????<applications> ????????????????????????<application> ????????????????????????????<name>NGINX_STATUS</name> ????????????????????????</application> ????????????????????</applications> ????????????????????<valuemap></valuemap> ????????????????????<logtimefmt></logtimefmt> ????????????????????<preprocessing></preprocessing> ????????????????????<jmx_endpoint></jmx_endpoint> ????????????????????<timeout>3s</timeout> ????????????????????<url></url> ????????????????????<query_fields></query_fields> ????????????????????<posts></posts> ????????????????????<status_codes>200</status_codes> ????????????????????<follow_redirects>1</follow_redirects> ????????????????????<post_type>0</post_type> ????????????????????<http_proxy></http_proxy> ????????????????????<headers></headers> ????????????????????<retrieve_mode>0</retrieve_mode> ????????????????????<request_method>0</request_method> ????????????????????<output_format>0</output_format> ????????????????????<allow_traps>0</allow_traps> ????????????????????<ssl_cert_file></ssl_cert_file> ????????????????????<ssl_key_file></ssl_key_file> ????????????????????<ssl_key_password></ssl_key_password> ????????????????????<verify_peer>0</verify_peer> ????????????????????<verify_host>0</verify_host> ????????????????????<master_item></master_item> ????????????????</item> ????????????????<item> ????????????????????<name>Nginx_Status_handled</name> ????????????????????<type>0</type> ????????????????????<snmp_community></snmp_community> ????????????????????<snmp_oid></snmp_oid> ????????????????????<key>nginx_status[handled]</key> ????????????????????<delay>30s</delay> ????????????????????<history>90d</history> ????????????????????<trends>365d</trends> ????????????????????<status>0</status> ????????????????????<value_type>3</value_type> ????????????????????<allowed_hosts></allowed_hosts> ????????????????????<units></units> ????????????????????<snmpv3_contextname></snmpv3_contextname> ????????????????????<snmpv3_securityname></snmpv3_securityname> ????????????????????<snmpv3_securitylevel>0</snmpv3_securitylevel> ????????????????????<snmpv3_authprotocol>0</snmpv3_authprotocol> ????????????????????<snmpv3_authpassphrase></snmpv3_authpassphrase> ????????????????????<snmpv3_privprotocol>0</snmpv3_privprotocol> ????????????????????<snmpv3_privpassphrase></snmpv3_privpassphrase> ????????????????????<params></params> ????????????????????<ipmi_sensor></ipmi_sensor> ????????????????????<authtype>0</authtype> ????????????????????<username></username> ????????????????????<password></password> ????????????????????<publickey></publickey> ????????????????????<privatekey></privatekey> ????????????????????<port></port> ????????????????????<description></description> ????????????????????<inventory_link>0</inventory_link> ????????????????????<applications> ????????????????????????<application> ????????????????????????????<name>NGINX_STATUS</name> ????????????????????????</application> ????????????????????</applications> ????????????????????<valuemap></valuemap> ????????????????????<logtimefmt></logtimefmt> ????????????????????<preprocessing></preprocessing> ????????????????????<jmx_endpoint></jmx_endpoint> ????????????????????<timeout>3s</timeout> ????????????????????<url></url> ????????????????????<query_fields></query_fields> ????????????????????<posts></posts> ????????????????????<status_codes>200</status_codes> ????????????????????<follow_redirects>1</follow_redirects> ????????????????????<post_type>0</post_type> ????????????????????<http_proxy></http_proxy> ????????????????????<headers></headers> ????????????????????<retrieve_mode>0</retrieve_mode> ????????????????????<request_method>0</request_method> ????????????????????<output_format>0</output_format> ????????????????????<allow_traps>0</allow_traps> ????????????????????<ssl_cert_file></ssl_cert_file> ????????????????????<ssl_key_file></ssl_key_file> ????????????????????<ssl_key_password></ssl_key_password> ????????????????????<verify_peer>0</verify_peer> ????????????????????<verify_host>0</verify_host> ????????????????????<master_item></master_item> ????????????????</item> ????????????????<item> ????????????????????<name>Nginx_Status_Ping</name> ????????????????????<type>0</type> ????????????????????<snmp_community></snmp_community> ????????????????????<snmp_oid></snmp_oid> ????????????????????<key>nginx_status[ping]</key> ????????????????????<delay>30s</delay> ????????????????????<history>90d</history> ????????????????????<trends>365d</trends> ????????????????????<status>0</status> ????????????????????<value_type>3</value_type> ????????????????????<allowed_hosts></allowed_hosts> ????????????????????<units></units> ????????????????????<snmpv3_contextname></snmpv3_contextname> ????????????????????<snmpv3_securityname></snmpv3_securityname> ????????????????????<snmpv3_securitylevel>0</snmpv3_securitylevel> ????????????????????<snmpv3_authprotocol>0</snmpv3_authprotocol> ????????????????????<snmpv3_authpassphrase></snmpv3_authpassphrase> ????????????????????<snmpv3_privprotocol>0</snmpv3_privprotocol> ????????????????????<snmpv3_privpassphrase></snmpv3_privpassphrase> ????????????????????<params></params> ????????????????????<ipmi_sensor></ipmi_sensor> ????????????????????<authtype>0</authtype> ????????????????????<username></username> ????????????????????<password></password> ????????????????????<publickey></publickey> ????????????????????<privatekey></privatekey> ????????????????????<port></port> ????????????????????<description></description> ????????????????????<inventory_link>0</inventory_link> ????????????????????<applications> ????????????????????????<application> ????????????????????????????<name>NGINX_STATUS</name> ????????????????????????</application> ????????????????????</applications> ????????????????????<valuemap></valuemap> ????????????????????<logtimefmt></logtimefmt> ????????????????????<preprocessing></preprocessing> ????????????????????<jmx_endpoint></jmx_endpoint> ????????????????????<timeout>3s</timeout> ????????????????????<url></url> ????????????????????<query_fields></query_fields> ????????????????????<posts></posts> ????????????????????<status_codes>200</status_codes> ????????????????????<follow_redirects>1</follow_redirects> ????????????????????<post_type>0</post_type> ????????????????????<http_proxy></http_proxy> ????????????????????<headers></headers> ????????????????????<retrieve_mode>0</retrieve_mode> ????????????????????<request_method>0</request_method> ????????????????????<output_format>0</output_format> ????????????????????<allow_traps>0</allow_traps> ????????????????????<ssl_cert_file></ssl_cert_file> ????????????????????<ssl_key_file></ssl_key_file> ????????????????????<ssl_key_password></ssl_key_password> ????????????????????<verify_peer>0</verify_peer> ????????????????????<verify_host>0</verify_host> ????????????????????<master_item></master_item> ????????????????</item> ????????????????<item> ????????????????????<name>Nginx_Status_reading</name> ????????????????????<type>0</type> ????????????????????<snmp_community></snmp_community> ????????????????????<snmp_oid></snmp_oid> ????????????????????<key>nginx_status[reading]</key> ????????????????????<delay>30s</delay> ????????????????????<history>90d</history> ????????????????????<trends>365d</trends> ????????????????????<status>0</status> ????????????????????<value_type>3</value_type> ????????????????????<allowed_hosts></allowed_hosts> ????????????????????<units></units> ????????????????????<snmpv3_contextname></snmpv3_contextname> ????????????????????<snmpv3_securityname></snmpv3_securityname> ????????????????????<snmpv3_securitylevel>0</snmpv3_securitylevel> ????????????????????<snmpv3_authprotocol>0</snmpv3_authprotocol> ????????????????????<snmpv3_authpassphrase></snmpv3_authpassphrase> ????????????????????<snmpv3_privprotocol>0</snmpv3_privprotocol> ????????????????????<snmpv3_privpassphrase></snmpv3_privpassphrase> ????????????????????<params></params> ????????????????????<ipmi_sensor></ipmi_sensor> ????????????????????<authtype>0</authtype> ????????????????????<username></username> ????????????????????<password></password> ????????????????????<publickey></publickey> ????????????????????<privatekey></privatekey> ????????????????????<port></port> ????????????????????<description></description> ????????????????????<inventory_link>0</inventory_link> ????????????????????<applications> ????????????????????????<application> ????????????????????????????<name>NGINX_STATUS</name> ????????????????????????</application> ????????????????????</applications> ????????????????????<valuemap></valuemap> ????????????????????<logtimefmt></logtimefmt> ????????????????????<preprocessing></preprocessing> ????????????????????<jmx_endpoint></jmx_endpoint> ????????????????????<timeout>3s</timeout> ????????????????????<url></url> ????????????????????<query_fields></query_fields> ????????????????????<posts></posts> ????????????????????<status_codes>200</status_codes> ????????????????????<follow_redirects>1</follow_redirects> ????????????????????<post_type>0</post_type> ????????????????????<http_proxy></http_proxy> ????????????????????<headers></headers> ????????????????????<retrieve_mode>0</retrieve_mode> ????????????????????<request_method>0</request_method> ????????????????????<output_format>0</output_format> ????????????????????<allow_traps>0</allow_traps> ????????????????????<ssl_cert_file></ssl_cert_file> ????????????????????<ssl_key_file></ssl_key_file> ????????????????????<ssl_key_password></ssl_key_password> ????????????????????<verify_peer>0</verify_peer> ????????????????????<verify_host>0</verify_host> ????????????????????<master_item></master_item> ????????????????</item> ????????????????<item> ????????????????????<name>Nginx_Status_requests</name> ????????????????????<type>0</type> ????????????????????<snmp_community></snmp_community> ????????????????????<snmp_oid></snmp_oid> ????????????????????<key>nginx_status[requests]</key> ????????????????????<delay>30s</delay> ????????????????????<history>90d</history> ????????????????????<trends>365d</trends> ????????????????????<status>0</status> ????????????????????<value_type>3</value_type> ????????????????????<allowed_hosts></allowed_hosts> ????????????????????<units></units> ????????????????????<snmpv3_contextname></snmpv3_contextname> ????????????????????<snmpv3_securityname></snmpv3_securityname> ????????????????????<snmpv3_securitylevel>0</snmpv3_securitylevel> ????????????????????<snmpv3_authprotocol>0</snmpv3_authprotocol> ????????????????????<snmpv3_authpassphrase></snmpv3_authpassphrase> ????????????????????<snmpv3_privprotocol>0</snmpv3_privprotocol> ????????????????????<snmpv3_privpassphrase></snmpv3_privpassphrase> ????????????????????<params></params> ????????????????????<ipmi_sensor></ipmi_sensor> ????????????????????<authtype>0</authtype> ????????????????????<username></username> ????????????????????<password></password> ????????????????????<publickey></publickey> ????????????????????<privatekey></privatekey> ????????????????????<port></port> ????????????????????<description></description> ????????????????????<inventory_link>0</inventory_link> ????????????????????<applications> ????????????????????????<application> ????????????????????????????<name>NGINX_STATUS</name> ????????????????????????</application> ????????????????????</applications> ????????????????????<valuemap></valuemap> ????????????????????<logtimefmt></logtimefmt> ????????????????????<preprocessing></preprocessing> ????????????????????<jmx_endpoint></jmx_endpoint> ????????????????????<timeout>3s</timeout> ????????????????????<url></url> ????????????????????<query_fields></query_fields> ????????????????????<posts></posts> ????????????????????<status_codes>200</status_codes> ????????????????????<follow_redirects>1</follow_redirects> ????????????????????<post_type>0</post_type> ????????????????????<http_proxy></http_proxy> ????????????????????<headers></headers> ????????????????????<retrieve_mode>0</retrieve_mode> ????????????????????<request_method>0</request_method> ????????????????????<output_format>0</output_format> ????????????????????<allow_traps>0</allow_traps> ????????????????????<ssl_cert_file></ssl_cert_file> ????????????????????<ssl_key_file></ssl_key_file> ????????????????????<ssl_key_password></ssl_key_password> ????????????????????<verify_peer>0</verify_peer> ????????????????????<verify_host>0</verify_host> ????????????????????<master_item></master_item> ????????????????</item> ????????????????<item> ????????????????????<name>Nginx_Status_waiting</name> ????????????????????<type>0</type> ????????????????????<snmp_community></snmp_community> ????????????????????<snmp_oid></snmp_oid> ????????????????????<key>nginx_status[waiting]</key> ????????????????????<delay>30s</delay> ????????????????????<history>90d</history> ????????????????????<trends>365d</trends> ????????????????????<status>0</status> ????????????????????<value_type>3</value_type> ????????????????????<allowed_hosts></allowed_hosts> ????????????????????<units></units> ????????????????????<snmpv3_contextname></snmpv3_contextname> ????????????????????<snmpv3_securityname></snmpv3_securityname> ????????????????????<snmpv3_securitylevel>0</snmpv3_securitylevel> ????????????????????<snmpv3_authprotocol>0</snmpv3_authprotocol> ????????????????????<snmpv3_authpassphrase></snmpv3_authpassphrase> ????????????????????<snmpv3_privprotocol>0</snmpv3_privprotocol> ????????????????????<snmpv3_privpassphrase></snmpv3_privpassphrase> ????????????????????<params></params> ????????????????????<ipmi_sensor></ipmi_sensor> ????????????????????<authtype>0</authtype> ????????????????????<username></username> ????????????????????<password></password> ????????????????????<publickey></publickey> ????????????????????<privatekey></privatekey> ????????????????????<port></port> ????????????????????<description></description> ????????????????????<inventory_link>0</inventory_link> ????????????????????<applications> ????????????????????????<application> ????????????????????????????<name>NGINX_STATUS</name> ????????????????????????</application> ????????????????????</applications> ????????????????????<valuemap></valuemap> ????????????????????<logtimefmt></logtimefmt> ????????????????????<preprocessing></preprocessing> ????????????????????<jmx_endpoint></jmx_endpoint> ????????????????????<timeout>3s</timeout> ????????????????????<url></url> ????????????????????<query_fields></query_fields> ????????????????????<posts></posts> ????????????????????<status_codes>200</status_codes> ????????????????????<follow_redirects>1</follow_redirects> ????????????????????<post_type>0</post_type> ????????????????????<http_proxy></http_proxy> ????????????????????<headers></headers> ????????????????????<retrieve_mode>0</retrieve_mode> ????????????????????<request_method>0</request_method> ????????????????????<output_format>0</output_format> ????????????????????<allow_traps>0</allow_traps> ????????????????????<ssl_cert_file></ssl_cert_file> ????????????????????<ssl_key_file></ssl_key_file> ????????????????????<ssl_key_password></ssl_key_password> ????????????????????<verify_peer>0</verify_peer> ????????????????????<verify_host>0</verify_host> ????????????????????<master_item></master_item> ????????????????</item> ????????????????<item> ????????????????????<name>Nginx_Status_writing</name> ????????????????????<type>0</type> ????????????????????<snmp_community></snmp_community> ????????????????????<snmp_oid></snmp_oid> ????????????????????<key>nginx_status[writing]</key> ????????????????????<delay>30s</delay> ????????????????????<history>90d</history> ????????????????????<trends>365d</trends> ????????????????????<status>0</status> ????????????????????<value_type>3</value_type> ????????????????????<allowed_hosts></allowed_hosts> ????????????????????<units></units> ????????????????????<snmpv3_contextname></snmpv3_contextname> ????????????????????<snmpv3_securityname></snmpv3_securityname> ????????????????????<snmpv3_securitylevel>0</snmpv3_securitylevel> ????????????????????<snmpv3_authprotocol>0</snmpv3_authprotocol> ????????????????????<snmpv3_authpassphrase></snmpv3_authpassphrase> ????????????????????<snmpv3_privprotocol>0</snmpv3_privprotocol> ????????????????????<snmpv3_privpassphrase></snmpv3_privpassphrase> ????????????????????<params></params> ????????????????????<ipmi_sensor></ipmi_sensor> ????????????????????<authtype>0</authtype> ????????????????????<username></username> ????????????????????<password></password> ????????????????????<publickey></publickey> ????????????????????<privatekey></privatekey> ????????????????????<port></port> ????????????????????<description></description> ????????????????????<inventory_link>0</inventory_link> ????????????????????<applications> ????????????????????????<application> ????????????????????????????<name>NGINX_STATUS</name> ????????????????????????</application> ????????????????????</applications> ????????????????????<valuemap></valuemap> ????????????????????<logtimefmt></logtimefmt> ????????????????????<preprocessing></preprocessing> ????????????????????<jmx_endpoint></jmx_endpoint> ????????????????????<timeout>3s</timeout> ????????????????????<url></url> ????????????????????<query_fields></query_fields> ????????????????????<posts></posts> ????????????????????<status_codes>200</status_codes> ????????????????????<follow_redirects>1</follow_redirects> ????????????????????<post_type>0</post_type> ????????????????????<http_proxy></http_proxy> ????????????????????<headers></headers> ????????????????????<retrieve_mode>0</retrieve_mode> ????????????????????<request_method>0</request_method> ????????????????????<output_format>0</output_format> ????????????????????<allow_traps>0</allow_traps> ????????????????????<ssl_cert_file></ssl_cert_file> ????????????????????<ssl_key_file></ssl_key_file> ????????????????????<ssl_key_password></ssl_key_password> ????????????????????<verify_peer>0</verify_peer> ????????????????????<verify_host>0</verify_host> ????????????????????<master_item></master_item> ????????????????</item> ????????????</items> ????????????<discovery_rules></discovery_rules> ????????????<httptests></httptests> ????????????<macros></macros> ????????????<templates></templates> ????????????<screens></screens> ????????</template> ????</templates> ????<triggers> ????????<trigger> ????????????<expression>{Template?Nginx?Web?Status?Monitor:nginx_status[active].last()}>50</expression> ????????????<recovery_mode>0</recovery_mode> ????????????<recovery_expression></recovery_expression> ????????????<name>Excessive?number?of?active?links?in?nginx</name> ????????????<correlation_mode>0</correlation_mode> ????????????<correlation_tag></correlation_tag> ????????????<url></url> ????????????<status>0</status> ????????????<priority>4</priority> ????????????<description></description> ????????????<type>0</type> ????????????<manual_close>0</manual_close> ????????????<dependencies></dependencies> ????????????<tags></tags> ????????</trigger> ????????<trigger> ????????????<expression>{Template?Nginx?Web?Status?Monitor:nginx_status[ping].last()}=0</expression> ????????????<recovery_mode>0</recovery_mode> ????????????<recovery_expression></recovery_expression> ????????????<name>Nginx?down?on?{HOST.NAME}</name> ????????????<correlation_mode>0</correlation_mode> ????????????<correlation_tag></correlation_tag> ????????????<url></url> ????????????<status>0</status> ????????????<priority>4</priority> ????????????<description></description> ????????????<type>0</type> ????????????<manual_close>0</manual_close> ????????????<dependencies></dependencies> ????????????<tags></tags> ????????</trigger> ????</triggers> ????<graphs> ????????<graph> ????????????<name>Nginx_Status</name> ????????????<width>900</width> ????????????<height>200</height> ????????????<yaxismin>0.0000</yaxismin> ????????????<yaxismax>100.0000</yaxismax> ????????????<show_work_period>1</show_work_period> ????????????<show_triggers>1</show_triggers> ????????????<type>0</type> ????????????<show_legend>1</show_legend> ????????????<show_3d>0</show_3d> ????????????<percent_left>0.0000</percent_left> ????????????<percent_right>0.0000</percent_right> ????????????<ymin_type_1>0</ymin_type_1> ????????????<ymax_type_1>0</ymax_type_1> ????????????<ymin_item_1>0</ymin_item_1> ????????????<ymax_item_1>0</ymax_item_1> ????????????<graph_items> ????????????????<graph_item> ????????????????????<sortorder>1</sortorder> ????????????????????<drawtype>0</drawtype> ????????????????????<color>1A7C11</color> ????????????????????<yaxisside>0</yaxisside> ????????????????????<calc_fnc>2</calc_fnc> ????????????????????<type>0</type> ????????????????????<item> ????????????????????????<host>Template?Nginx?Web?Status?Monitor</host> ????????????????????????<key>nginx_status[accepts]</key> ????????????????????</item> ????????????????</graph_item> ????????????????<graph_item> ????????????????????<sortorder>2</sortorder> ????????????????????<drawtype>0</drawtype> ????????????????????<color>F63100</color> ????????????????????<yaxisside>0</yaxisside> ????????????????????<calc_fnc>2</calc_fnc> ????????????????????<type>0</type> ????????????????????<item> ????????????????????????<host>Template?Nginx?Web?Status?Monitor</host> ????????????????????????<key>nginx_status[active]</key> ????????????????????</item> ????????????????</graph_item> ????????????????<graph_item> ????????????????????<sortorder>3</sortorder> ????????????????????<drawtype>0</drawtype> ????????????????????<color>2774A4</color> ????????????????????<yaxisside>0</yaxisside> ????????????????????<calc_fnc>2</calc_fnc> ????????????????????<type>0</type> ????????????????????<item> ????????????????????????<host>Template?Nginx?Web?Status?Monitor</host> ????????????????????????<key>nginx_status[handled]</key> ????????????????????</item> ????????????????</graph_item> ????????????????<graph_item> ????????????????????<sortorder>4</sortorder> ????????????????????<drawtype>0</drawtype> ????????????????????<color>A54F10</color> ????????????????????<yaxisside>0</yaxisside> ????????????????????<calc_fnc>2</calc_fnc> ????????????????????<type>0</type> ????????????????????<item> ????????????????????????<host>Template?Nginx?Web?Status?Monitor</host> ????????????????????????<key>nginx_status[ping]</key> ????????????????????</item> ????????????????</graph_item> ????????????????<graph_item> ????????????????????<sortorder>5</sortorder> ????????????????????<drawtype>0</drawtype> ????????????????????<color>FC6EA3</color> ????????????????????<yaxisside>0</yaxisside> ????????????????????<calc_fnc>2</calc_fnc> ????????????????????<type>0</type> ????????????????????<item> ????????????????????????<host>Template?Nginx?Web?Status?Monitor</host> ????????????????????????<key>nginx_status[reading]</key> ????????????????????</item> ????????????????</graph_item> ????????????????<graph_item> ????????????????????<sortorder>6</sortorder> ????????????????????<drawtype>0</drawtype> ????????????????????<color>6C59DC</color> ????????????????????<yaxisside>0</yaxisside> ????????????????????<calc_fnc>2</calc_fnc> ????????????????????<type>0</type> ????????????????????<item> ????????????????????????<host>Template?Nginx?Web?Status?Monitor</host> ????????????????????????<key>nginx_status[requests]</key> ????????????????????</item> ????????????????</graph_item> ????????????????<graph_item> ????????????????????<sortorder>7</sortorder> ????????????????????<drawtype>0</drawtype> ????????????????????<color>AC8C14</color> ????????????????????<yaxisside>0</yaxisside> ????????????????????<calc_fnc>2</calc_fnc> ????????????????????<type>0</type> ????????????????????<item> ????????????????????????<host>Template?Nginx?Web?Status?Monitor</host> ????????????????????????<key>nginx_status[waiting]</key> ????????????????????</item> ????????????????</graph_item> ????????????????<graph_item> ????????????????????<sortorder>8</sortorder> ????????????????????<drawtype>0</drawtype> ????????????????????<color>611F27</color> ????????????????????<yaxisside>0</yaxisside> ????????????????????<calc_fnc>2</calc_fnc> ????????????????????<type>0</type> ????????????????????<item> ????????????????????????<host>Template?Nginx?Web?Status?Monitor</host> ????????????????????????<key>nginx_status[writing]</key> ????????????????????</item> ????????????????</graph_item> ????????????</graph_items> ????????</graph> ????</graphs></zabbix_export>
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END