[TOC]
##### **写速率**
磁盘的写速率的主要指标为`node_disk_written_bytes_total`,它是一个`counter`类型的指标。
```
# 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="sda"} 8.971879164928e+12
node_disk_written_bytes_total{device="sdb"} 3.87383296e+08
node_disk_written_bytes_total{device="sdc"} 3.17165568e+08
...
```
##### **读速率**
磁盘的读速率主要指标为`node_disk_read_bytes_total`,它是一个`counter`类型的指标。
```
# 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="sda"} 2.479593472e+09
node_disk_read_bytes_total{device="sdb"} 1.6577024e+07
node_disk_read_bytes_total{device="sdc"} 1.2345856e+07
...
```
##### **IOPS**
每秒钟磁盘的Read与Write的次数,需要用到以下两个指标
```
# 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="sda"} 8.6756046e+08
node_disk_writes_completed_total{device="sdb"} 68683
...
# 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="sda"} 275673
node_disk_reads_completed_total{device="sdb"} 2803
...
```
##### Reference
* https://www.cnblogs.com/Leslieblog/p/11157958.html
- (一)快速开始
- 安装Prometheus
- 使用NodeExporter采集数据
- AlertManager进行告警
- Grafana数据可视化
- (二)探索PromQL
- 理解时间序列
- Metrics类型
- 初识PromQL
- PromQL操作符
- PromQL内置函数
- rate和irate
- 常见指标的PromQL
- 主机CPU使用率
- 主机内存使用率
- 主机磁盘使用率
- 主机磁盘IO
- 主机网络IO
- API的响应时间
- (三)Promtheus告警处理
- 自定义告警规则
- 示例-对主机进行监控告警
- 部署AlertManager
- 告警的路由与分组
- 使用Receiver接收告警信息
- 集成邮件系统
- 屏蔽告警通知
- 扩展阅读
- AlertManager的API
- Prometheus发送告警机制
- 实践:接收Prometheus的告警
- 实践:AlertManager
- (四)监控Kubernetes集群
- 部署Prometheus
- Kubernetes下的服务发现
- 监控Kubernetes集群
- 监控Kubelet的运行状态
- 监控Pod的资源(cadvisor)
- 监控K8s主机的资源
- KubeStateMetrics
- K8S及ETCD常见监控指标
- ETCD监控指标
- Kube-apiserver监控指标
- (五)其他
- Prometheus的relabel-config
- Target的Endpoint
- Prometheus的其他配置
- (六)BlackboxExporter
- 安装
- BlackboxExporter的应用场景
- 在Promtheus中使用BlackboxExporter
- 参考