-
Notifications
You must be signed in to change notification settings - Fork 267
Conversation
Removed wip label, asking for review and merge :) |
I am definitely a big supporter of this! |
Not sure we want to publish a duplicate of the simple-json data source. The refactor to typescript would be a great PR to the original repo. I know this will sound pretty terrible as we have been so unresponsive on PRs and issues for the original simple-json-datasource. I think if we refactor it to typescript we could potentially move it to a built-in core data source (and write a go backend part would make it support alerting). |
To start with I have to say that I'm entirely astonished. This is why:
That sounds like a valuable addition. I would appreciate an open discussion of how to take this forward but from my point of view it needs a thorough commitment from grafana side to return the investment of our time with responsiveness and openness to features. Without the features we need like the ability to push additional json data, and without the ability to make improvements in due time, this is of little value. /cc @simPod |
Ummm... ... ... @andig summed it up very well but in short this is what happened:
I'm not sure where to go from here. This looks like Grafana states the exact opposite each month :/ |
The easiest way forward is to publish this as a new plugin. You would need to change the plugin "id" in src/plugin.json to "id": "simpod-json-datasource" to differentiate it from the original plugin (name conflict). We can plan out how to integrate this version into Grafana core afterwards. If you make these changes I'll work to push through the review and get it published. Thanks! Brian |
Thanks @briangann. The original id is grafana-simple-json-datasource, we have grafana-json-datasource, so no conflict. Do you still need this change? I‘d also appreciate any suggestions how we can contribute making json a backend plugin AND allowing our requirements to run on top if not in the core. |
Our convention for plugin id is githubusername-awesomeproject-plugintype, updating the id to (you can also give it a different icon/logo so it stands out as different, but not mandatory) I'll spin up the plugin and see what it would take for backend plugin integration. The process isn't documented well, but it is possible to create one and included it with a non-core plugin. |
repo.json
Outdated
@@ -2432,6 +2432,18 @@ | |||
} | |||
] | |||
}, | |||
{ | |||
"id": "grafana-json-datasource", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will need to be updated to match the new id also
Yes, will do once we have another fix in. |
@briangann update- hope this works now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Great, thank you :) |
you can see the plugin here: https://grafana.com/plugins/simpod-json-datasource also available with grafana-cli |
This is a type-script written fork of the original SimpleJSON datasource.
Most notably, it includes the ability to pass additional parameters as part of the
/query
request to allow differentiated responses by backend adapters:One example backend adapter is https://github.com/andig/gravo which accepts grafana json queries and extracts multiple metrics simultaneously from an underlying volkszaehler REST api. Additional JSON parameters are used to provide fine-grained control on how to use the REST api (in the screenshot above by retrieving pre-aggregated data). In that respect it provides similar functionality, though with less abstraction due to its generic nature, as the Prometheus datasource.
Upstream PRs for grafana/simple-json-datasource#100, grafana/simple-json-datasource#103, grafana/simple-json-datasource#104 have been applied.