广告
返回顶部
首页 > 资讯 > 服务器 >zabbix配置nginx监控的实现
  • 174
分享到

zabbix配置nginx监控的实现

2024-04-02 19:04:59 174人浏览 泡泡鱼
摘要

目录案例:zabbix 配置 Nginx 监控1. 修改配置文件2. 编写 nginx 监控脚本3. 修改 zabbix 配置文件4. 服务端验证5. 添加模块6. 创建应用集7.

案例:zabbix 配置 nginx 监控

1. 修改配置文件

stub_status 模块可参考: https://www.jb51.net/article/248979.htm

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/>
            <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_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/>
                    <units/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <passWord/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>NGINX_STATUS</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <timeout>3s</timeout>
                    <url/>
                    <query_fields/>
                    <posts/>
                    <status_codes>200</status_codes>
                    <follow_redirects>1</follow_redirects>
                    <post_type>0</post_type>
                    <http_proxy/>
                    <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_key_file/>
                    <ssl_key_password/>
                    <verify_peer>0</verify_peer>
                    <verify_host>0</verify_host>
                    <master_item/>
                </item>
                <item>
                    <name>Nginx_Status_active</name>
                    <type>0</type>
                    <snmp_community/>
                    <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/>
                    <units/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>NGINX_STATUS</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <timeout>3s</timeout>
                    <url/>
                    <query_fields/>
                    <posts/>
                    <status_codes>200</status_codes>
                    <follow_redirects>1</follow_redirects>
                    <post_type>0</post_type>
                    <http_proxy/>
                    <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_key_file/>
                    <ssl_key_password/>
                    <verify_peer>0</verify_peer>
                    <verify_host>0</verify_host>
                    <master_item/>
                </item>
                <item>
                    <name>Nginx_Status_handled</name>
                    <type>0</type>
                    <snmp_community/>
                    <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/>
                    <units/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>NGINX_STATUS</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <timeout>3s</timeout>
                    <url/>
                    <query_fields/>
                    <posts/>
                    <status_codes>200</status_codes>
                    <follow_redirects>1</follow_redirects>
                    <post_type>0</post_type>
                    <http_proxy/>
                    <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_key_file/>
                    <ssl_key_password/>
                    <verify_peer>0</verify_peer>
                    <verify_host>0</verify_host>
                    <master_item/>
                </item>
                <item>
                    <name>Nginx_Status_Ping</name>
                    <type>0</type>
                    <snmp_community/>
                    <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/>
                    <units/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>NGINX_STATUS</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <timeout>3s</timeout>
                    <url/>
                    <query_fields/>
                    <posts/>
                    <status_codes>200</status_codes>
                    <follow_redirects>1</follow_redirects>
                    <post_type>0</post_type>
                    <http_proxy/>
                    <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_key_file/>
                    <ssl_key_password/>
                    <verify_peer>0</verify_peer>
                    <verify_host>0</verify_host>
                    <master_item/>
                </item>
                <item>
                    <name>Nginx_Status_reading</name>
                    <type>0</type>
                    <snmp_community/>
                    <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/>
                    <units/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>NGINX_STATUS</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <timeout>3s</timeout>
                    <url/>
                    <query_fields/>
                    <posts/>
                    <status_codes>200</status_codes>
                    <follow_redirects>1</follow_redirects>
                    <post_type>0</post_type>
                    <http_proxy/>
                    <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_key_file/>
                    <ssl_key_password/>
                    <verify_peer>0</verify_peer>
                    <verify_host>0</verify_host>
                    <master_item/>
                </item>
                <item>
                    <name>Nginx_Status_requests</name>
                    <type>0</type>
                    <snmp_community/>
                    <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/>
                    <units/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>NGINX_STATUS</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <timeout>3s</timeout>
                    <url/>
                    <query_fields/>
                    <posts/>
                    <status_codes>200</status_codes>
                    <follow_redirects>1</follow_redirects>
                    <post_type>0</post_type>
                    <http_proxy/>
                    <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_key_file/>
                    <ssl_key_password/>
                    <verify_peer>0</verify_peer>
                    <verify_host>0</verify_host>
                    <master_item/>
                </item>
                <item>
                    <name>Nginx_Status_waiting</name>
                    <type>0</type>
                    <snmp_community/>
                    <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/>
                    <units/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>NGINX_STATUS</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <timeout>3s</timeout>
                    <url/>
                    <query_fields/>
                    <posts/>
                    <status_codes>200</status_codes>
                    <follow_redirects>1</follow_redirects>
                    <post_type>0</post_type>
                    <http_proxy/>
                    <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_key_file/>
                    <ssl_key_password/>
                    <verify_peer>0</verify_peer>
                    <verify_host>0</verify_host>
                    <master_item/>
                </item>
                <item>
                    <name>Nginx_Status_writing</name>
                    <type>0</type>
                    <snmp_community/>
                    <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/>
                    <units/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>NGINX_STATUS</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <timeout>3s</timeout>
                    <url/>
                    <query_fields/>
                    <posts/>
                    <status_codes>200</status_codes>
                    <follow_redirects>1</follow_redirects>
                    <post_type>0</post_type>
                    <http_proxy/>
                    <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_key_file/>
                    <ssl_key_password/>
                    <verify_peer>0</verify_peer>
                    <verify_host>0</verify_host>
                    <master_item/>
                </item>
            </items>
            <discovery_rules/>
            <httptests/>
            <Macros/>
            <templates/>
            <screens/>
        </template>
    </templates>
    <triggers>
        <trigger>
            <expression>{Template Nginx Web Status Monitor:nginx_status[active].last()}&gt;50</expression>
            <recovery_mode>0</recovery_mode>
            <recovery_expression/>
            <name>Excessive number of active links in nginx</name>
            <correlation_mode>0</correlation_mode>
            <correlation_tag/>
            <url/>
            <status>0</status>
            <priority>4</priority>
            <description/>
            <type>0</type>
            <manual_close>0</manual_close>
            <dependencies/>
            <tags/>
        </trigger>
        <trigger>
            <expression>{Template Nginx Web Status Monitor:nginx_status[ping].last()}=0</expression>
            <recovery_mode>0</recovery_mode>
            <recovery_expression/>
            <name>Nginx down on {HOST.NAME}</name>
            <correlation_mode>0</correlation_mode>
            <correlation_tag/>
            <url/>
            <status>0</status>
            <priority>4</priority>
            <description/>
            <type>0</type>
            <manual_close>0</manual_close>
            <dependencies/>
            <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>

