Windows OhmGraphite 配置

由于windows_exporter无法监控温度相关的指标,那么就需要使用OhmGraphite进行监控该指标。

下载

访问 https://github.com/nickbabcock/OhmGraphite/releases/ 地址进行下载最新的版本,下载后解压到你自己放的目录

修改配置

编辑OhmGraphite.exe.config文件,增加prometheus作为接收数据源。

1
2
3
4
5
6
7
8
9
10
11
12
13
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="host" value="localhost" />
<add key="port" value="2003" />
<add key="interval" value="5" />

<!--开启prometheus-->
<add key="type" value="prometheus" />
<add key="prometheus_port" value="4445" />
<add key="prometheus_host" value="*" />
</appSettings>
</configuration>

安装

执行安装将OhmGraphite以服务的方式运行。打开Windows PowerShell (管理员版本),cd到你刚刚解压的目录。运行安装命令。

1
.\OhmGraphite.exe install

启动

1
.\OhmGraphite.exe start

访问

启动后用浏览器打开:http://127.0.0.1:4445/metrics 查看是否能够读取到数据。看到数据后,说明配置成功了。然后在配置prometheus接收数据。

Prometheus增加配置

1
2
3
4
5
6
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'ohmgraphite'
static_configs:
- targets: ['127.0.0.1:4445']

添加配置之后,重启服务即可

Grafana面版配置

https://grafana.com/grafana/dashboards/11587-ohm-windows-desktop/添加此面版即可,查看所需的参数。

关于

https://www.oiox.cn/

https://www.oiox.cn/index.php/start-page.html

CSDN、GitHub、51CTO、知乎、开源中国、思否、博客园、掘金、简书、华为云、阿里云、腾讯云、哔哩哔哩、今日头条、新浪微博、个人博客

全网可搜《小陈运维》

文章主要发布于微信公众号