Skip to content

redraskal/edgedb-grafana-frontend

 
 

Repository files navigation

EdgeDB Data Source Plugin for Grafana

Grafana supports a wide range of data sources, including Prometheus, MySQL, and now also EdgeDB.

Getting started

  1. Install dependencies
yarn install
  1. Build plugin in development mode or run in watch mode
yarn dev

or

yarn watch
  1. Build plugin in production mode
yarn build
  1. In Grafana, go to Configuration / Data Sources and "Add data source".

  2. In the plugin setup, fill out the URI with the HTTP port's endpoint to your database. Grafana will test the connection on save.

Tips for building EdgeDB queries

  1. Make sure your query returns a set in the following shape:

    {
      Object {time: <int>, value: <value-type>},
      Object {time: <int>, value: <value-type>},
      ...
    }
    
  2. Make sure the values in the time field are epoch milliseconds.

  3. If your data source grows in time, filter your query with an expression like FILTER <int64>$from <= .time AND .time <= <int64>$to. The variables from and to are provided by the Grafana plugin.

Learn more

About

A frontend plugin for Grafana that fetches data from an HTTP endpoint responding to EdgeQL queries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 93.1%
  • JavaScript 6.9%