Prometheus
Prometheus
Prometheus 是一个开源的监控和告警系统,最初由 SoundCloud 于 2012 年开发,后来捐赠给了 CNCF(云原生计算基金会),成为 Kubernetes 生态中事实上的标准监控工具。它以高效的时间序列数据库、强大的查询语言和灵活的架构著称,特别适合动态云环境和微服务架构的监控。
核心特性
时间序列数据:
Prometheus 存储所有数据为时间序列,即带有时间戳的指标(metrics),每个指标由名称和一组键值对标签(labels)标识。
示例:http_requests_total{method="GET", endpoint="/api"} 1234。
Pull 模型:
通过 HTTP 定期从配置的目标(exporter 或应用)拉取指标,而不是依赖推送。
目标暴露 /metrics 端点,提供 Prometheus 格式的数据。
PromQL:
提供强大的查询语言(Prometheus Query Language),用于分析和聚合时间序列数据。
示例:rate(http_requests_total[5m]) 计算每秒请求速率。
多维数据模型:
通过标签支持多维度分析,比如按服务、实例、环境等过滤数据。
内置告警:
通过 Alertmanager 组件处理告警,支持多种通知方式(如邮件、Slack、Webhook)。
服务发现:
支持静态配置和动态服务发现(DNS、Consul、Kubernetes 等),适应云原生环境。
架构组件
Prometheus Server:核心服务,负责拉取、存储和查询数据。
Exporters:辅助工具(如 node_exporter、blackbox_exporter),暴露目标系统的指标。
Pushgateway:可选组件,用于支持短生命周期任务的指标推送。
Alertmanager:处理告警,分组、抑制和发送通知。
客户端库:支持多种语言(如 Go、Java、Python),便于应用自定义指标。
监控节点指标
https://github.com/prometheus/node_exporter
监控http服务器访问情况
https://github.com/prometheus/blackbox_exporter
监控服务器网络状况
https://github.com/prometheus/snmp_exporter
其他监控
https://prometheus.io/docs/instrumenting/exporters/
这几个exporter可以单独运行,通过curl获取数据,改为 itdog.com 17ce.com ping.chinaz.com 类似的服务
详细比较下 Prometheus Zabbix Nagios Datadog
以下是对 Prometheus、Zabbix、Nagios 和 Datadog 的详细比较,从功能、架构、使用场景、优缺点等多个维度进行分析,帮助你理解它们的异同并选择合适的监控工具。
1. 概述
| 工具 | 类型 | 开源性 | 初创时间 | 核心目标 |
|-------------|--------------|--------|----------|------------------------------|
| Prometheus | 时间序列监控 | 开源 | 2012 | 云原生、微服务监控 |
| Zabbix | 综合监控 | 开源 | 1998 | 传统 IT 基础设施监控 |
| Nagios | 状态监控 | 开源 | 1999 | 服务和网络可用性检查 |
| Datadog | 云监控平台 | 商业 | 2010 | 企业级云和应用性能监控 |
2. 架构与数据模型
| 维度 | Prometheus | Zabbix | Nagios | Datadog |
|-------------|--------------------------------|-------------------------------|------------------------------|------------------------------|
| 数据模型| 时间序列(指标+标签) | 通用(数值、状态、日志) | 状态检查(up/down) | 时间序列+日志+追踪 |
| 采集方式| Pull(拉取) | Push(推送)+ Pull | Pull(插件执行) | Push(Agent)+ Pull |
| 存储 | 内置 TSDB(本地时间序列数据库)| 关系型数据库(如 MySQL) | 无内置存储,需扩展 | 云端存储(SaaS) |
| 查询语言| PromQL(强大且灵活) | 无(依赖 GUI 或 SQL) | 无(脚本输出) | 无(UI 和 API) |
| 扩展性 | 单机为主,可用 Thanos 集群 | 支持分布式(Proxy + Server) | 依赖插件,扩展性有限 | 云原生分布式,无需管理 |
- Prometheus:强调时间序列数据,标签模型(如
cpu{host="server1"}
)便于多维度分析。 - Zabbix:数据类型多样,但时间序列支持不如 Prometheus 优化。
- Nagios:专注状态检查,结果为布尔值或简单数值,无时间序列概念。
- Datadog:综合模型,支持指标、日志和追踪,数据存储在云端。
3. 功能对比
| 功能 | Prometheus | Zabbix | Nagios | Datadog |
|--------------|------------------------------|-----------------------------|----------------------------|----------------------------|
| 指标采集 | Exporter 暴露 /metrics
| Agent 推送或 SNMP/Zabbix Trap | 插件执行检查 | Agent 推送或集成 API |
| 服务探测 | 用 blackbox_exporter
| 内置网络发现和探测 | 用插件(如 check_http
) | 内置服务检查 |
| 告警 | Alertmanager(灵活路由) | 内置告警(邮件、短信等) | 插件触发通知 | 高级告警(AI 驱动) |
| 可视化 | 内置 UI + Grafana | 内置仪表盘 | 无内置 UI,需 Nagios XI | 强大内置仪表盘 |
| 服务发现| DNS、Consul、Kubernetes | 网络发现、LLD(低级发现) | 手动配置或脚本 | 自动发现(云服务集成) |
| 应用监控| 需客户端库(如 PHP、Java) | 内置模板或自定义脚本 | 需插件 | 强大 APM(代码级追踪) |
- Prometheus:依赖 Exporter 生态,适合动态环境。
- Zabbix:功能全面,内置多种采集方式。
- Nagios:插件驱动,灵活但配置繁琐。
- Datadog:一体化解决方案,强调 APM 和云集成。
4. 部署与维护
| 维度 | Prometheus | Zabbix | Nagios | Datadog |
|--------------|------------------------------|-----------------------------|----------------------------|----------------------------|
| 安装 | 二进制运行,配置 YAML | Server + Agent + DB | 核心 + 插件,需编译或包管理| Agent 安装,SaaS 无需部署 |
| 配置 | 文本文件(prometheus.yml
) | GUI + 配置文件 | 配置文件 + 插件脚本 | UI 或 API 配置 |
| 维护成本 | 中等(需管理 Exporter) | 较高(数据库、代理维护) | 高(插件依赖) | 低(云端托管) |
| 依赖 | 无(单机运行) | 数据库(MySQL/PostgreSQL) | 无(但需扩展存储) | 云服务订阅 |
- Prometheus:轻量但需手动配置 Exporter。
- Zabbix:部署复杂,适合已有数据库环境。
- Nagios:基础版简单,但扩展功能需额外工作。
- Datadog:开箱即用,但需订阅费用。
5. 性能与扩展性
| 维度 | Prometheus | Zabbix | Nagios | Datadog |
|--------------|------------------------------|-----------------------------|----------------------------|----------------------------|
| 性能 | 高(TSDB 优化查询) | 中等(数据库瓶颈) | 低(插件执行效率低) | 高(云端优化) |
| 规模 | 单机数万指标,集群需扩展 | 支持数千设备(分布式部署) | 小规模(插件限制) | 大规模(云端无上限) |
| 高可用 | 需 Thanos/Cortex | 内置 HA(Server + Proxy) | 需 Nagios XI 或手动集群 | 默认高可用 |
- Prometheus:单机性能优秀,大规模需额外工具。
- Zabbix:分布式支持较好,但数据库可能成瓶颈。
- Nagios:不适合大规模监控。
- Datadog:云端扩展性强,无需操心。
6. 生态与集成
| 维度 | Prometheus | Zabbix | Nagios | Datadog |
|--------------|------------------------------|-----------------------------|----------------------------|----------------------------|
| 生态 | Exporter 丰富(100+) | 模板和插件 | 插件社区庞大 | 400+ 集成(AWS、Docker等) |
| 云原生 | 强(Kubernetes 首选) | 中等 | 弱 | 强(云服务优化) |
| 可视化 | Grafana(主流) | 内置或 Grafana | Nagios XI 或外部工具 | 内置强大仪表盘 |
| API | 强大(支持 PromQL 查询) | 支持 REST API | 有限 | 丰富 API |
- Prometheus:云原生生态最佳。
- Zabbix:传统 IT 生态丰富。
- Nagios:插件生态强大但老旧。
- Datadog:商业集成最全面。
7. 优缺点
| 工具 | 优点 | 缺点 |
|-------------|--------------------------------|-------------------------------|
| Prometheus | - 云原生支持强
- PromQL 灵活
- 开源免费 | - 单机存储有限
- 配置复杂 |
| Zabbix | - 功能全面
- 内置发现和告警
- 开源 | - 部署复杂
- 性能依赖数据库 |
| Nagios | - 简单易上手
- 插件灵活
- 开源 | - 无时间序列
- 扩展性差 |
| Datadog | - 开箱即用
- APM 强大
- 云集成好 | - 商业收费
- 数据不可控 |
8. 使用场景
| 工具 | 最佳场景 | 不适用场景 |
|-------------|--------------------------------|-----------------------------|
| Prometheus | - Kubernetes/微服务
- 动态环境 | - 超大规模单机
- 简单状态检查 |
| Zabbix | - 传统服务器
- 网络设备监控 | - 云原生动态环境
- 轻量需求 |
| Nagios | - 小规模状态监控
- 简单网络 | - 时间序列分析
- 大规模系统 |
| Datadog | - 企业云监控
- APM 需求 | - 预算有限
- 自托管需求 |
9. 实际案例对比
- 监控服务器是否正常:
- Prometheus:用
node_exporter
,查询 CPU、内存。 - Zabbix:Agent 推送资源数据,GUI 配置告警。
- Nagios:用
check_cpu
插件检查状态。 - Datadog:Agent 自动采集,仪表盘展示。
- Prometheus:用
- 网站可用性:
- Prometheus:用
blackbox_exporter
探测 HTTP。 - Zabbix:内置 Web 监控模板。
- Nagios:用
check_http
插件。 - Datadog:内置 Synthetic Monitoring。
- Prometheus:用
10. 选择建议
- 预算有限 + 云原生:选 Prometheus,搭配 Grafana 和 Exporter。
- 传统 IT + 全面功能:选 Zabbix,适合网络和服务器监控。
- 简单状态检查:选 Nagios,适合小型环境。
- 企业级 + 云服务:选 Datadog,省心但需付费。
如果你是运维新手,建议从 Prometheus 开始,因为它在现代环境(如 Docker、Kubernetes)中应用广泛,社区活跃,学习资源丰富。如果有具体需求(比如监控某服务),可以告诉我,我帮你细化方案!
Zabbix 主要是推,Prometheus 主要是拉 ,Prometheus性能和可以支持的节点是否比较不足
你提到“Zabbix 主要是推,Prometheus 主要是拉”,这个观点是正确的,并且确实是两者架构设计的核心区别。接下来,我会详细分析这个区别,并回答你的问题:Prometheus 在性能和支持节点数方面是否比较不足。我们将从工作模式、性能表现和可扩展性三个方面展开讨论。
1. Zabbix 主要是推,Prometheus 主要是拉
Zabbix:推模式(Push)为主
- 机制:
- Zabbix Agent 默认采用主动模式(Active Mode),通过
ServerActive
配置,Agent 主动将数据推送给 Zabbix Server(默认端口 10051)。 - Agent 定期采集数据(如 CPU、内存),然后异步发送到 Server。
- Zabbix Agent 默认采用主动模式(Active Mode),通过
- 优势:
- Server 无需轮询大量主机,负载较低,适合分布式环境。
- 在防火墙或 NAT 场景下,Agent 只需能访问 Server,网络配置简单。
- 劣势:
- 数据推送频率受限于 Agent 配置(如 1 秒到数分钟),实时性稍弱。
- Server 端依赖数据库(如 MySQL),高并发推送可能导致瓶颈。
Prometheus:拉模式(Pull)为主
- 机制:
- Prometheus 通过
scrape_configs
配置,从目标(如/metrics
端点)定期拉取数据(默认端口 9090)。 - 依赖 Exporter(如
node_exporter
)暴露指标,Prometheus 主动抓取。
- Prometheus 通过
- 优势:
- 实时性强,Server 控制采集频率(默认 15 秒,可调)。
- 动态服务发现(如 Kubernetes SD)适应云原生环境,目标变更无需手动调整。
- 劣势:
- Server 需访问所有目标的端口(如 9100),在复杂网络中配置防火墙较麻烦。
- 高频拉取可能增加 Server 负载,尤其在目标数量庞大时。
小结
- Zabbix 的推模式更适合传统静态环境或网络受限场景,减轻 Server 负担。
- Prometheus 的拉模式更适合动态、云原生环境,强调实时性和灵活性。
2. Prometheus 的性能表现
Prometheus 的性能特点
- 时间序列数据库(TSDB):
- Prometheus 使用内置的高效 TSDB,专为时间序列数据设计,查询和存储性能优异。
- 数据压缩和索引优化,支持高频采集(如每秒采样)。
- 单机性能:
- 单实例 Prometheus 可处理数万指标(metrics),每秒处理百万级样本(samples)。
- 官方测试表明,单机可支持 80-100 万 samples/sec(取决于硬件和配置)。
- 查询能力:
- PromQL 提供强大的查询功能(如
rate()
、increase()
),支持复杂分析,且响应快。
- PromQL 提供强大的查询功能(如
- 局限性:
- 默认存储为本地磁盘,默认保留 15 天,数据量大时需清理或扩展。
- 单机内存占用较高(因数据驻留内存以加速查询)。
Zabbix 的性能特点
- 关系型数据库:
- Zabbix 依赖外部数据库(如 MySQL、PostgreSQL),性能受限于数据库优化。
- 数据写入和查询效率不如专用 TSDB,尤其在高并发下。
- 单机性能:
- 单机 Zabbix Server 可支持约 1 万个设备(10,000 nodes),采集频率 1 分钟时表现良好。
- 高频采集(如 1 秒)或大规模部署时,数据库可能成为瓶颈。
- 查询能力:
- 无专用查询语言,依赖 GUI 或 SQL,复杂分析能力较弱。
性能对比
- 采集效率:
- Prometheus 的拉模式更高效,支持高频采样(秒级),适合实时监控。
- Zabbix 的推模式效率稍低,频率受 Agent 配置限制。
- 查询速度:
- Prometheus 的 TSDB 和 PromQL 远超 Zabbix 的数据库查询性能。
- 负载分布:
- Zabbix 推模式将负载分散到 Agent,Server 压力小。
- Prometheus 拉模式集中负载在 Server,单机能力强但扩展复杂。
小结
- Prometheus 在单机性能上更强,尤其在高频采集和查询方面优于 Zabbix。
- Zabbix 的性能受数据库限制,但在小规模、低频场景下表现稳定。
3. Prometheus 支持的节点数是否不足
Prometheus 的扩展性
- 单机限制:
- 单实例支持约 1000-2000 个目标(targets,如节点或服务),具体取决于指标数量和采集频率。
- 超过此规模,内存和 CPU 可能饱和。
- 扩展方案:
- Federation(联邦):
- 多实例 Prometheus 分担目标,高级实例聚合数据。
- 适合分区域或分层监控。
- Thanos/Cortex:
- Thanos 提供全局视图和长期存储,支持无限节点。
- Cortex 增强水平扩展,可处理百万级指标。
- 服务发现:
- 动态发现(如 Kubernetes SD)支持节点自动增减,无需手动配置。
- Federation(联邦):
- 实际案例:
- Kubernetes 集群中,Prometheus 配合 Operator 和 Thanos,可监控数千节点和数十万 Pod。
Zabbix 的扩展性
- 单机限制:
- 单 Server 支持约 1 万个设备(10,000 nodes),但高负载下需优化数据库。
- 扩展方案:
- Zabbix Proxy:
- 分布式代理收集数据并推送给 Server,支持大规模部署。
- 部署简单,适合传统分布式环境。
- 数据库优化:
- 使用分区表或 TimescaleDB 提升性能。
- Zabbix Proxy:
- 实际案例:
- 大型企业用 Proxy 架构监控数万设备(如服务器、网络设备)。
节点支持对比
- 单机能力:
- Prometheus 单机支持的目标数(1000-2000)少于 Zabbix(约 1 万),但指标密度更高。
- 扩展性:
- Prometheus 通过 Thanos/Cortex 可扩展到数万节点甚至更多,潜力更大。
- Zabbix 通过 Proxy 也能支持数万设备,但数据库仍是瓶颈。
- 动态性:
- Prometheus 的服务发现更适合动态环境(如 Kubernetes)。
- Zabbix 的 LLD(低级发现)功能较静态,适应性稍逊。
小结
- 单机状态下,Prometheus 支持的节点数可能少于 Zabbix,但性能更优。
- 扩展后,Prometheus(借助 Thanos/Cortex)支持的节点数和灵活性超过 Zabbix。
4. 综合评价
Prometheus 性能和节点支持是否不足?
- 性能:
- Prometheus 的 TSDB 和拉模式使其在高频采集和查询上表现卓越,不足之处在于单机内存占用较高。
- Zabbix 的推模式性能稳定,但数据库限制了高负载场景。
- 节点支持:
- 单机下,Prometheus 支持的节点数不如 Zabbix,但通过扩展工具(如 Thanos),其能力远超 Zabbix。
- Zabbix 的 Proxy 架构扩展性强,但受限于数据库和传统设计。
适用场景
- Prometheus:
- 适合云原生、动态环境(如 Kubernetes),追求高性能和实时性。
- 节点数多时需额外扩展组件,但潜力巨大。
- Zabbix:
- 适合传统 IT(如服务器、网络设备),节点数中等时开箱即用。
- 高负载下需数据库优化,扩展性稍逊。
5. 新手建议
- 如果你是新手运维:
- 小规模尝试:Zabbix 的推模式和 GUI 配置更简单,适合快速上手。
- 云原生环境:Prometheus 的拉模式和生态(如 Grafana)更现代化,值得学习。
- 性能和节点测试:
- 小规模(<100 节点):两者差别不大,Zabbix 可能更省心。
- 大规模(>1000 节点):Prometheus 配合扩展工具更有优势。
如果你有具体环境(如节点数、采集频率),可以告诉我,我帮你进一步分析选择!
blackbox_exporter 返回示例
http://127.0.0.1:9115/probe?target=api.cn&module=icmp&debug=false
HELP probe_dns_lookup_time_seconds Returns the time taken for probe dns lookup in seconds
TYPE probe_dns_lookup_time_seconds gauge
probe_dns_lookup_time_seconds 0.180650917
HELP probe_duration_seconds Returns how long the probe took to complete in seconds
TYPE probe_duration_seconds gauge
probe_duration_seconds 0.189979708
HELP probe_icmp_duration_seconds Duration of icmp request by phase
TYPE probe_icmp_duration_seconds gauge
probe_icmp_duration_seconds{phase="resolve"} 0.180650917
probe_icmp_duration_seconds{phase="rtt"} 0.008315333
probe_icmp_duration_seconds{phase="setup"} 0.000723375
HELP probe_icmp_reply_hop_limit Replied packet hop limit (TTL for ipv4)
TYPE probe_icmp_reply_hop_limit gauge
probe_icmp_reply_hop_limit 56
HELP probe_ip_addr_hash Specifies the hash of IP address. It's useful to detect if the IP address changes.
TYPE probe_ip_addr_hash gauge
probe_ip_addr_hash 1.849020578e+09
HELP probe_ip_protocol Specifies whether probe ip protocol is IP4 or IP6
TYPE probe_ip_protocol gauge
probe_ip_protocol 4
HELP probe_success Displays whether or not the probe was a success
TYPE probe_success gauge
probe_success 1
这段 Prometheus 数据展示了一个 ICMP(通常是 ping)探针的监控指标,反映了对某个目标进行网络探测的结果。以下是逐项的中文解释:
1. DNS 解析耗时
# HELP probe_dns_lookup_time_seconds 返回探针 DNS 查找所需的时间(秒)
# TYPE probe_dns_lookup_time_seconds gauge
probe_dns_lookup_time_seconds 0.180650917
- 解释: DNS 解析耗时
0.180650917
秒,约 181 毫秒。这表示将目标域名解析为 IP 地址所需的时间,略高,可能与网络延迟或 DNS 服务器响应速度有关。
2. 探针总耗时
# HELP probe_duration_seconds 返回探针完成所需的总时间(秒)
# TYPE probe_duration_seconds gauge
probe_duration_seconds 0.189979708
- 解释: 整个探针过程耗时
0.189979708
秒,约 190 毫秒。包括 DNS 解析、ICMP 请求等所有阶段的总和。
3. ICMP 请求各阶段耗时
# HELP probe_icmp_duration_seconds ICMP 请求按阶段的耗时
# TYPE probe_icmp_duration_seconds gauge
probe_icmp_duration_seconds{phase="resolve"} 0.180650917
probe_icmp_duration_seconds{phase="rtt"} 0.008315333
probe_icmp_duration_seconds{phase="setup"} 0.000723375
- 解释: ICMP 请求分为三个阶段:
resolve
(DNS 解析):0.180650917
秒,约 181 毫秒,与probe_dns_lookup_time_seconds
一致,占总耗时的大部分。rtt
(往返时间,Round-Trip Time):0.008315333
秒,约 8.3 毫秒,表示发送 ICMP 请求并收到响应的时间,网络延迟较低。setup
(建立阶段):0.000723375
秒,约 0.7 毫秒,表示准备发送 ICMP 请求的耗时,非常短。
- 总和: 181 + 8.3 + 0.7 ≈ 190 毫秒,与
probe_duration_seconds
吻合。
4. ICMP 回复跳数限制
# HELP probe_icmp_reply_hop_limit 回复数据包的跳数限制(IPv4 的 TTL)
# TYPE probe_icmp_reply_hop_limit gauge
probe_icmp_reply_hop_limit 56
- 解释: 回复的 ICMP 数据包的 TTL(Time To Live,跳数限制)值为
56
。TTL 表示数据包在网络中可以经过的最大路由器跳数。初始 TTL 通常是 64、128 或 255,这里为 56,说明数据包可能经过了 8 次路由(假设初始 TTL 为 64)。
5. IP 地址哈希
# HELP probe_ip_addr_hash 指定 IP 地址的哈希值,用于检测 IP 地址是否变化
# TYPE probe_ip_addr_hash gauge
probe_ip_addr_hash 1.849020578e+09
- 解释: 目标 IP 地址的哈希值为
1,849,020,578
。这个值用于追踪目标 IP 是否发生变化(例如 DNS 解析结果更新)。具体 IP 地址不可从哈希直接反推。
6. IP 协议
# HELP probe_ip_protocol 指定探针使用的 IP 协议是 IPv4 还是 IPv6
# TYPE probe_ip_protocol gauge
probe_ip_protocol 4
- 解释:
4
表示使用的是 IPv4 协议,而不是 IPv6。
7. 探针成功
# HELP probe_success 显示探针是否成功
# TYPE probe_success gauge
probe_success 1
- 解释:
1
表示探针成功,目标响应了 ICMP 请求。
总结
- 探针目标: 使用 IPv4 协议对某个目标执行 ICMP(ping)探测。
- 耗时: 总耗时约 190 毫秒,其中 DNS 解析占 181 毫秒(约 95%),实际网络往返时间仅 8.3 毫秒,说明网络连接很快,但 DNS 解析较慢。
- 网络路径: TTL 为 56,可能经过 8 个路由器(假设初始 TTL 为 64)。
- 结果: 探针成功,目标可达。
如果需要进一步分析(比如目标是谁,或为何 DNS 解析偏慢),可以提供更多上下文或让我帮你搜索相关信息!有什么具体想了解的吗?
http://127.0.0.1:9115/probe?target=api.cn&module=http_2xx&debug=false
HELP probe_dns_lookup_time_seconds Returns the time taken for probe dns lookup in seconds
TYPE probe_dns_lookup_time_seconds gauge
probe_dns_lookup_time_seconds 0.099875208
HELP probe_duration_seconds Returns how long the probe took to complete in seconds
TYPE probe_duration_seconds gauge
probe_duration_seconds 0.236132625
HELP probe_failed_due_to_regex Indicates if probe failed due to regex
TYPE probe_failed_due_to_regex gauge
probe_failed_due_to_regex 0
HELP probe_http_content_length Length of http content response
TYPE probe_http_content_length gauge
probe_http_content_length -1
HELP probe_http_duration_seconds Duration of http request by phase, summed over all redirects
TYPE probe_http_duration_seconds gauge
probe_http_duration_seconds{phase="connect"} 0.016199790999999998
probe_http_duration_seconds{phase="processing"} 0.074317625
probe_http_duration_seconds{phase="resolve"} 0.10107029199999999
probe_http_duration_seconds{phase="tls"} 0.0264935
probe_http_duration_seconds{phase="transfer"} 0.016835709
HELP probe_http_redirects The number of redirects
TYPE probe_http_redirects gauge
probe_http_redirects 1
HELP probe_http_ssl Indicates if SSL was used for the final redirect
TYPE probe_http_ssl gauge
probe_http_ssl 1
HELP probe_http_status_code Response HTTP status code
TYPE probe_http_status_code gauge
probe_http_status_code 200
HELP probe_http_uncompressed_body_length Length of uncompressed response body
TYPE probe_http_uncompressed_body_length gauge
probe_http_uncompressed_body_length 17502
HELP probe_http_version Returns the version of HTTP of the probe response
TYPE probe_http_version gauge
probe_http_version 1.1
HELP probe_ip_addr_hash Specifies the hash of IP address. It's useful to detect if the IP address changes.
TYPE probe_ip_addr_hash gauge
probe_ip_addr_hash 1.849020578e+09
HELP probe_ip_protocol Specifies whether probe ip protocol is IP4 or IP6
TYPE probe_ip_protocol gauge
probe_ip_protocol 4
HELP probe_ssl_earliest_cert_expiry Returns last SSL chain expiry in unixtime
TYPE probe_ssl_earliest_cert_expiry gauge
probe_ssl_earliest_cert_expiry 1.74643561e+09
HELP probe_ssl_last_chain_expiry_timestamp_seconds Returns last SSL chain expiry in timestamp
TYPE probe_ssl_last_chain_expiry_timestamp_seconds gauge
probe_ssl_last_chain_expiry_timestamp_seconds 1.74643561e+09
HELP probe_ssl_last_chain_info Contains SSL leaf certificate information
TYPE probe_ssl_last_chain_info gauge
probe_ssl_last_chain_info{fingerprint_sha256="6434662aa222147a3c959e44bdb412372ead9c8a48f7bae1341b0e86a5e1bb77",issuer="CN=GlobalSign GCC R6 AlphaSSL CA 2023,O=GlobalSign nv-sa,C=BE",serialnumber="1c76b2f48eabe234db9348b7",subject="CN=.api.cn",subjectalternative=".api.cn,api.cn"} 1
HELP probe_success Displays whether or not the probe was a success
TYPE probe_success gauge
probe_success 1
HELP probe_tls_cipher_info Returns the TLS cipher negotiated during handshake
TYPE probe_tls_cipher_info gauge
probe_tls_cipher_info{cipher="TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"} 1
HELP probe_tls_version_info Returns the TLS version used or NaN when unknown
TYPE probe_tls_version_info gauge
probe_tls_version_info{version="TLS 1.2"} 1
我来为你详细解释这段 Prometheus 监控数据。这是关于某个探针(probe)检查目标服务(可能是 HTTP 服务)的指标,包含了 DNS 解析、HTTP 请求、SSL/TLS 等多个方面的信息。以下是逐项的中文解释:
1. DNS 解析相关
# HELP probe_dns_lookup_time_seconds 返回探针 DNS 查找所需的时间(秒)
# TYPE probe_dns_lookup_time_seconds gauge
probe_dns_lookup_time_seconds 0.099875208
- 解释: 表示探针执行 DNS 解析(将域名转换为 IP 地址)所需的时间。这里的值是
0.099875208
秒,约 100 毫秒,说明 DNS 解析速度正常。
2. 探针总耗时
# HELP probe_duration_seconds 返回探针完成所需的总时间(秒)
# TYPE probe_duration_seconds gauge
probe_duration_seconds 0.236132625
- 解释: 表示探针从开始到结束的总耗时。这里的值是
0.236132625
秒,约 236 毫秒,包括 DNS 解析、连接建立、数据传输等所有阶段。
3. 正则表达式失败
# HELP probe_failed_due_to_regex 指示探针是否因正则表达式失败
# TYPE probe_failed_due_to_regex gauge
probe_failed_due_to_regex 0
- 解释: 如果探针配置了正则表达式来检查响应内容,
表示没有因正则匹配失败而导致探针失败,说明检查通过。
4. HTTP 内容长度
# HELP probe_http_content_length HTTP 响应内容的长度
# TYPE probe_http_content_length gauge
probe_http_content_length -1
- 解释: 表示 HTTP 响应的内容长度(字节)。这里是
-1
,通常意味着服务器未返回Content-Length
头,或者内容长度未知(可能是分块传输编码)。
5. HTTP 请求各阶段耗时
# HELP probe_http_duration_seconds 按阶段返回 HTTP 请求的耗时(秒),包含所有重定向的总和
# TYPE probe_http_duration_seconds gauge
probe_http_duration_seconds{phase="connect"} 0.016199790999999998
probe_http_duration_seconds{phase="processing"} 0.074317625
probe_http_duration_seconds{phase="resolve"} 0.10107029199999999
probe_http_duration_seconds{phase="tls"} 0.0264935
probe_http_duration_seconds{phase="transfer"} 0.016835709
- 解释: 将 HTTP 请求拆分为不同阶段的耗时:
resolve
(域名解析):0.101070291
秒,约 101 毫秒,与probe_dns_lookup_time_seconds
一致。connect
(建立 TCP 连接):0.016199791
秒,约 16 毫秒。tls
(TLS 握手):0.0264935
秒,约 26 毫秒。processing
(服务器处理):0.074317625
秒,约 74 毫秒。transfer
(数据传输):0.016835709
秒,约 17 毫秒。
- 总结: 总耗时约 236 毫秒,与
probe_duration_seconds
吻合。
6. HTTP 重定向次数
# HELP probe_http_redirects 重定向次数
# TYPE probe_http_redirects gauge
probe_http_redirects 1
- 解释: 表示探针经历了 1 次 HTTP 重定向(比如从 HTTP 到 HTTPS)。
7. 最终连接是否使用 SSL
# HELP probe_http_ssl 指示最终重定向是否使用了 SSL
# TYPE probe_http_ssl gauge
probe_http_ssl 1
- 解释:
1
表示最终连接使用了 SSL/TLS(即 HTTPS)。
8. HTTP 状态码
# HELP probe_http_status_code 响应的 HTTP 状态码
# TYPE probe_http_status_code gauge
probe_http_status_code 200
- 解释: 返回的状态码是
200
,表示请求成功。
9. 未压缩响应体长度
# HELP probe_http_uncompressed_body_length 未压缩响应体的长度
# TYPE probe_http_uncompressed_body_length gauge
probe_http_uncompressed_body_length 17502
- 解释: 响应体的未压缩长度是 17,502 字节(约 17 KB)。
10. HTTP 版本
# HELP probe_http_version 返回探针响应的 HTTP 版本
# TYPE probe_http_version gauge
probe_http_version 1.1
- 解释: 使用的是 HTTP/1.1 协议。
11. IP 地址哈希
# HELP probe_ip_addr_hash 指定 IP 地址的哈希值,用于检测 IP 地址是否变化
# TYPE probe_ip_addr_hash gauge
probe_ip_addr_hash 1.849020578e+09
- 解释: IP 地址的哈希值为
1,849,020,578
,用于追踪目标 IP 是否发生变化。
12. IP 协议
# HELP probe_ip_protocol 指定探针使用的 IP 协议是 IPv4 还是 IPv6
# TYPE probe_ip_protocol gauge
probe_ip_protocol 4
- 解释:
4
表示使用了 IPv4 协议。
13. SSL 证书到期时间
# HELP probe_ssl_earliest_cert_expiry 返回 SSL 证书链中最早的到期时间(Unix 时间戳)
# TYPE probe_ssl_earliest_cert_expiry gauge
probe_ssl_earliest_cert_expiry 1.74643561e+09
- 解释:
1,746,435,610
秒转换为日期是 2025 年 5 月 6 日 09:20:10 UTC,表示证书链中最早的到期时间。今天是 2025 年 3 月 17 日,剩余约 50 天。
# HELP probe_ssl_last_chain_expiry_timestamp_seconds 返回 SSL 证书链最后到期时间(时间戳)
# TYPE probe_ssl_last_chain_expiry_timestamp_seconds gauge
probe_ssl_last_chain_expiry_timestamp_seconds 1.74643561e+09
- 解释: 与上面一致,证书链的最后到期时间也是 2025 年 5 月 6 日。
14. SSL 证书信息
# HELP probe_ssl_last_chain_info 包含 SSL 叶子证书信息
# TYPE probe_ssl_last_chain_info gauge
probe_ssl_last_chain_info{fingerprint_sha256="6434662aa222147a3c959e44bdb412372ead9c8a48f7bae1341b0e86a5e1bb77",issuer="CN=GlobalSign GCC R6 AlphaSSL CA 2023,O=GlobalSign nv-sa,C=BE",serialnumber="1c76b2f48eabe234db9348b7",subject="CN=*.api.cn",subjectalternative="*.api.cn,api.cn"} 1
- 解释: 叶子证书的详细信息:
- 指纹(SHA256):
6434662aa...
- 颁发者:GlobalSign GCC R6 AlphaSSL CA 2023(比利时)。
- 序列号:
1c76b2f48eabe234db9348b7
。 - 主题:
CN=*.api.cn
(通配符证书)。 - 备用名称:
*.api.cn, api.cn
。
- 指纹(SHA256):
15. 探针成功
# HELP probe_success 显示探针是否成功
# TYPE probe_success gauge
probe_success 1
- 解释:
1
表示探针成功。
16. TLS 加密套件
# HELP probe_tls_cipher_info 返回 TLS 握手中协商的加密套件
# TYPE probe_tls_cipher_info gauge
probe_tls_cipher_info{cipher="TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"} 1
- 解释: 使用了
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
加密套件,安全性较高。
17. TLS 版本
# HELP probe_tls_version_info 返回使用的 TLS 版本
# TYPE probe_tls_version_info gauge
probe_tls_version_info{version="TLS 1.2"} 1
- 解释: 使用的是 TLS 1.2 协议。
总结
这个探针检查了一个 HTTPS 服务(*.api.cn
),整个过程耗时约 236 毫秒,DNS 解析约 100 毫秒,状态码 200,证书将在 2025 年 5 月 6 日到期(还有约 50 天)。探针成功,未发现问题,使用了 IPv4、HTTP/1.1 和 TLS 1.2,一切正常运行。有什么具体想深入了解的吗?
node_exporter 返回示例
http://127.0.0.1:9100/metrics?target=api.cn&module=http_2xx&debug=false
HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent
TYPE go_gc_gogc_percent gauge
go_gc_gogc_percent 100
HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes
TYPE go_gc_gomemlimit_bytes gauge
go_gc_gomemlimit_bytes 9.223372036854776e+18
HELP go_goroutines Number of goroutines that currently exist.
TYPE go_goroutines gauge
go_goroutines 7
HELP go_info Information about the Go environment.
TYPE go_info gauge
go_info{version="go1.24.1"} 1
HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 657056
HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 657056
HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 1.445589e+06
HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
TYPE go_memstats_frees_total counter
go_memstats_frees_total 224
HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 1.940696e+06
HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 657056
HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 1.900544e+06
HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 1.900544e+06
HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 3923
HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
TYPE go_memstats_heap_released_bytes gauge
go_memstats_heap_released_bytes 1.900544e+06
HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 3.801088e+06
HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 0
HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 4147
HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 1208
HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 31408
HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 32960
HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 48960
HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 4.194304e+06
HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 745323
HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 393216
HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 393216
HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 8.40628e+06
HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads
TYPE go_sched_gomaxprocs_threads gauge
go_sched_gomaxprocs_threads 1
HELP go_threads Number of OS threads created.
TYPE go_threads gauge
go_threads 7
HELP node_boot_time_seconds Unix time of last boot, including microseconds.
TYPE node_boot_time_seconds gauge
node_boot_time_seconds 1.737388468861951e+09
HELP node_cpu_seconds_total Seconds the CPUs spent in each mode.
TYPE node_cpu_seconds_total counter
node_cpu_seconds_total{cpu="0",mode="idle"} 1.6048261e+06
node_cpu_seconds_total{cpu="0",mode="nice"} 0
node_cpu_seconds_total{cpu="0",mode="system"} 194986.66
node_cpu_seconds_total{cpu="0",mode="user"} 174748.74
node_cpu_seconds_total{cpu="1",mode="idle"} 1.66515699e+06
node_cpu_seconds_total{cpu="1",mode="nice"} 0
node_cpu_seconds_total{cpu="1",mode="system"} 165075.32
node_cpu_seconds_total{cpu="1",mode="user"} 154451.79
node_cpu_seconds_total{cpu="10",mode="idle"} 2.00943864e+06
node_cpu_seconds_total{cpu="10",mode="nice"} 0
node_cpu_seconds_total{cpu="10",mode="system"} 3149.53
node_cpu_seconds_total{cpu="10",mode="user"} 9955.19
node_cpu_seconds_total{cpu="11",mode="idle"} 2.00944043e+06
node_cpu_seconds_total{cpu="11",mode="nice"} 0
node_cpu_seconds_total{cpu="11",mode="system"} 3167.68
node_cpu_seconds_total{cpu="11",mode="user"} 9948.72
node_cpu_seconds_total{cpu="12",mode="idle"} 2.00996266e+06
node_cpu_seconds_total{cpu="12",mode="nice"} 0
node_cpu_seconds_total{cpu="12",mode="system"} 3047.07
node_cpu_seconds_total{cpu="12",mode="user"} 9580.09
node_cpu_seconds_total{cpu="13",mode="idle"} 2.0103041e+06
node_cpu_seconds_total{cpu="13",mode="nice"} 0
node_cpu_seconds_total{cpu="13",mode="system"} 3004.28
node_cpu_seconds_total{cpu="13",mode="user"} 9294.98
node_cpu_seconds_total{cpu="2",mode="idle"} 1.76961929e+06
node_cpu_seconds_total{cpu="2",mode="nice"} 0
node_cpu_seconds_total{cpu="2",mode="system"} 114183.01
node_cpu_seconds_total{cpu="2",mode="user"} 113225.68
node_cpu_seconds_total{cpu="3",mode="idle"} 1.83257525e+06
node_cpu_seconds_total{cpu="3",mode="nice"} 0
node_cpu_seconds_total{cpu="3",mode="system"} 81655.16
node_cpu_seconds_total{cpu="3",mode="user"} 91278.43
node_cpu_seconds_total{cpu="4",mode="idle"} 2.00880497e+06
node_cpu_seconds_total{cpu="4",mode="nice"} 0
node_cpu_seconds_total{cpu="4",mode="system"} 3332.93
node_cpu_seconds_total{cpu="4",mode="user"} 10303.43
node_cpu_seconds_total{cpu="5",mode="idle"} 2.00908416e+06
node_cpu_seconds_total{cpu="5",mode="nice"} 0
node_cpu_seconds_total{cpu="5",mode="system"} 3265.66
node_cpu_seconds_total{cpu="5",mode="user"} 10247.04
node_cpu_seconds_total{cpu="6",mode="idle"} 2.0092584e+06
node_cpu_seconds_total{cpu="6",mode="nice"} 0
node_cpu_seconds_total{cpu="6",mode="system"} 3252.1
node_cpu_seconds_total{cpu="6",mode="user"} 10107.97
node_cpu_seconds_total{cpu="7",mode="idle"} 2.00939525e+06
node_cpu_seconds_total{cpu="7",mode="nice"} 0
node_cpu_seconds_total{cpu="7",mode="system"} 3216.94
node_cpu_seconds_total{cpu="7",mode="user"} 10023.3
node_cpu_seconds_total{cpu="8",mode="idle"} 2.00916048e+06
node_cpu_seconds_total{cpu="8",mode="nice"} 0
node_cpu_seconds_total{cpu="8",mode="system"} 3290.98
node_cpu_seconds_total{cpu="8",mode="user"} 10179.82
node_cpu_seconds_total{cpu="9",mode="idle"} 2.0094225e+06
node_cpu_seconds_total{cpu="9",mode="nice"} 0
node_cpu_seconds_total{cpu="9",mode="system"} 3157.41
node_cpu_seconds_total{cpu="9",mode="user"} 9952.5
HELP node_disk_read_bytes_total The total number of bytes read successfully.
TYPE node_disk_read_bytes_total counter
node_disk_read_bytes_total{device="disk0"} 1.374778241024e+12
node_disk_read_bytes_total{device="disk4"} 7.962624e+06
node_disk_read_bytes_total{device="disk5"} 2.9613056e+07
HELP node_disk_read_errors_total The total number of read errors.
TYPE node_disk_read_errors_total counter
node_disk_read_errors_total{device="disk0"} 0
node_disk_read_errors_total{device="disk4"} 0
node_disk_read_errors_total{device="disk5"} 0
HELP node_disk_read_retries_total The total number of read retries.
TYPE node_disk_read_retries_total counter
node_disk_read_retries_total{device="disk0"} 0
node_disk_read_retries_total{device="disk4"} 0
node_disk_read_retries_total{device="disk5"} 0
HELP node_disk_read_sectors_total The total number of sectors read successfully.
TYPE node_disk_read_sectors_total counter
node_disk_read_sectors_total{device="disk0"} 19617.591064453125
node_disk_read_sectors_total{device="disk4"} 0.181640625
node_disk_read_sectors_total{device="disk5"} 3.826171875
HELP node_disk_read_time_seconds_total The total number of seconds spent by all reads.
TYPE node_disk_read_time_seconds_total counter
node_disk_read_time_seconds_total{device="disk0"} 16492.82938385
node_disk_read_time_seconds_total{device="disk4"} 0.298451998
node_disk_read_time_seconds_total{device="disk5"} 1.4305535520000001
HELP node_disk_reads_completed_total The total number of reads completed successfully.
TYPE node_disk_reads_completed_total counter
node_disk_reads_completed_total{device="disk0"} 8.0353653e+07
node_disk_reads_completed_total{device="disk4"} 372
node_disk_reads_completed_total{device="disk5"} 1959
HELP node_disk_write_errors_total The total number of write errors.
TYPE node_disk_write_errors_total counter
node_disk_write_errors_total{device="disk0"} 0
node_disk_write_errors_total{device="disk4"} 0
node_disk_write_errors_total{device="disk5"} 0
HELP node_disk_write_retries_total The total number of write retries.
TYPE node_disk_write_retries_total counter
node_disk_write_retries_total{device="disk0"} 0
node_disk_write_retries_total{device="disk4"} 0
node_disk_write_retries_total{device="disk5"} 0
HELP node_disk_write_time_seconds_total This is the total number of seconds spent by all writes.
TYPE node_disk_write_time_seconds_total counter
node_disk_write_time_seconds_total{device="disk0"} 8720.636515421
node_disk_write_time_seconds_total{device="disk4"} 0
node_disk_write_time_seconds_total{device="disk5"} 1.78473225
HELP node_disk_writes_completed_total The total number of writes completed successfully.
TYPE node_disk_writes_completed_total counter
node_disk_writes_completed_total{device="disk0"} 9.6940981e+07
node_disk_writes_completed_total{device="disk4"} 0
node_disk_writes_completed_total{device="disk5"} 2184
HELP node_disk_written_bytes_total The total number of bytes written successfully.
TYPE node_disk_written_bytes_total counter
node_disk_written_bytes_total{device="disk0"} 2.269443596288e+12
node_disk_written_bytes_total{device="disk4"} 0
node_disk_written_bytes_total{device="disk5"} 1.77536e+07
HELP node_disk_written_sectors_total The total number of sectors written successfully.
TYPE node_disk_written_sectors_total counter
node_disk_written_sectors_total{device="disk0"} 23667.231689453125
node_disk_written_sectors_total{device="disk4"} 0
node_disk_written_sectors_total{device="disk5"} 4.265625
HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
TYPE node_exporter_build_info gauge
node_exporter_build_info{branch="master",goarch="arm64",goos="darwin",goversion="go1.24.1",revision="0c10545e8dfb983f4c013281c4904be27f645de2",tags="unknown",version="1.9.0"} 1
HELP node_filesystem_avail_bytes Filesystem space available to non-root users in bytes.
TYPE node_filesystem_avail_bytes gauge
node_filesystem_avail_bytes{device="/dev/disk1s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/iSCPreboot"} 5.03803904e+08
node_filesystem_avail_bytes{device="/dev/disk1s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/xarts"} 5.03803904e+08
node_filesystem_avail_bytes{device="/dev/disk1s3",device_error="",fstype="apfs",mountpoint="/System/Volumes/Hardware"} 5.03803904e+08
node_filesystem_avail_bytes{device="/dev/disk2s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/SFR/mnt1"} 3.475095552e+09
node_filesystem_avail_bytes{device="/dev/disk3s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/mnt1"} 7.17410553856e+11
node_filesystem_avail_bytes{device="/dev/disk3s1s1",device_error="",fstype="apfs",mountpoint="/"} 7.1741108224e+11
node_filesystem_avail_bytes{device="/dev/disk3s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/Preboot"} 7.17410553856e+11
node_filesystem_avail_bytes{device="/dev/disk3s4",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update"} 7.17410553856e+11
node_filesystem_avail_bytes{device="/dev/disk3s5",device_error="",fstype="apfs",mountpoint="/System/Volumes/Data"} 7.1741108224e+11
node_filesystem_avail_bytes{device="/dev/disk3s6",device_error="",fstype="apfs",mountpoint="/System/Volumes/VM"} 7.17410553856e+11
node_filesystem_avail_bytes{device="/dev/disk5s1",device_error="",fstype="msdos",mountpoint="/Volumes/KINGSTON"} 6.796980224e+09
node_filesystem_avail_bytes{device="OrbStack:/OrbStack",device_error="",fstype="nfs",mountpoint="/Users/forthxu/OrbStack"} 6.7862841344e+11
node_filesystem_avail_bytes{device="map auto_home",device_error="",fstype="autofs",mountpoint="/System/Volumes/Data/home"} 0
HELP node_filesystem_device_error Whether an error occurred while getting statistics for the given device.
TYPE node_filesystem_device_error gauge
node_filesystem_device_error{device="/dev/disk1s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/iSCPreboot"} 0
node_filesystem_device_error{device="/dev/disk1s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/xarts"} 0
node_filesystem_device_error{device="/dev/disk1s3",device_error="",fstype="apfs",mountpoint="/System/Volumes/Hardware"} 0
node_filesystem_device_error{device="/dev/disk2s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/SFR/mnt1"} 0
node_filesystem_device_error{device="/dev/disk3s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/mnt1"} 0
node_filesystem_device_error{device="/dev/disk3s1s1",device_error="",fstype="apfs",mountpoint="/"} 0
node_filesystem_device_error{device="/dev/disk3s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/Preboot"} 0
node_filesystem_device_error{device="/dev/disk3s4",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update"} 0
node_filesystem_device_error{device="/dev/disk3s5",device_error="",fstype="apfs",mountpoint="/System/Volumes/Data"} 0
node_filesystem_device_error{device="/dev/disk3s6",device_error="",fstype="apfs",mountpoint="/System/Volumes/VM"} 0
node_filesystem_device_error{device="/dev/disk5s1",device_error="",fstype="msdos",mountpoint="/Volumes/KINGSTON"} 0
node_filesystem_device_error{device="OrbStack:/OrbStack",device_error="",fstype="nfs",mountpoint="/Users/forthxu/OrbStack"} 0
node_filesystem_device_error{device="map auto_home",device_error="",fstype="autofs",mountpoint="/System/Volumes/Data/home"} 0
HELP node_filesystem_files Filesystem total file nodes.
TYPE node_filesystem_files gauge
node_filesystem_files{device="/dev/disk1s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/iSCPreboot"} 4.919992e+06
node_filesystem_files{device="/dev/disk1s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/xarts"} 4.919961e+06
node_filesystem_files{device="/dev/disk1s3",device_error="",fstype="apfs",mountpoint="/System/Volumes/Hardware"} 4.920051e+06
node_filesystem_files{device="/dev/disk2s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/SFR/mnt1"} 3.3936542e+07
node_filesystem_files{device="/dev/disk3s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/mnt1"} 4.293979786e+09
node_filesystem_files{device="/dev/disk3s1s1",device_error="",fstype="apfs",mountpoint="/"} 4.294488888e+09
node_filesystem_files{device="/dev/disk3s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/Preboot"} 7.005963924e+09
node_filesystem_files{device="/dev/disk3s4",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update"} 7.005962762e+09
node_filesystem_files{device="/dev/disk3s5",device_error="",fstype="apfs",mountpoint="/System/Volumes/Data"} 7.010848968e+09
node_filesystem_files{device="/dev/disk3s6",device_error="",fstype="apfs",mountpoint="/System/Volumes/VM"} 7.005962442e+09
node_filesystem_files{device="/dev/disk5s1",device_error="",fstype="msdos",mountpoint="/Volumes/KINGSTON"} 1
node_filesystem_files{device="OrbStack:/OrbStack",device_error="",fstype="nfs",mountpoint="/Users/forthxu/OrbStack"} 0
node_filesystem_files{device="map auto_home",device_error="",fstype="autofs",mountpoint="/System/Volumes/Data/home"} 0
HELP node_filesystem_files_free Filesystem total free file nodes.
TYPE node_filesystem_files_free gauge
node_filesystem_files_free{device="/dev/disk1s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/iSCPreboot"} 4.91996e+06
node_filesystem_files_free{device="/dev/disk1s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/xarts"} 4.91996e+06
node_filesystem_files_free{device="/dev/disk1s3",device_error="",fstype="apfs",mountpoint="/System/Volumes/Hardware"} 4.91996e+06
node_filesystem_files_free{device="/dev/disk2s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/SFR/mnt1"} 3.393648e+07
node_filesystem_files_free{device="/dev/disk3s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/mnt1"} 4.293575294e+09
node_filesystem_files_free{device="/dev/disk3s1s1",device_error="",fstype="apfs",mountpoint="/"} 4.294084721e+09
node_filesystem_files_free{device="/dev/disk3s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/Preboot"} 7.00596244e+09
node_filesystem_files_free{device="/dev/disk3s4",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update"} 7.00596244e+09
node_filesystem_files_free{device="/dev/disk3s5",device_error="",fstype="apfs",mountpoint="/System/Volumes/Data"} 7.0059676e+09
node_filesystem_files_free{device="/dev/disk3s6",device_error="",fstype="apfs",mountpoint="/System/Volumes/VM"} 7.00596244e+09
node_filesystem_files_free{device="/dev/disk5s1",device_error="",fstype="msdos",mountpoint="/Volumes/KINGSTON"} 0
node_filesystem_files_free{device="OrbStack:/OrbStack",device_error="",fstype="nfs",mountpoint="/Users/forthxu/OrbStack"} 0
node_filesystem_files_free{device="map auto_home",device_error="",fstype="autofs",mountpoint="/System/Volumes/Data/home"} 0
HELP node_filesystem_free_bytes Filesystem free space in bytes.
TYPE node_filesystem_free_bytes gauge
node_filesystem_free_bytes{device="/dev/disk1s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/iSCPreboot"} 5.03803904e+08
node_filesystem_free_bytes{device="/dev/disk1s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/xarts"} 5.03803904e+08
node_filesystem_free_bytes{device="/dev/disk1s3",device_error="",fstype="apfs",mountpoint="/System/Volumes/Hardware"} 5.03803904e+08
node_filesystem_free_bytes{device="/dev/disk2s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/SFR/mnt1"} 3.475095552e+09
node_filesystem_free_bytes{device="/dev/disk3s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/mnt1"} 7.17410553856e+11
node_filesystem_free_bytes{device="/dev/disk3s1s1",device_error="",fstype="apfs",mountpoint="/"} 7.1741108224e+11
node_filesystem_free_bytes{device="/dev/disk3s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/Preboot"} 7.17410553856e+11
node_filesystem_free_bytes{device="/dev/disk3s4",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update"} 7.17410553856e+11
node_filesystem_free_bytes{device="/dev/disk3s5",device_error="",fstype="apfs",mountpoint="/System/Volumes/Data"} 7.1741108224e+11
node_filesystem_free_bytes{device="/dev/disk3s6",device_error="",fstype="apfs",mountpoint="/System/Volumes/VM"} 7.17410553856e+11
node_filesystem_free_bytes{device="/dev/disk5s1",device_error="",fstype="msdos",mountpoint="/Volumes/KINGSTON"} 6.796980224e+09
node_filesystem_free_bytes{device="OrbStack:/OrbStack",device_error="",fstype="nfs",mountpoint="/Users/forthxu/OrbStack"} 6.7862841344e+11
node_filesystem_free_bytes{device="map auto_home",device_error="",fstype="autofs",mountpoint="/System/Volumes/Data/home"} 0
HELP node_filesystem_mount_info Filesystem mount information.
TYPE node_filesystem_mount_info gauge
node_filesystem_mount_info{device="/dev/disk1s1",major="",minor="",mountpoint="/System/Volumes/iSCPreboot"} 1
node_filesystem_mount_info{device="/dev/disk1s2",major="",minor="",mountpoint="/System/Volumes/xarts"} 1
node_filesystem_mount_info{device="/dev/disk1s3",major="",minor="",mountpoint="/System/Volumes/Hardware"} 1
node_filesystem_mount_info{device="/dev/disk2s1",major="",minor="",mountpoint="/System/Volumes/Update/SFR/mnt1"} 1
node_filesystem_mount_info{device="/dev/disk3s1",major="",minor="",mountpoint="/System/Volumes/Update/mnt1"} 1
node_filesystem_mount_info{device="/dev/disk3s1s1",major="",minor="",mountpoint="/"} 1
node_filesystem_mount_info{device="/dev/disk3s2",major="",minor="",mountpoint="/System/Volumes/Preboot"} 1
node_filesystem_mount_info{device="/dev/disk3s4",major="",minor="",mountpoint="/System/Volumes/Update"} 1
node_filesystem_mount_info{device="/dev/disk3s5",major="",minor="",mountpoint="/System/Volumes/Data"} 1
node_filesystem_mount_info{device="/dev/disk3s6",major="",minor="",mountpoint="/System/Volumes/VM"} 1
node_filesystem_mount_info{device="/dev/disk5s1",major="",minor="",mountpoint="/Volumes/KINGSTON"} 1
node_filesystem_mount_info{device="OrbStack:/OrbStack",major="",minor="",mountpoint="/Users/forthxu/OrbStack"} 1
node_filesystem_mount_info{device="map auto_home",major="",minor="",mountpoint="/System/Volumes/Data/home"} 1
HELP node_filesystem_purgeable_bytes Filesystem space available including purgeable space (MacOS specific).
TYPE node_filesystem_purgeable_bytes gauge
node_filesystem_purgeable_bytes{device="/dev/disk1s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/iSCPreboot"} 0
node_filesystem_purgeable_bytes{device="/dev/disk1s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/xarts"} 0
node_filesystem_purgeable_bytes{device="/dev/disk1s3",device_error="",fstype="apfs",mountpoint="/System/Volumes/Hardware"} 0
node_filesystem_purgeable_bytes{device="/dev/disk2s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/SFR/mnt1"} 0
node_filesystem_purgeable_bytes{device="/dev/disk3s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/mnt1"} 0
node_filesystem_purgeable_bytes{device="/dev/disk3s1s1",device_error="",fstype="apfs",mountpoint="/"} 7.24023851138e+11
node_filesystem_purgeable_bytes{device="/dev/disk3s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/Preboot"} 0
node_filesystem_purgeable_bytes{device="/dev/disk3s4",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update"} 7.24023851138e+11
node_filesystem_purgeable_bytes{device="/dev/disk3s5",device_error="",fstype="apfs",mountpoint="/System/Volumes/Data"} 7.24023851138e+11
node_filesystem_purgeable_bytes{device="/dev/disk3s6",device_error="",fstype="apfs",mountpoint="/System/Volumes/VM"} 0
node_filesystem_purgeable_bytes{device="/dev/disk5s1",device_error="",fstype="msdos",mountpoint="/Volumes/KINGSTON"} 0
node_filesystem_purgeable_bytes{device="OrbStack:/OrbStack",device_error="",fstype="nfs",mountpoint="/Users/forthxu/OrbStack"} 0
node_filesystem_purgeable_bytes{device="map auto_home",device_error="",fstype="autofs",mountpoint="/System/Volumes/Data/home"} 0
HELP node_filesystem_readonly Filesystem read-only status.
TYPE node_filesystem_readonly gauge
node_filesystem_readonly{device="/dev/disk1s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/iSCPreboot"} 0
node_filesystem_readonly{device="/dev/disk1s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/xarts"} 0
node_filesystem_readonly{device="/dev/disk1s3",device_error="",fstype="apfs",mountpoint="/System/Volumes/Hardware"} 0
node_filesystem_readonly{device="/dev/disk2s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/SFR/mnt1"} 0
node_filesystem_readonly{device="/dev/disk3s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/mnt1"} 0
node_filesystem_readonly{device="/dev/disk3s1s1",device_error="",fstype="apfs",mountpoint="/"} 1
node_filesystem_readonly{device="/dev/disk3s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/Preboot"} 0
node_filesystem_readonly{device="/dev/disk3s4",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update"} 0
node_filesystem_readonly{device="/dev/disk3s5",device_error="",fstype="apfs",mountpoint="/System/Volumes/Data"} 0
node_filesystem_readonly{device="/dev/disk3s6",device_error="",fstype="apfs",mountpoint="/System/Volumes/VM"} 0
node_filesystem_readonly{device="/dev/disk5s1",device_error="",fstype="msdos",mountpoint="/Volumes/KINGSTON"} 0
node_filesystem_readonly{device="OrbStack:/OrbStack",device_error="",fstype="nfs",mountpoint="/Users/forthxu/OrbStack"} 0
node_filesystem_readonly{device="map auto_home",device_error="",fstype="autofs",mountpoint="/System/Volumes/Data/home"} 0
HELP node_filesystem_size_bytes Filesystem size in bytes.
TYPE node_filesystem_size_bytes gauge
node_filesystem_size_bytes{device="/dev/disk1s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/iSCPreboot"} 5.24288e+08
node_filesystem_size_bytes{device="/dev/disk1s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/xarts"} 5.24288e+08
node_filesystem_size_bytes{device="/dev/disk1s3",device_error="",fstype="apfs",mountpoint="/System/Volumes/Hardware"} 5.24288e+08
node_filesystem_size_bytes{device="/dev/disk2s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/SFR/mnt1"} 5.368664064e+09
node_filesystem_size_bytes{device="/dev/disk3s1",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update/mnt1"} 9.9466258432e+11
node_filesystem_size_bytes{device="/dev/disk3s1s1",device_error="",fstype="apfs",mountpoint="/"} 9.9466258432e+11
node_filesystem_size_bytes{device="/dev/disk3s2",device_error="",fstype="apfs",mountpoint="/System/Volumes/Preboot"} 9.9466258432e+11
node_filesystem_size_bytes{device="/dev/disk3s4",device_error="",fstype="apfs",mountpoint="/System/Volumes/Update"} 9.9466258432e+11
node_filesystem_size_bytes{device="/dev/disk3s5",device_error="",fstype="apfs",mountpoint="/System/Volumes/Data"} 9.9466258432e+11
node_filesystem_size_bytes{device="/dev/disk3s6",device_error="",fstype="apfs",mountpoint="/System/Volumes/VM"} 9.9466258432e+11
node_filesystem_size_bytes{device="/dev/disk5s1",device_error="",fstype="msdos",mountpoint="/Volumes/KINGSTON"} 8.54386688e+09
node_filesystem_size_bytes{device="OrbStack:/OrbStack",device_error="",fstype="nfs",mountpoint="/Users/forthxu/OrbStack"} 7.12966750208e+11
node_filesystem_size_bytes{device="map auto_home",device_error="",fstype="autofs",mountpoint="/System/Volumes/Data/home"} 0