zabbix系列zabbix3.4监控zookeeper3.4.10

监控zookeeper来自网上,大家一搜就可搜到了,只是zabbix版本和zookeeper有点出入,自行修改一下就可以了。

zookeeper监控要点

系统监控   这个监控linux系统以及修改linux服务器参数即可
内存使用量    ZooKeeper应当完全运行在内存中,不能使用到SWAP。Java Heap大小不能超过可用内存。
Swap使用量    使用Swap会降低ZooKeeper的性能,设置vm.swappiness = 0
网络带宽占用   如果发现ZooKeeper性能降低关注下网络带宽占用情况和丢包情况,通常情况下ZooKeeper是20%写入80%读入
磁盘使用量    ZooKeeper数据目录使用情况需要注意
磁盘I/O      ZooKeeper的磁盘写入是异步的,所以不会存在很大的I/O请求,如果ZooKeeper和其他I/O密集型服务公用应该关注下磁盘I/O情况

ZooKeeper监控
zk_avg/min/max_latency    响应一个客户端请求的时间,建议这个时间大于10个Tick就报警
zk_outstanding_requests        排队请求的数量,当ZooKeeper超过了它的处理能力时,这个值会增大,建议设置报警阀值为10
zk_packets_received      接收到客户端请求的包数量
zk_packets_sent        发送给客户单的包数量,主要是响应和通知
zk_max_file_descriptor_count   最大允许打开的文件数,由ulimit控制
zk_open_file_descriptor_count    打开文件数量,当这个值大于允许值得85%时报警
Mode                运行的角色,如果没有加入集群就是standalone,加入集群式follower或者leader
zk_followers          leader角色才会有这个输出,集合中follower的个数。正常的值应该是集合成员的数量减1
zk_pending_syncs       leader角色才会有这个输出,pending syncs的数量
zk_znode_count         znodes的数量
zk_watch_count         watches的数量
Java Heap Size         ZooKeeper Java进程的

安装依赖包

yum install -y nc
yum install -y zabbix-sender

找到zabbix-sender安装的话,可以尝试一下
yum list all|grep zabbix-sender

监控原理描述

[[email protected] ~]# echo ruok|nc 127.0.0.1 2181
imok
[[email protected] ~]# echo mntr|nc 127.0.0.1 2181
zk_version      3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT
zk_avg_latency  0
zk_max_latency  13254
zk_min_latency  0
zk_packets_received     3440389
zk_packets_sent 3502224
zk_num_alive_connections        2
zk_outstanding_requests 0
zk_server_state follower
zk_znode_count  203
zk_watch_count  100
zk_ephemerals_count     83
zk_approximate_data_size        46378
zk_open_file_descriptor_count   33
zk_max_file_descriptor_count    4096
[[email protected] ~]# echo srvr|nc 127.0.0.1 2181
Zookeeper version: 3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT
Latency min/avg/max: 0/0/13254
Received: 3440393
Sent: 3502228
Connections: 2
Outstanding: 0
Zxid: 0x2000b2629
Mode: follower
Node count: 203

zookeeper监控脚本

/etc/zabbix/script/zookeeper/check_zookeeper.py

#!/usr/bin/python  

""" Check Zookeeper Cluster  

zookeeper version should be newer than 3.4.x  

# echo mntr|nc 127.0.0.1 2181
zk_version  3.4.6-1569965, built on 02/20/2014 09:09 GMT
zk_avg_latency  0
zk_max_latency  4
zk_min_latency  0
zk_packets_received 84467
zk_packets_sent 84466
zk_num_alive_connections    3
zk_outstanding_requests 0
zk_server_state follower
zk_znode_count  17159
zk_watch_count  2
zk_ephemerals_count 1
zk_approximate_data_size    6666471
zk_open_file_descriptor_count   29
zk_max_file_descriptor_count    102400  

# echo ruok|nc 127.0.0.1 2181
imok  

"""
import sys
import socket
import re
import subprocess
from StringIO import StringIO
import os  

