一、prometheus部署
版本路径:https://prometheus.io/download/#prometheus
前提条件:server与node节点时间同步
prometheus服务端
设备:10.243.9.160
解压prometheus-2.34.0.linux-amd64.tar.gz,进入目录
./prometheus --config.file=prometheus.yml --web.listen-address=10.243.9.160:39090 #运行监听9090端口
页面访问:http://10.243.9.160:9090
启动参数
-config.file="prometheus.yml" #指定配置文件job 配置/opt/prometheus/prometheus.yml
-alertmanager.timeout=10s #把报警发送给alertmanager的超时限制10s
-prometheus_engine_queries_concurrent_max可以拿到最大查询并发数及查询情况
-storage.local.retention 8760h0m0s 保存1年的数据
-storage.local.retention.size 102400MB监控数据保留大小,与storage.tsdb.retention.time,达到任意一个即删除
日志类:
-log.level 可选值 [debug, info, warn, error, fatal] 例:-log.level "info"
-log.format 可选输出到syslog或者控制台 例:-log.format "logger:syslog?appname=prom&local&