[英]Expose data from JSON file to Prometheus
Is there any way to expose data from JSON file to Prometheus, so later it can be visualized in Grafana?有什么方法可以将 JSON 文件中的数据暴露给 Prometheus,以便以后可以在 Grafana 中可视化?
If you need importing historical data in JSON format into Prometheus, then you need converting this data to Prometheus remote_write format and then pushing it to /api/v1/write
handler.如果您需要将 JSON 格式的历史数据导入 Prometheus,则需要将此数据转换为 Prometheus remote_write 格式,然后将其推送到/api/v1/write
处理程序。 See these docs .请参阅 这些文档。
Another option is to import the data to Prometheus-compatible system, so it could be queried later with PromQL in Grafana.另一种选择是将数据导入与 Prometheus 兼容的系统,以便稍后在 Grafana 中使用 PromQL 进行查询。 See, for example, how to import data in various formats into VictoriaMetrics .例如,请参阅如何将各种格式的数据导入 VictoriaMetrics 。 (I'm the author of VictoriaMetrics). (我是 VictoriaMetrics 的作者)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.