prometheus传统架构安装
全局配置选项 text 1 2 3 4 5 6 7 scrape_interval: 采集生命周期 scrape_timeout: 采集超时时间 evaluation_interval: 告警评估周期 rule_files 监控告警规则 scrape_config: 被监控端 altering 检查配置文件语法 text 1 2 3 $ promtool check config \etc\prometheus.yml Checking \etc\prometheus.yml SUCCESS: 0 rule files found 100 - (node_memory_MemFree_bytes+node_memory_Cached_bytes+node_memory_Buffers_bytes) \ node_memory_MemTotal_bytes * 100 计算剩余空间 node_filesystem_free_bytes{mountpoint="",fstype=~“ext4|xfs”} \ node_filesystem_size_bytes{mountpoint="",fstype=~“ext4|xfs”} * 100 查看使用的百分比 100-node_filesystem_free_bytes{mountpoint="",fstype=~“ext4|xfs”} \ node_filesystem_size_bytes{mountpoint="",fstype=~“ext4|xfs”} * 100 prometheus使用influxdb [Prometheus endpoints support in InfluxDB | InfluxData Documentation](https:\docs.influxdata.com\influxdb\v1.7\supported_protocols\prometheus) [Configuration | Prometheus](https:\prometheus.io\docs\prometheus\latest\configuration\configuration) 配置文件参考 yaml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 global: alerting: alertmanagers: - static_configs: - targets: rule_files: scrape_configs: - job_name: 'prometheus1' file_sd_configs: - files: ['\data\sd_config\test....