zabbix_sender = ‘/usr/bin/zabbix_sender‘
zabbix_conf = ‘/etc/zabbix/zabbix_agentd.conf‘
send_to_zabbix = 1  

############# get zookeeper server status
class ZooKeeperServer(object):  

    def __init__(self, host=‘localhost‘, port=‘2181‘, timeout=1):
        self._address = (host, int(port))
        self._timeout = timeout
        self._result  = {}  

    def _create_socket(self):
        return socket.socket()  

    def _send_cmd(self, cmd):
        """ Send a 4letter word command to the server """
        s = self._create_socket()
        s.settimeout(self._timeout)  

        s.connect(self._address)
        s.send(cmd)  

        data = s.recv(2048)
        s.close()  

        return data  

    def get_stats(self):
        """ Get ZooKeeper server stats as a map """
        data_mntr = self._send_cmd(‘mntr‘)
        data_ruok = self._send_cmd(‘ruok‘)
        if data_mntr:
            result_mntr = self._parse(data_mntr)
        if data_ruok:
            result_ruok = self._parse_ruok(data_ruok)  

        self._result = dict(result_mntr.items() + result_ruok.items())  

        if not self._result.has_key(‘zk_followers‘) and not self._result.has_key(‘zk_synced_followers‘) and not self._result.has_key(‘zk_pending_syncs‘):  

           ##### the tree metrics only exposed on leader role zookeeper server, we just set the followers‘ to 0
           leader_only = {‘zk_followers‘:0,‘zk_synced_followers‘:0,‘zk_pending_syncs‘:0}
           self._result = dict(result_mntr.items() + result_ruok.items() + leader_only.items() )  

        return self._result    

    def _parse(self, data):
        """ Parse the output from the ‘mntr‘ 4letter word command """
        h = StringIO(data)  

        result = {}
        for line in h.readlines():
            try:
                key, value = self._parse_line(line)
                result[key] = value
            except ValueError:
                pass # ignore broken lines  

        return result  

    def _parse_ruok(self, data):
        """ Parse the output from the ‘ruok‘ 4letter word command """  

        h = StringIO(data)  

        result = {}  

        ruok = h.readline()
        if ruok:
           result[‘zk_server_ruok‘] = ruok  

        return result  

    def _parse_line(self, line):
        try:
            key, value = map(str.strip, line.split(‘\t‘))
        except ValueError:
            raise ValueError(‘Found invalid line: %s‘ % line)  

        if not key:
            raise ValueError(‘The key is mandatory and should not be empty‘)  

        try:
            value = int(value)
        except (TypeError, ValueError):
            pass  

        return key, value  

    def get_pid(self):
#  ps -ef|grep java|grep zookeeper|awk ‘{print $2}‘
         pidarg = ‘‘‘ps -ef|grep java|grep zookeeper|grep -v grep|awk ‘{print $2}‘ ‘‘‘
         pidout = subprocess.Popen(pidarg,shell=True,stdout=subprocess.PIPE)
         pid = pidout.stdout.readline().strip(‘\n‘)
         return pid  

    def send_to_zabbix(self, metric):
         key = "zookeeper.status[" +  metric + "]"  

         if send_to_zabbix > 0:
             #print key + ":" + str(self._result[metric])
             try:  

                subprocess.call([zabbix_sender, "-c", zabbix_conf, "-k", key, "-o", str(self._result[metric]) ], stdout=FNULL, stderr=FNULL, shell=False)
             except OSError, detail:
                print "Something went wrong while exectuting zabbix_sender : ", detail
         else:
                print "Simulation: the following command would be execucted :\n", zabbix_sender, "-c", zabbix_conf, "-k", key, "-o", self._result[metric], "\n"  

def usage():
        """Display program usage"""  

        print "\nUsage : ", sys.argv[0], " alive|all"
        print "Modes : \n\talive : Return pid of running zookeeper\n\tall : Send zookeeper stats as well"
        sys.exit(1)  

accepted_modes = [‘alive‘, ‘all‘]  

if len(sys.argv) == 2 and sys.argv[1] in accepted_modes:
        mode = sys.argv[1]
else:
        usage()  

