通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
[TOC] ## 基于文件的服务发现 - 基于文件的服务发现是最通用的方式 - Prometheus会定时从文件中读取最新的Target信息 ## 配置 prometheus.yml ``` scrape_configs: - job_name: node file_sd_configs: - files: - "target.json" ``` ## targets.json ``` [ { "labels": { "job": "node" }, "targets": [ "localhost:9100" ] } ] ``` ## 测试动态添加 targets.json ``` [ { "labels": { "job": "node" }, "targets": [ "localhost:9100" ] }, { "labels": { "job": "node1" }, "targets": [ "localhost:91002" ] } ] ``` 查看 `http://192.168.0.229:9090/targets` 可直接看到效果