Question on how to create a plug in to solve my problem

Hi all, new to grafana and seeking guidance on how to solve my problem.

  1. Context

My company is using Grafana for the telemetry visualization, but most of them can be queried directly and displayed accordingly, my data, on the other hand, is encoded/encrypted so it is not readable until it is decrypted/decoded, I am adding a AWS service to decode/decrypt it.

  1. My envisioned solution

I am thinking of developing an App plug for grafana which will:

  • Retrieve my encoded the data from the current data source like any other telemetry
  • Once my encoded data is returned, it will post a HTTP request to my decoding AWS service, which will ultimately return the decoded/decrypted data in JSON file
  • Then it will feed the data to the databoard of grafana
  1. Questions:
  • Does this solution make sense? Am I on the right track?
  • How to feed the JSON data to the dashboard? what to do with the data transformation?
  • Any detailed guidance on writing a plugin like this?

Thanks
Richard

Hi @rxchen

it is certainly possible (as you probably already know) to develop a custom data source that queries your data and decrypt it. but it is very likely that what you’ll do is fork an existing data source you need and add this capability, and you will have to do this for all types of data source you need and keep up to date with the original plugin yourself.

Something you can do is create a middleware service that you can for example run in the same server where you run Grafana. This middleware would be the one actually taking the requests from the grafana data-sources and proxy-them to the real external server.

This middleware service will also make sure to decrypt the data and send it back to Grafana ready to use

So from the Grafana and its data source perspective you are simply querying an API, your middleware service will take care of the encrypt/decrypt necessary, this way all you do in Grafana is the standard Grafana-stuff without any complications regarding your data encryption and any possible problems from it.