zk = ZooKeeperServer()
#  print zk.get_stats()
pid = zk.get_pid()  

if pid != "" and  mode == ‘all‘:
   zk.get_stats()
   # print zk._result
   FNULL = open(os.devnull, ‘w‘)
   for key in zk._result:
       zk.send_to_zabbix(key)
   FNULL.close()
   print pid  

elif pid != "" and mode == "alive":
    print pid
else:
    print 0

添加zabbix-agent配置文件

/etc/zabbix/zabbix_agentd.d/check_zookeeper.conf

UserParameter=zookeeper.status[*],/usr/bin/python /etc/zabbix/script/zookeeper/check_zookeeper.py $1

zabbix-web添加zookeeper模板

zbx_export_templates.xml

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>3.4</version>
    <date>2018-02-02T06:22:07Z</date>
    <groups>
        <group>
            <name>Templates</name>
        </group>
    </groups>
    <templates>
        <template>
            <template>Template ZooKeeper</template>
            <name>Template ZooKeeper</name>
            <description/>
            <groups>
                <group>
                    <name>Templates</name>
                </group>
            </groups>
            <applications>
                <application>
                    <name>ZooKeeper Status</name>
                </application>
            </applications>
            <items>
                <item>
                    <name>zookeeper pid</name>
                    <type>0</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[all]</key>
                    <delay>30</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper approximate data size</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_approximate_data_size]</key>
                    <delay>0</delay>
                    <history>90d</history>
                    <trends>365d</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>B</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper average latency</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_avg_latency]</key>
                    <delay>0</delay>
                    <history>90d</history>
                    <trends>365d</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>tick</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper ephemerals count</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_ephemerals_count]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper leader‘s followers</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_followers]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper max file descriptor count</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_max_file_descriptor_count]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper max latency</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_max_latency]</key>
                    <delay>0</delay>
                    <history>90d</history>
                    <trends>365d</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>tick</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper min latency</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_min_latency]</key>
                    <delay>0</delay>
                    <history>90d</history>
                    <trends>365d</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>tick</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper alive connections</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_num_alive_connections]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper opened file descriptor count</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_open_file_descriptor_count]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper outstanding requests</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_outstanding_requests]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper packages received</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_packets_received]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper packages sent</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_packets_sent]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper leader‘s pending syncs</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_pending_syncs]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper response checking</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_server_ruok]</key>
                    <delay>0</delay>
                    <history>90d</history>
                    <trends>0</trends>
                    <status>0</status>
                    <value_type>1</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper state role</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_server_state]</key>
                    <delay>0</delay>
                    <history>90d</history>
                    <trends>0</trends>
                    <status>0</status>
                    <value_type>1</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper leader‘s synced followers</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_synced_followers]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper version</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_version]</key>
                    <delay>0</delay>
                    <history>90d</history>
                    <trends>0</trends>
                    <status>0</status>
                    <value_type>1</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper watches count</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_watch_count]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
                <item>
                    <name>zookeeper znodes count</name>
                    <type>2</type>
                    <snmp_community/>
                    <snmp_oid/>
                    <key>zookeeper.status[zk_znode_count]</key>
                    <delay>0</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>ZooKeeper Status</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                    <preprocessing/>
                    <jmx_endpoint/>
                    <master_item/>
                </item>
            </items>
            <discovery_rules/>
            <httptests/>
            <macros/>
            <templates/>
            <screens/>
        </template>
    </templates>
    <triggers>
        <trigger>
            <expression>{Template ZooKeeper:zookeeper.status[zk_outstanding_requests].last()}>10</expression>
            <recovery_mode>0</recovery_mode>
            <recovery_expression/>
            <name>big outstanding requests number</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 ZooKeeper:zookeeper.status[zk_pending_syncs].last()}>10</expression>
            <recovery_mode>0</recovery_mode>
            <recovery_expression/>
            <name>big pending syncs</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 ZooKeeper:zookeeper.status[zk_avg_latency].last()}>10</expression>
            <recovery_mode>0</recovery_mode>
            <recovery_expression/>
            <name>large average latency</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 ZooKeeper:zookeeper.status[zk_open_file_descriptor_count].last()} > {Template ZooKeeper:zookeeper.status[zk_max_file_descriptor_count].last()}*0.85</expression>
            <recovery_mode>0</recovery_mode>
            <recovery_expression/>
            <name>large file descriptor used</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 ZooKeeper:zookeeper.status[zk_server_ruok].str(imok)}<>1</expression>
            <recovery_mode>0</recovery_mode>
            <recovery_expression/>
            <name>zookeeper is abnormal</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 ZooKeeper:zookeeper.status[all].last()}=0</expression>
            <recovery_mode>0</recovery_mode>
            <recovery_expression/>
            <name>zookeeper is not running</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 ZooKeeper:zookeeper.status[zk_server_state].abschange()}>0</expression>
            <recovery_mode>0</recovery_mode>
            <recovery_expression/>
            <name>zookeeper state role has been changed</name>
            <correlation_mode>0</correlation_mode>
            <correlation_tag/>
            <url/>
            <status>0</status>
            <priority>2</priority>
            <description/>
            <type>0</type>
            <manual_close>0</manual_close>
            <dependencies/>
            <tags/>
        </trigger>
    </triggers>
    <graphs>
        <graph>
            <name>ZooKeeper Alive Connections</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>1</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>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>00DDDD</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template ZooKeeper</host>
                        <key>zookeeper.status[zk_num_alive_connections]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>ZooKeeper Data Size</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>1</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>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>00C800</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template ZooKeeper</host>
                        <key>zookeeper.status[zk_approximate_data_size]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>ZooKeeper Latency</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>0</sortorder>
                    <drawtype>2</drawtype>
                    <color>00C800</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template ZooKeeper</host>
                        <key>zookeeper.status[zk_avg_latency]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>1</sortorder>
                    <drawtype>2</drawtype>
                    <color>C80000</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template ZooKeeper</host>
                        <key>zookeeper.status[zk_min_latency]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>2</sortorder>
                    <drawtype>2</drawtype>
                    <color>0000C8</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template ZooKeeper</host>
                        <key>zookeeper.status[zk_max_latency]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>ZooKeeper Packages Received/Sent</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>1</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>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>FF3333</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template ZooKeeper</host>
                        <key>zookeeper.status[zk_packets_sent]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>1</sortorder>
                    <drawtype>0</drawtype>
                    <color>00C800</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template ZooKeeper</host>
                        <key>zookeeper.status[zk_packets_received]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>ZooKeeper Watches Count</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>1</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>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>660066</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template ZooKeeper</host>
                        <key>zookeeper.status[zk_watch_count]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>ZooKeeper Znodes Count</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>0</sortorder>
                    <drawtype>1</drawtype>
                    <color>FFCCFF</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template ZooKeeper</host>
                        <key>zookeeper.status[zk_znode_count]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
    </graphs>
