夜莺-Nightingale
夜莺V6
项目介绍 架构介绍
快速开始
黄埔营
安装部署
升级
采集器
使用手册
API
数据库表结构
FAQ
开源生态
Prometheus
版权声明
第1章:天降奇兵
第2章:探索PromQL
第3章:Prometheus告警处理
第4章:Exporter详解
第5章:数据与可视化
第6章:集群与高可用
第7章:Prometheus服务发现
第8章:监控Kubernetes
第9章:Prometheus Operator
参考资料

基础指标采集插件

cpu 插件

功能: 采集cpu指标,包括cpu用户态/系统态使用量、中断、软中断等指标

  • 如果不需要采集单个核心指标,推荐保持默认配置。
  • 如果想修改插件的采集周期,在这里修改interval的值
# # collect interval
# interval = 15

# # whether collect per cpu
# collect_per_cpu = false

mem 插件

功能: 采集内存指标,包括内存使用量、总量、cache、buffer、 available等指标

  • 如果想修改插件的采集周期,在这里修改interval的值
  • 其中配置项 collect_platform_fields 表示是否采集平台独有的指标
# # collect interval
# interval = 15

# # whether collect platform specified metrics
collect_platform_fields = true

disk 插件

功能:采集各个磁盘分区的空间/inode的使用量情况

: 每个指标都有一个mode=rw 类似的label , 表示分区的挂载模式。

  • 分区变为只读监控: 可以通过指标携带的label mode=xx来实现, 比如 disk_use_total{mode="ro"} > 0
  • 磁盘故障监控: 可以通过disk_device_error == 1 判断
  • 如果想修改插件的采集周期,在这里修改interval的值
# # collect interval
# interval = 15

# # By default stats will be gathered for all mount points.
# # Set mount_points will restrict the stats to only the specified mount points.
# mount_points = ["/"]

# Ignore mount points by filesystem type.
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs", "nsfs"]

ignore_mount_points = ["/boot", "/var/lib/kubelet/pods"]

diskio 插件

功能: 采集磁盘io指标,包括读写速率,读写次数,读写延迟等

  • 如果想修改插件的采集周期,在这里修改interval的值
  • 可以通过devices参数限定只采集哪几块盘的指标
# # collect interval
# interval = 15

# # By default, categraf will gather stats for all devices including disk partitions.
# # Setting devices will restrict the stats to the specified devices.
# devices = ["sda", "sdb", "vd*"]

net插件

功能: 采集网络指标,包括网卡流量,包数,错误数等

注意:

  • 如果想修改插件的采集周期,在这里修改interval的值
  • collect_protocol_stats 这个选项只在Linux下生效,如果不需要采集协议层指标,可以关闭该选项, 推荐保持默认。
  • interfaces 指定采集的网卡,如果不配置,默认为全部网卡。 支持通配符配置。
# # collect interval
# interval = 15

# # whether collect protocol stats on Linux
# # to be supported
# collect_protocol_stats = false

# # setting interfaces will tell categraf to gather these explicit interfaces
# interfaces = ["eth0"]
开源版
Flashcat
Flashduty