zabbix监控jvm、mysql、redis、es的配置方法
JVM
| 监控项关键字(item_key) | 监控项名称(item_name) | 备注 | |
|---|---|---|---|
| jmx["java.lang:type=GarbageCollector,name=PS Scavenge",CollectionCount] | gc PS Scavenge number of collections per second | 每秒触发 PS Scavenge次数 | |
| jmx["java.lang:type=GarbageCollector,name=PS Scavenge",CollectionTime] | gc PS Scavenge accumulated time spent in collection | PS Scavenge时所花时间 | |
| jmx["java.lang:type=GarbageCollector,name=PS MarkSweep",CollectionCount] | gc PS MarkSweep number of collections per second | 每秒触发 PS Mark-Sweep次数 | |
| jmx["java.lang:type=GarbageCollector,name=PS MarkSweep",CollectionTime] | gc PS MarkSweep accumulated time spent in collection | PS Mark-Sweep时所花时间 | |
| jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact",CollectionCount] | gc MarkSweepCompact number of collections per second | 每秒触发 Mark-Sweep-Compact次数 | |
| jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact",CollectionTime] | gc MarkSweepCompact accumulated time spent in collection | Mark-Sweep-Compact所花时间 | |
| jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount] | gc Copy number of collections per second | 每秒 GC Copy 的次数 | |
| jmx["java.lang:type=GarbageCollector,name=Copy",CollectionTime] | gc Copy accumulated time spent in collection | GC Copy 所花时间 | |
| jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep",CollectionCount] | gc ConcurrentMarkSweep number of collections per second | 每秒 ConcurrentMarkSweep 的次数 | |
| jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep",CollectionTime] | gc ConcurrentMarkSweep accumulated time spent in collection | ConcurrentMarkSweep 所花时间 | |
| jmx["java.lang:type=Compilation",Name] | comp Name of the current JIT compiler | 当前 JIT 编译器的 comp 名称 | |
| jmx["java.lang:type=Compilation",TotalCompilationTime] | comp Accumulated time spent in compilation | 累计编译时间 | |
| jmx["java.lang:type=ClassLoading",TotalLoadedClassCount] | cl Total Loaded Class Count | 已加载类总数 | |
| jmx["java.lang:type=ClassLoading",LoadedClassCount] | cl Loaded Class Count | 已加载类数量 | |
| jmx["java.lang:type=Runtime",VmName] | jvm Name | JVM 名称 | |
| jmx["java.lang:type=Runtime",Uptime] | jvm Uptime | JVM 运行时间(秒) | |
| jmx["java.lang:type=Runtime",VmVersion] | jvm Version | JVM 版本 | |
| jmx["java.lang:type=Memory",HeapMemoryUsage.committed] | mem Heap Memory committed | 已提交的堆内存 | |
| jmx["java.lang:type=Memory",HeapMemoryUsage.max] | mem Heap Memory max | 最大堆内存 | |
| jmx["java.lang:type=Memory",HeapMemoryUsage.used] | mem Heap Memory used | 已使用堆内存 | |
| jmx["java.lang:type=Memory",NonHeapMemoryUsage.committed] | mem Non-Heap Memory committed | 已提交的非堆内存 | |
| jmx["java.lang:type=Memory",NonHeapMemoryUsage.max] | mem Non-Heap Memory max | 最大非堆内存 | |
| jmx["java.lang:type=Memory",NonHeapMemoryUsage.used] | mem Non-Heap Memory used | 已使用非堆内存 | |
| jmx["java.lang:type=Memory",ObjectPendingFinalizationCount] | mem Object Pending Finalization Count | 内存对象挂起数目 | |
| jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.committed] | mp CMS Old Gen committed | 已提交的 CMS 年老代 | |
| jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.max] | mp CMS Old Gen max | CMS 年老代最大值 | |
| jmx["java.lang:type=MemoryPool,name=CMS Old Gen",Usage.used] | mp CMS Old Gen used | 已使用 CMS 年老代 | |
| jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.committed] | mp CMS Perm Gen committed | 已提交的 CMS 永久代 | |
| jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.max] | mp CMS Perm Gen max | 最大的 CMS 永久代 | |
| jmx["java.lang:type=MemoryPool,name=CMS Perm Gen",Usage.used] | mp CMS Perm Gen used | 已使用的 CMS 永久代 | |
| jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.committed] | mp Code Cache committed | 已提交的代码缓存 | |
| jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.max] | mp Code Cache max | 最大代码缓存 | |
| jmx["java.lang:type=MemoryPool,name=Code Cache",Usage.used] | mp Code Cache used | 已使用的代码缓存 | |
| jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.committed] | mp PS Old Gen committed | 已提交的 PS 年老代 | |
| jmx["java.lang:type=MemoryPool,name=PS Old Gen",Usage.max] | mp PS Old Gen max | PS 年老代最大值 | |
| jm | x["java.lang:type=MemoryPool,name=PS Old Gen",Usage.used] | mp PS Old Gen used | 已使用的 PS 年老代 |
| jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.committed] | mp PS Perm Gen committed | 已提交的 PS 永久代 | |
| jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.max] | mp PS Perm Gen max | PS 永久代最大值 | |
| jmx["java.lang:type=MemoryPool,name=PS Perm Gen",Usage.used] | mp PS Perm Gen used | 已使用的 PS 永久代 | |
| jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.committed] | mp Tenured Gen committed | 已提交的 Tenured 代 | |
| jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.max] | mp Tenured Gen max | Tenured 代最大值 | |
| jmx["java.lang:type=MemoryPool,name=Tenured Gen",Usage.used] | mp Tenured Gen used | 已使用的 Tenured 代 | |
| jmx["java.lang:type=OperatingSystem",MaxFileDescriptorCount] | os Max File Descriptor Count | 最大文件描述数 | |
| jmx["java.lang:type=OperatingSystem",OpenFileDescriptorCount] | os Open File Descriptor Count | 打开文件描述数 | |
| jmx["java.lang:type=OperatingSystem",ProcessCpuLoad] | os Process CPU Load | CPU 负载(%) | |
| jmx["java.lang:type=Threading",DaemonThreadCount] | th Daemon Thread Count | 守护线程数 | |
| jmx["java.lang:type=Threading",PeakThreadCount] | th Peak Thread Count | 峰值线程数 | |
| jmx["java.lang:type=Threading",ThreadCount] | th Thread Count | 线程数 | |
| jmx["java.lang:type=Threading",TotalStartedThreadCount] | th Total Started Thread Count | 一共开启的线程数 |
MySQL
| 监控项关键字(item_key) | 监控项名称(item_name) | 备注 |
|---|---|---|
| mysql.dbsize["{MYSQL.HOST}","{MYSQL.PORT}","数据库名字"] | Info: Size of database 数据库名字 | 数据库大小 |
| mysql.ping["{MYSQL.HOST}","{MYSQL.PORT}"] | Availability: MySQL status | 数据库状态 1:正常 0:异常 |
| mysql.aborted_clients.rate | Connections: Aborted clients per second | 每秒中止的客户端数 |
| mysql.aborted_connects.rate | Connections: Aborted connections per second | 每秒中止的连接数 |
| mysql.connection_errors_accept.rate | Connections: Connection errors accept per second | 每秒接受的连接错误数 |
| mysql.connection_errors_internal.rate | Connections: Connection errors internal per second | 每秒内部连接错误数 |
| mysql.connection_errors_max_connections.rate | Connections: Connection errors max | connections per second 连接错误每秒最大连接数 |
| mysql.connection_errors_peer_address.rate | Connections: Connection errors peer address per second | 每秒对等地址连接错误数 |
| mysql.connection_errors_select.rate | Connections: Connection errors select per second | 每秒查询的连接错误数 |
| mysql.connection_errors_tcpwrap.rate | Connections: Connection errors tcpwrap per second | 每秒 tcpwrap 连接错误错误数 |
| mysql.connections.rate | Connections: Connections per second | 每秒连接数 |
| mysql.max_used_connections | Connections: Max used connections | 使用的最大连接数 |
| mysql.threads_cached | Connections: Threads cached | 缓存的线程数 |
| mysql.threads_connected | Connections: Threads connected | 连接的线程数 |
| mysql.threads_created | Connections: Threads created | 创建的线程数 |
| mysql.version["{MYSQL.HOST}","{MYSQL.PORT}"] | Info: MySQL version | MySQL 版本 |
| mysql.uptime | Info: Uptime | 运行时间 |
| mysql.buffer_pool_efficiency | Performance: Buffer pool efficiency | 缓冲池效率(%) |
| mysql.buffer_pool_utilization | Performance: Buffer pool utilization | 缓冲池利用率(%) |
| mysql.created_tmp_files | Performance: Created tmp files on disk | 在磁盘上创建的临时文件数 |
| mysql.created_tmp_disk_tables | Performance: Created tmp tables on disk | 在磁盘上创建的临时表数 |
| mysql.created_tmp_tables | Performance: Created tmp tables on memory | 在内存中创建的临时表数 |
| mysql.innodb_buffer_pool_pages_free | Performance: InnoDB buffer pool pages free InnoDB | 缓冲池页面可用 |
| mysql.innodb_buffer_pool_pages_total | Performance: InnoDB buffer pool pages total | InnoDB 缓冲池页总数 |
| mysql.innodb_buffer_pool_read_requests | Performance: InnoDB buffer pool read requests InnoDB | 缓冲池读取请求 |
| mysql.innodb_buffer_pool_reads | Performance: InnoDB buffer pool reads | InnoDB 缓冲池读取 |
| mysql.innodb_row_lock_time | Performance: InnoDB row lock time | InnoDB 行锁定时间 |
| mysql.innodb_row_lock_time_max | Performance: InnoDB row lock time max | InnoDB 最大行锁定时间 |
| mysql.innodb_row_lock_waits | Performance: InnoDB row lock waits | InnoDB 行锁等待 |
| mysql.slow_queries.rate | Performance: Slow queries per second | 每秒慢查询数 |
| mysql.bytes_received.rate | Throughput: Bytes received | 接收的字节数 |
| mysql.bytes_sent.rate | Throughput: Bytes sent | 发送的字节数 |
| mysql.com_delete.rate | Throughput: Command Delete per second | 每秒删除操作数 |
| mysql.com_insert.rate | Throughput: Command Insert per second | 每秒插入操作数 |
| mysql.com_select.rate | Throughput: Command Select per second | 每秒查询操作数 |
| mysql.com_update.rate | Throughput: Command Update per second | 每秒更新操作数 |
| mysql.queries.rate | Throughput: Queries per second | 每秒查询数 |
| mysql.questions.rate | Throughput: Questions per second | 每秒问题数 |
Redis
| 监控项关键字(item_key) | 监控项名称(item_name) | 备注 |
|---|---|---|
| Redis.Status | Redis Status | redis状态 1:正常 0:异常 |
| Redis.Info[aof_last_bgrewrite_status] | Redis.Info[aof_last_bgrewrite_status] | 上次重写状态 |
| Redis.Info[aof_last_write_status] | Redis.Info[aof_last_write_status] | 上次写入状态 |
| Redis.Info[blocked_clients] | Redis.Info[blocked_clients] | 阻塞的客户端数 |
| Redis.Info[connected_clients] | Redis.Info[connected_clients] | 连接的客户端数 |
| Redis.Info[db0,keys] | Redis.Info[db0,keys] | db0数据库中key的数量 |
| Redis.Info[rdb_last_bgsave_status] | Redis.Info[rdb_last_bgsave_status] | 上次保存状态 |
| Redis.Info[uptime] | Redis.Info[uptime] | 运行时间(秒) |
| Redis.Info[used_cpu_sys] | Redis.Info[used_cpu_sys] | redis进程指令在核心态所消耗的CPU时间(秒) |
| Redis.Info[used_cpu_sys_children] | Redis.Info[used_cpu_sys_children] | redis后台进程指令在核心态所消耗的CPU时间(秒) |
| Redis.Info[used_cpu_user] | Redis.Info[used_cpu_user] | redis进程指令在用户态所消耗的CPU时间(秒) |
| Redis.Info[used_cpu_user_children] | Redis.Info[used_cpu_user_children] | redis后台进程指令在用户态所消耗的CPU时间(秒) |
| Redis.Info[used_memory] | Redis.Info[used_memory] | redis内存使用总量(字节) |
| Redis.Info[used_memory_lua] | Redis.Info[used_memory_lua] | Lua脚本引擎所使用的内存大小(字节) |
| Redis.Info[used_memory_peak] | Redis.Info[used_memory_peak] | redis的内存消耗峰值(字节) |
| Redis.Info[used_memory_rss] | Redis.Info[used_memory_rss] | 从操作系统上显示已经分配的内存总量(字节) |
| Redis.Info[version] | Redis.Info[version] | redis版本 |
ElasticSearch
| 监控项关键字(item_key) | 监控项名称(item_name) | 备注 |
|---|---|---|
| ESzabbix[cluster,count] | Total number of records | 记录总数 |
| ESzabbix[{$NODENAME},index_total] | Records indexed per second | 索引文档总数 |
| ESzabbix[cluster,unassigned_shards] | Number of unassigned shards | 未分配的分片数,通常为0,当有某个节点的副本分片丢失该值就会增加。 |
| ESzabbix[cluster,number_of_nodes] | Number of nodes | 节点数 |
| ESzabbix[cluster,relocating_shards] | Number of relocating shards | 当前节点迁往其他节点的分片数量,通常为0,当有节点加入或者退出时该值会增加。 |
| ESzabbix[cluster,initializing_shards] | Number of initializing shards | 正在初始化的分片数 |
| ESzabbix[cluster,number_of_data_nodes] | Number of data nodes | 数据节点数 |
| ESzabbix[cluster,active_shards] | Number of active shards | 活跃的所有分片数 |
| ESzabbix[cluster,active_primary_shards] | Number of active primary shards | 活跃的主分片数 |
| ESzabbix[cluster,index_total] | Cluster-wide records indexed per second | 索引文档数 |
| ESzabbix[cluster,size_in_bytes] | Cluster-wide storage size | 数据总存储容量 |
| ESzabbix[service,status] | Elasticsearch Service Status | 服务状态 |
| ESzabbix[cluster,status] | ElasticSearch Cluster Status | 集群状态 |