Repository navigation
Replies: 3 comments 1 reply
|
使用 influxdb 的 telegraf 配合 http input 数据虽然可以导入但在字段解析上还是会遇到 json_exporter 同样的问题,他们在解析字段会直接去 key 的值,但在 mosdns 的数据结构很多值都在 key 本身,是否更多的把 object 改成 array 并把 plugin name 和并行任务的游标改到 array 里面,比如: {
"plugins": [
{
"name":"_default_cache",
"type":"cache",
"hit": 0,
"lazy_hit": 0,
"query": 0,
"size": 0
},
{
"name": "adguard",
"type": "fast_forward",
"upstream": [
{
"err": 5045,
"latency": {
"avg": 299,
"max": 3015,
"min": 100,
"p25": 120.25,
"p50": 136.5,
"p75": 373.25
},
"query": 10471
},
{
"err": 4917,
"latency": {
"avg": 255,
"max": 1635,
"min": 102,
"p25": 119.25,
"p50": 132.5,
"p75": 373.25
},
"query": 10471
}
]
}
],
"server": {}
}这样的话无论是上面说的哪种 data sources 都能导入 grafana,谢谢。 |
0 replies
|
感谢反馈。当时感觉没必要调用 prometheus 的库,有点大,所以自己现搓了一个。确实兼容性很差。 还在看。估计还是直接 prometheus 省事。 |
1 reply
|
更新国庆节前进度:
目前有点小问题的是 mosdns 的日志文件是直接输出到本地文件,vector 服务是非本机的话不太好实时解析。不知道是否有好的办法,或者 mosdns 支持更多 backend 的 log? BTW,刚看版本 4.4.1 优化了 debug 格式,我想哭 😭 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
很感谢作者发布的 mosdns 这么好用的工具,最近升级到了 v4 版本特别让我感兴趣的是提供的
/metrics接口,在我研究之后我的理解是快速看下各个启用的 plugins 的状态,不过我有个小的疑惑这些原始数据如何可视化。我的理解是用 grafana 来做可视化,但由于 mosdns 提供的是 JSON 格式,prometheus 如果直接接管,就算是利用 json_exporter 插件也很难用 JSONPath 来做动态的插件匹配转化,因此想问下作者你是如何可视化数据做分析的,感谢。
个人延展的想法:
期待得到答复,再次感谢!
All reactions