</zabbix_export>

上面导出的xml有个地方不太明白,<> 不等号 变成了&gl;&gt,官网并没有说明这种用法。

重启zabbix-agent

service zabbix-agent restart

由于这个是使用zabbix-sender发送,在服务器端使用zabbix-get获取不了数据,不知道网友是否可以使用zabbix-get获取数据呢?

原文地址:http://blog.51cto.com/yanconggod/2068173

时间: 2024-11-15 00:34:34

zabbix系列zabbix3.4监控zookeeper3.4.10的相关文章

zabbix系列zabbix3.4监控mysql5.7

本来想用python脚本监控一下mysql的,没有找到相关资料,懒得折腾了,使用官方自带的监控模板进行监控mysql 添加zabbix-agent配置文件 把默认的userparameter_mysql.conf 文件进行替换为一下内容[[email protected] zabbix_agentd.d]# cat userparameter_mysql.conf #UserParameter=mysql.status[*],echo "show global status where Vari

zabbix系列之六——安装后配置二Items

https://www.zabbix.com/documentation/3.4/manual/config/items/itemtypes/snmp 1Items 1.1creating items index detail note 1 Configuration->hosts 2 Click on Items in the row of the host 3 Click on Create item in the upper right corner of the screen 4 Ent

zabbix系列-Grafana4.6.3+Zabbix 的安装部署

