Skip to content

AutohomeCorp/autohome-compareQueries-datasource

Repository files navigation

Grafana Compare Query Datasource


中文文档

Webpack copy of grafana-meta-queries implementing grafana/grafana#2093

This plugin is built as a datasource plugin that combines and contrasts different time shifts data.

Time shift supports the following units: s (seconds), m (minutes), h (hours), d (days), w (weeks), M (months), y (years)

Screenshots

Screenshot1

Screenshot2

Installation

Clone this project into the grafana plugins directory (if you install grafana with the package, the default is /var / lib / grafana / plugins). Restart grafana and the datasource plugin should be detected and automatically used.

Usage

  • Create a datasource and select the Compare Query Datasource plugin.
  • Create a basic query
  • Create a query use compare query datasource and set base query as compare query
  • Add time shift on the compare query

Build

Important work on a machine that has Grafana installed.

$ sudo apt-get install npm
$ sudo apt-get remove cmdtest
$ sudo apt-get remove yarn
$ sudo npm install -g yarn
$ cd /var/lib/grafana/plugins
$ sudo git clone https://github.com/alimli/autohome-compareQueries-datasource.git
$ sudo chown -R ubuntu:ubuntu autohome-compareQueries-datasource
$ cd autohome-compareQueries-datasource/
$ yarn install
$ yarn build

Credits

Based on

Made by AutoHome Team