Prometheus常用监控指标及说明
Prometheus常用监控指标及说明

node_exporter 主机监控指标

node_memory_MemTotal_bytes # 内存总量
node_memory_MemFree_bytes # 空闲内存

# CUP 使用率
(1 - sum(increase(node_cpu_seconds_total{mode="idle"}[10s])) by (instance) / sum(increase(node_cpu_seconds_total[10s])) by (instance) ) * 100

node_filesystem_size_bytes # 磁盘总量
node_filesystem_free_bytes # 磁盘空闲
sum by (instance) (rate(node_disk_writes_completed_total[10s])) # 写入速率

node_network_receive_bytes_total # 网络接收
node_network_transmit_bytes_total # 网络发送
sum by (instance)(irate (node_network_receive_bytes_total[10s])) # 接收速率
sum by (instance)(irate (node_network_transmit_bytes_total[10s])) # 发送速率

golang应用监控指标

go_gc_duration_seconds  # 持续时间秒
go_gc_duration_seconds_sum  # gc-持续时间-秒数-总和
go_memstats_alloc_bytes  # Go内存统计分配字节
go_memstats_alloc_bytes_total  # Go内存统计分配字节总数
go_memstats_buck_hash_sys_bytes  # 用于剖析桶散列表的堆空间字节
go_memstats_frees_total  # 内存释放统计
go_memstats_gc_cpu_fraction  # 垃圾回收占用服务CPU工作的时间总和
go_memstats_gc_sys_bytes  # 圾回收标记元信息使用的内存字节
go_memstats_heap_alloc_bytes  # 服务分配的堆内存字节数
go_memstats_heap_idle_bytes  # 申请但是未分配的堆内存或者回收了的堆内存(空闲)字节数
go_memstats_heap_inuse_bytes  # 正在使用的堆内存字节数
go_memstats_heap_objects  # 堆内存块申请的量
go_memstats_heap_released_bytes  # 返回给OS的堆内存
go_memstats_heap_sys_bytes  # 系统分配的作为运行栈的内存
go_memstats_last_gc_time_seconds  # 垃圾回收器最后一次执行时间
go_memstats_lookups_total  # 被runtime监视的指针数
go_memstats_mallocs_total  # 服务malloc的次数
go_memstats_mcache_inuse_bytes  # mcache结构体申请的字节数(不会被视为垃圾回收)
go_memstats_mcache_sys_bytes  # 操作系统申请的堆空间用于mcache的字节数
go_memstats_mspan_inuse_bytes  # 用于测试用的结构体使用的字节数
go_memstats_mspan_sys_bytes  # 系统为测试用的结构体分配的字节数
go_memstats_next_gc_bytes  # 垃圾回收器检视的内存大小
go_memstats_other_sys_bytes  # golang系统架构占用的额外空间
go_memstats_stack_inuse_bytes  # 正在使用的栈字节数
go_memstats_stack_sys_bytes  # 系统分配的作为运行栈的内存
go_memstats_sys_bytes  # 服务现在系统使用的内存
go_threads  # 线程

Last modified on 2023-07-06