一台grafana监控多台Windows server的操作配置
首先要将一台服务器搭建好prometheus+grafana。具体参考:https://blog.csdn.net/qq_38661798/article/details/84888019
其他服务器安装好exporter。(windows_exporter-0.15.0-amd64.msi)
修改prometheus.yml 的target。 (例子)
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['192.168.2.17:9182']
- targets: ['192.168.2.18:9182']
- targets: ['192.168.2.19:9182']
- targets: ['192.168.1.12:9182']
- targets: ['192.168.1.13:9182']
- targets: ['192.168.1.14:9182']
启动,cmd进入安装目录(& – -> 后台运行)
prometheus.exe --config.file=prometheus.yml --web.listen-address=:8900 &
监控界面效果:
小结:其实这里不止监控Windows,服务器安装好相关的exporter后,添加到prometheus.yml 即可。