Bootstrap

初探zabbix_agent2 plugin

概述

  • zabbix_agent2作为可以完全替代zabbix_agent功能的客户端,较以往的功能非常强大。
  • 采用go语言进行编写,插件化方式对监控的能力进行管理。
  • 一栈式代理能力,官方提供的5.2版本已经具有很强的监控能力

zabbix_agent2指标

  • 在代理运行的情况下,我们可以执行zabbix_agent2 -R metrics 获取当前代理所支持的指标,以及指标的运行情况
[Agent]
active: true
capacity: 0/100
tasks: 0
agent.hostname: Returns Hostname from agent configuration.
agent.ping: Returns agent availability check result.
agent.version: Version of Zabbix agent.

[Ceph]
active: false
capacity: 0/100
tasks: 0
ceph.df.details: Returns information about cluster’s data usage and distribution among pools.
ceph.osd.discovery: Returns a list of discovered OSDs.
ceph.osd.dump: Returns usage thresholds and statuses of OSDs.
ceph.osd.stats: Returns aggregated and per OSD statistics.
ceph.ping: Tests if a connection is alive or not.
ceph.pool.discovery: Returns a list of discovered pools.
ceph.status: Returns an overall cluster's status.

[Cpu]
active: true
capacity: 0/100
tasks: 12
system.cpu.discovery: List of detected CPUs/CPU cores, used for low-level discovery.
system.cpu.num: Number of CPUs.
system.cpu.util: CPU utilisation percentage.

[Docker]
active: false
capacity: 0/100
tasks: 0
docker.container_info: Return low-level information about a container.
docker.container_stats: Returns near realtime stats for a given container.
docker.containers: Returns a list of containers.
docker.containers.discovery: Returns a list of containers, used for low-level discovery.
docker.data_usage: Returns information about current data usage.
docker.images: Returns a list of images.
docker.images.discovery: Returns a list of images, used for low-level discovery.
docker.info: Returns information about the docker server.
docker.ping: Pings the server and returns 0 or 1.

[File]
active: true
capacity: 0/100
tasks: 3
vfs.file.cksum: Returns File checksum, calculated by the UNIX cksum algorithm.
vfs.file.contents: Retrieves contents of the file.
vfs.file.exists: Returns if file exists or not.
vfs.file.md5sum: Returns MD5 checksum of file.
vfs.file.regexp: Find string in a file.
vfs.file.regmatch: Find string in a file.
vfs.file.size: Returns file size.
vfs.file.time: Returns file time information.

[Kernel]
active: true
capacity: 0/100
tasks: 2
kernel.maxfiles: Returns maximum number of opened files supported by OS.
kernel.maxproc: Returns maximum number of processes supported by OS.

[Log]
active: false
capacity: 0/100
tasks: 0
log: Log file monitoring.
log.count: Count of matched lines in log file monitoring.
logrt: Log file monitoring with log rotation support.
logrt.count: Count of matched lines in log file monitoring with log rotation support.

[MQTT]
active: false
capacity: 0/100
tasks: 0
mqtt.get: Subscribe to MQTT topics for published messages.

[Memcached]
active: false
capacity: 0/100
tasks: 0
memcached.ping: Test if connection is alive or not.
memcached.stats: Returns output of stats command.

[Memory]
active: true
capacity: 0/100
tasks: 3
vm.memory.size: Returns memory size in bytes or in percentage from total.

[Modbus]
active: false
capacity: 0/100
tasks: 0
modbus.get: Returns a JSON array of the requested values, usage: modbus.get[endpoint,<slave id>,<function>,<address>,<count>,<type>,<endianness>,
;