到此这篇关于zabbix配置nginx监控的实现的文章就介绍到这了,更多相关zabbix nginx监控内容请搜索编程网以前的文章或继续浏览下面的相关文章希望大家以后多多支持编程网!

--结束END--

本文标题: zabbix配置nginx监控的实现

本文链接: https://www.lsjlt.com/news/149475.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • zabbix配置nginx监控的实现
    目录案例:zabbix 配置 nginx 监控1. 修改配置文件2. 编写 nginx 监控脚本3. 修改 zabbix 配置文件4. 服务端验证5. 添加模块6. 创建应用集7. ...
    99+
    2022-11-13
  • zabbix如何配置nginx监控
    本篇内容主要讲解“zabbix如何配置nginx监控”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“zabbix如何配置nginx监控”吧!案例:zabbix 配置 nginx 监控1. 修改配置...
    99+
    2023-06-30
  • Zabbix监控mongodb配置
    本文主要介绍zabbix监控mongodb的配置。zabbix监控mongodb需要自定义脚本去监控,脚本可以传入多个参数。原理:通过mongodb客户端连接命令,过滤出db.serverStatus()输...
    99+
    2022-10-18
  • zabbix监控docker应用配置
    容器的应用越来越普遍了,但是大量的容器我们怎么进行管理呢?当然是监控起来! 今天这篇文章讲的就是使用zabbix监控docker容器! 关于zabbix监控的docker的原理: ...
    99+
    2022-11-12
  • 安装配置Zabbix开源监控
    运行环境:操作系统:CentOS release 6.8 (Final)数据库:MySQL 5.5.52Web应用服务器:Apache/2.2.15(Unix):开源监控程序:Zabbix 3.2.6任务:...
    99+
    2022-10-18
  • zabbix自定义监控nginx状态实现过程
    目录zabbix自定义监控nginx状态1. 开启状态界面2. 写监控脚本3. 配置监控项4. 配置触发器5. 测试zabbix自定义监控nginx状态 ...
    99+
    2022-11-12
  • 怎么实现zabbix自定义监控nginx状态
    这篇文章主要介绍“怎么实现zabbix自定义监控nginx状态”,在日常操作中,相信很多人在怎么实现zabbix自定义监控nginx状态问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”怎么实现zabbix自定义...
    99+
    2023-06-25
  • zabbix如何监控docker应用配置
    这篇文章主要介绍zabbix如何监控docker应用配置,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!使用zabbix监控docker容器!关于zabbix监控的docker的原理:agent2监控docker就是通...
    99+
    2023-06-20
  • Zabbix监控系统详解及配置
    前言         作为一个运维,需要会使用监控系统查看服务器状态以及网站流量指标,利用监控系统的数据去了解上线发布的结果,和网站的健康状态。利用一个优秀的监控软件,我们可以: 通过一个友好的界面进行浏览整个网站所有的服务器状态;...
    99+
    2023-08-31
    zabbix 服务器 运维
  • zabbix配置监控MySQL数据库的过程
    本篇内容介绍了“zabbix配置监控MySQL数据库的过程”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成! ...
    99+
    2022-10-18
  • zabbix专题:第十二章 zabbix proxy分布式监控配置
    zabbix专题:第十一章 zabbix proxy分布式监控配置           &nbs...
    99+
    2022-10-18
  • 监控之zabbix的安装部署+警报的配置
    主机环境  redhat6.5 64位实验环境  服务端1 ip172.25.25.1   主机名:server1.example.com    ...
    99+
    2022-10-18
  • prometheus监控nginx的实现
    目录简述1.下载nginx-module-vts模块2.安装nginx3.安装nginx-vts-exporter4.修改prometheus-cfg.yaml文件5.在grafan...
    99+
    2022-11-13
  • zabbix监控mysql的实例方法
    1、监控规划 在创建监控项之前要尽量考虑清楚要监控什么,怎么监控,监控数据如何存储,监控数据如何展现,如何处理报警等。要进行监控的系统规划需要对Zabbix很了解,这里只是提出监控的...
    99+
    2022-11-12
  • Zabbix基于snmp实现监控linux主机
    前言:   linux主机的话还是比较好处理的,无论是安装agent代理程序还是使用snmp,都是比较方便的,本文旨在介绍通过snmp使client与server进行连接。 环境:   server:192.168.2...
    99+
    2022-06-04
    zabbix snmp 监控 linux主机
  • Zabbix实现监控多个mysql过程解析
    一台服务器上开启了3个mysql实例进程,占用不同的端口 3306、3307、3308 原理说明: 通过自动发现规则来获取MySQL实例的端口,自动发现规则上的{$MYSQLPORT}是要传递给agent自动发现脚...
    99+
    2022-05-15
    zabbix 监控 mysql
  • Zabbix自定义脚本监控nginx及微信告警的方法
    这篇文章主要介绍“Zabbix自定义脚本监控nginx及微信告警的方法”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“Zabbix自定义脚本监控nginx及微信告警的方法”文章能帮助大家解决问题。项目...
    99+
    2023-06-30
  • Nginx配置https的实现
    目录1:  准备https证书2: 准备nginx  ssl 模块3: 配置  ssl证书4: 浏览器  https 协议访问, 访问成功则 https 配置成功了。 1:  准备h...
    99+
    2022-11-12
  • 深入浅出Zabbix 3.0 -- 第六章 监控项配置与管理
    第六章 监控项配置与管理Zabbix系统中监控项(Items)的定义和管理非常重要,所有的监控指标都是通过定义不同的监控项收集数据。Zabbix通过主机作为一个逻辑单元组织和管理监控项,所有的监控项都必须属...
    99+
    2022-10-18
  • 怎么使用Docker安装Zabbix并配置自定义监控项
    这篇“怎么使用Docker安装Zabbix并配置自定义监控项”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“怎么使用Docke...
    99+
    2023-06-29
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作