I’d like to be able to use Grafana as an intermediate data source for another application that will consume the metric data, without knowing about the type of the datasource in advance. For instance, if I had a dashboard with some metrics from Graphite and some other ones from CloudWatch, I want code that can determine how to get the timeseries data from both Graphite and CloudWatch without writing anything that’s Graphite or CloudWatch specific. In the docs, I see two APIs that can get me part of the way there:
A. Get dashboard should help me find out what queries are being made from the dashboard
C. Data source proxy calls should help me query the underlying data source for the timeseries data
But there seems to be a missing (B) and (D), namely:
B. How do I determine how to structure the query to the underlying data source?
D. How do I determine how to parse out the timeseries that comes back from the data source into a standard format?
I know Grafana is really designed more as a visualization tool than as a data source itself, so I’m slightly afraid (B) and (D) are done purely through front end plugin code and there’s no API that will let me do it programmatically, but it would be awseome if it’s possible. So:
- Any ideas on how to accomplish (B) and (D) programmatically?
- If not, is there some other way to accomplish the overall goal (given a dashboard, give me the timeseries data for it without coding special cases for all possible data sources)?