zabbix系列(五) Grafana4.6.3+Zabbix 的安装部署 伟创享 2019-07-31 11:27:18 使用了一段时间Grafana,感觉还挺好用的.部分效果图如下: ? zabbix的安装步骤请参考以下地址,就不再描述,本章主要记录Grafana的部署 https://blog.csdn.net/wu2700222/article/details/80520085 grafana官网地址:http://docs.grafana.org/installation/rpm/ 从

zabbix自动发现与监控内存和CPU使用率最高的进程

监控需求 某项目的应用服务器CPU和内存使用率的监控,通过zabbix系统监控记录应用服务器上进程的CPU和内存的使用情况,并以图表的形式实时展现,以便于我们分析服务器的性能瓶颈. 监控方式 利用zabbix监控系统的自动发现功能,首先编写shell脚本获取服务器的CPU和内存资源使用率最大的进程,以json的格式输出,然后对这些进程的CPU和内存资源使用情况进行监控.(本文监控的进程为Linux服务器中资源使用率最高的10个进程.) 缺点 不适用于监控固定的进程 首先使用top命令查看进程状态

zabbix专题:第十章 zabbix之SNMP方式监控

zabbix专题:第十章 zabbix之SNMP方式监控 (SNMP基本都是监控网络设备,本文介绍点理论知识) 概述 如果我们需要监控打印机.路由器.UPS等设备,肯定不能使用zabbix agentd,因为他们不能安装软件的,还好他们一般都支持SNMP协议,这样我可以使用SNMP来监控他们.如果你希望使用SNMP agent来获取这些设备的信息,那么在安装zabbix server的时候你需要增加snmp的支持. 备注:SNMP检查基于UDP协议 配置SNMP监控 使用SNMP来监视设备,需要

Zabbix3.0 监控Windows Client

Zabbix3.0 监控Windows Clien 我们前面介绍了Zabbix3.0监控linux主机,今天我们使用Zabbix监控windows主机,其实都是一样的:具体见下: 我们首先下载windows zabbix agent安装服务:我们第一个url是下载链接,第二个第三个是最新的3.0和2.2.9的下载链接: http://www.zabbix.com/download.php http://www.zabbix.com/downloads/3.0.0/zabbix_agents_3.

如何从Zabbix数据库中获取监控数据

做过Zabbix的同学都知道,Zabbix通过专用的Agent或者SNMP收集相关的监控数据,然后存储到数据库里面实时在前台展示.Zabbix监控数据主要分为以下两类: 历史数据:history相关表,从history_uint表里面可以查询到设备监控项目的最大,最小和平均值,即存储监控数据的原始数据. 趋势数据:trends相关表,趋势数据是经过Zabbix计算的数据,数据是从history_uint里面汇总的,从trends_uint可以查看到监控数据每小时最大,最小和平均值流量. Zabb

zabbix监控之二----Zabbix受控端及监控项

4.station32受控端安装zabbix 4.1:下载所需要用的的程序包:只有受控端是主动模式时才需要装zabbix-sender [[email protected]]# yum -y localinstall \ zabbix-2.2.3-1.el6.x86_64.rpm\               # 主程序server端/agent端都需要 zabbix-agent-2.2.3-1.el6.x86_64.rpm\         # 受控端安装agent程序 zabbix-send

Grafana4.0使用Zabbix&CloudWatch数据源实现监控

一.安装grafana Grafana 是Graphite和InfluxDB 仪表盘和图形编辑器.Grafana 是开源的,功能齐全的度量仪表盘和图形编辑器,支持 Graphite,InfluxDB 和OpenTSDB. Grafana 主要特性:灵活丰富的图形化选项:可以混合多种风格:支持白天和夜间模式:多个数据源如zabbix/AWS的CloudWatch/Graphite/InfluxDB/OpenTSDB/Prometheus等:Graphite 和 InfluxDB 查询编辑器等等.