grafana使用json数据源监控数据

本文介绍了如何使用Grafana的JSON数据源来监控数据波动,即便Grafana不直接支持Mongo数据库。通过利用JSON Datasource这一通用后端数据源,可以与任意后台执行JSON请求。该数据源需要后台实现四个URL接口,包括连接测试、查找指标选项、获取指标和返回注释。这是一个实现监控数据可视化的简便方法。
摘要由CSDN通过智能技术生成

功能实现完后有部分数据一直在波动,就产生了想把这个数据波动集成到grafana形成可视化界面的监控,但grafana不支持mongo数据库又懒得去用其他工具转换,特意看了下grafana的database插件,因此看到了json数据源

JSON Datasource - a generic backend datasource

JSON Datasource is an enhanced version of the Simple JSON Datasource.

The JSON datasource executes JSON requests against arbitrary backends. To work with this datasource the backend needs to implement 4 urls:

  • / should return 200 ok. Used for "Test connection" on the datasource config page.
  • /search used by the find metric options on the query tab in panels.
  • /query should return metrics based on input.
  • /annotations should return annotations.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值