本节重点介绍 :
- grafana 上导入jmx_exporter dashboard
- 核心指标讲解
将采集配置到prometheus中
- 通过labels打静态的标签,java_app指明这个jmx属于哪个java app
grafana 上导入jmx_exporter dashboard
核心指标讲解
jvm_info
- label_join(jvm_info, “jdk”, ", ", “vendor”, “runtime”, “version”)
左右Y轴展示
内存指标
指标名 | 指标含义 | 标签举例和说明 | 说明 |
jvm_memory_bytes_used | jvm内存使用 | area标签: | |
jvm_memory_bytes_committed | 返回提交给 Java 虚拟机使用的内存量(以字节为单位) | - | |
jvm_memory_bytes_max | jvm最大内存 | - | |
jvm_memory_bytes_init | jvm 初始化内存 | - | |
jvm_memory_bytes_used/jvm_memory_bytes_max | jvm内存使用百分比 | - | |
jvm_memory_objects_pending_finalization | 在队列中等待的对象个数 | - | |
jvm_memory_pool_bytes_max | jvm内存池最大值 | code Cache是JVM用来存储native code的,因为是用Heap的形式来存储的,所以叫Code Heap。Code Heap被分为三个部分,Non-method,Profiled和Non-profiled。 | |
- | jvm内存池最大值 | pool标签: | |
- | - | pool=“CodeHeap ‘non-nmethods’” | |
- | - | pool=“CodeHeap ‘non-profiled nmethods’” | |
- | - | pool=“CodeHeap ‘profiled nmethods’” | |
- | - | pool=“Compressed Class Space” | |
- | - | pool=“Metaspace” | |
- | - | pool=“G1 Eden Space” | |
- | - | pool=“G1 Old Gen” | |
- | - | pool=“G1 Survivor Space” | |
increase(jvm_gc_collection_seconds_sum[1m]) | jvm gc耗时 | gc标签 : | |
increase(jvm_gc_collection_seconds_count[1m]) | jvm gc 次数 | gc标签 : | |
increase(jvm_gc_collection_seconds_count[1m]) | - | - | 为何没有summary? |
jvm_threads_current | 当前线程数 | - | - |
jvm_threads_daemon | 守护线程数 | - | - |
jvm_threads_deadlocked | 死锁线程数 | - | - |
jvm_threads_deadlocked_monitor | ? | - | - |
jvm_threads_peak | 活动线程峰值 | - | - |
jvm_threads_started_total | 自JVM启动后,启动的线程总量(包括daemon,non-daemon和终止了的) | - | - |
jvm_threads_state | 当前线程状态个数 | state标签 | - |
jvm_classes_loaded | jvm 当前加载的类个数 | - | |
jvm_classes_loaded_total | jvm加载的类总个数 counter | - | |
jvm_classes_unloaded_total | jvm卸载的类总个数 counter | - | |
jvm_buffer_pool_capacity_bytes | JVM 缓冲池的字节容量 | pool=“direct” 堆外内存 | |
jvm_buffer_pool_used_buffers | JVM 缓冲池使用缓存大小 | pool=“direct” 堆外内存 | |
jvm_buffer_pool_used_bytes | JVM 缓冲池的字节大小 | pool=“direct” 堆外内存 |
本节重点介绍 :
- grafana 上导入jmx_exporter dashboard
- 核心指标讲解