-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find MetricName used by Datasource #88
Comments
Dear Jared, thank you for writing in. Your proposal sounds like a good idea to be tackled by As I am not working with Or are you actually looking at filtering that output by database type instead? With kind regards, |
What about this kind of inquiry, combining It discovers used datasources by name, and reports about the spots (dashboards) where those are used. Do you need the report to drill down into more details, down to the metrics level, or would that be satisfactory already? grafana-wtf explore datasources --format=json | \
jq '.used[] | select(.datasource.name == "weewx_097287c4_6fb0_4aeb_a095_00d65ecb15f7")' {
"datasource": {
"uid": null,
"name": "weewx_097287c4_6fb0_4aeb_a095_00d65ecb15f7",
"type": "influxdb",
"url": "http://localhost:8086/"
},
"dashboards": [
{
"title": "weewx 097287c4-6fb0-4aeb-a095-00d65ecb15f7 automatic",
"uid": "000000190",
"path": "/grafana/d/000000190/weewx-097287c4-6fb0-4aeb-a095-00d65ecb15f7-automatic",
"url": "https://swarm.hiveeyes.org/grafana/d/000000190/weewx-097287c4-6fb0-4aeb-a095-00d65ecb15f7-automatic"
},
{
"title": "Wetter in Leoni",
"uid": "000000191",
"path": "/grafana/d/000000191/wetter-in-leoni",
"url": "https://swarm.hiveeyes.org/grafana/d/000000191/wetter-in-leoni"
},
{
"title": "weewx-097287c4-6fb0-4aeb-a095-00d65ecb15f7",
"uid": "w-kZrPmiz",
"path": "/grafana/d/w-kZrPmiz/weewx-097287c4-6fb0-4aeb-a095-00d65ecb15f7",
"url": "https://swarm.hiveeyes.org/grafana/d/w-kZrPmiz/weewx-097287c4-6fb0-4aeb-a095-00d65ecb15f7"
}
]
}
The example can easily be adjusted to filter by type instead, so that would be covered already.
|
Let me know about any improvements which could support your use case better. As the acquisition and querying machinery is in place already, adding more features on the level you are asking for would most probably only need a bit of data structure wrangling, and/or adjusting output templates. |
Yes, i would need more information about the panels in the dashboard to be able to pull out what metricName is being used with that datasource. I did get a great list of dashboards and which panels are using the datasource, just not enough information to parse that into jq to pull out the details i need. |
Dear Jared, you may want to have a look at the new SetupIt is not released yet, but you can use this command to install the development version of the package. pip install --upgrade 'git+https://github.com/panodata/grafana-wtf' If you are using the Docker image, you may want to use the Usage
OutlookLet us know if that goes into the right direction, and/or if you need any improvements. If you think the raw output data is all you need, and will come up with a corresponding With kind regards, |
Hi again, we just released grafana-wtf 0.16.0, where the command outlined above should work, see also #70 (comment). With kind regards, |
First off, this tools is great. I am trying to use it to get every MetricName associated with a specific datasource. I was wondering if this was possible through the current setup but cant find the input combo? Looking for something like, if datasource name is 'CloudWatch', list all of the MetricsNames used in any panel in Grafana.
The text was updated successfully, but these errors were encountered: