'Custom grafana datasource plugin to wrap external REST API

I'm trying to figure out a way to create a data-source plugin which can communicate with an external REST API and provide relevant data to draw a panel.

Anyone with previous experience?



Solution 1:[1]

The Simple JSON Datasource does roughly what you're proposing, and would definitely be a good base for you to start from.

There is also documentation on datasource plugins available.

Solution 2:[2]

You can use Grafana Infinity datasource for connecting to REST API endpoints.

This plugin can connect to any REST API and present the data to grafana. You can use CSV,JSON and GraphQL endpoints. Documentation site have more examples on how to connect with external APIs

Note: I am the author of the plugin. If you see any bugs in the datasource, report it at github site.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 tgogos
Solution 2