There are two datasource plugins here that might help you get a picture how to add new types of data sources to grafana. There is basically no documentation for how to write data sources so it requires some reverse enginering (trying to understand the existing datasources), but there is an interface, and custom data sources can provide their own UI editors. https://github.com/grafana/grafana-plugins