【发布时间】:2021-01-15 20:48:40
【问题描述】:
我几乎无法在我的新 Raspberry Pi(运行 Raspbian)上设置 Prometheus 和 Grafana。现在我想监控一个smart power plug with a REST API。这意味着我可以发送curl 命令并接收一些数据:
$ curl --location --request GET '[Switch IP]/report'
{
"power": 35.804927825927734,
"relay": true,
"temperature": 21.369983673095703
}
但是,我不知道如何让 Prometheus 自动查询和解析这些数据。我的 Google Fu 让我失望了,因为所有结果都说明了如何查询 Prometheus。任何提示将不胜感激。
【问题讨论】:
标签: rest prometheus grafana