groonga / grafana-datasource-plugin-groonga

Groonga datasource plugin for Grafana
Apache License 2.0
0 stars 3 forks source link

Grafana Groonga Data Source Plugin

CI

View report data from Groonga in your Grafana.

Install the Data Source

Use the new grafana-cli tool to install groonga-datasource from the commandline:

grafana-cli plugins install groonga-datasource

The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins if you installed the grafana package.

Configure the Data Source

Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section. Next, click the Add data source button in the upper right. The data source will be available for selection in the Type select box. To see a list of installed data sources, click the Plugins item in the main menu. Both core data sources and installed data sources will appear. Select Groonga-datasource and enter the Name, URL, Default table name, and Default field name in the displayed setting screen.

How to try

You can use docker-compose to try groonga-datasource. Here is a command line to try groonga-datasource 1.1.4:

GF_GROONGA_DATASOURCE_DIR=/tmp/groonga-datasource \
  GF_INSTALL_PLUGINS="https://github.com/groonga/grafana-datasource-plugin-groonga/releases/download/1.1.4/groonga-datasource-1.1.4.zip;groonga-datasource" \
  docker-compose up garafana

You can find Grafana at http://localhost:3000/ .

You can login as the admin user with admin for password.

You can find "Groonga" datasource at the bottom of http://localhost:3000/datasources/new . You can use the following parameters to use the test Groonga server that has some test data:

You can use the Groonga datasource in a panel with the following parameters:

You can see visualized data in the test Groonga server.

Usage

If you want to perform aggregation processing, specify the following.

Note:

  • If you want to aggregate every certain period in the graph panel, Interval is required.
  • Aggregated time is stored in a column called AGGTIME and can be used in Key columns and Output columns.
  • If you want to display aggregated values, specify a special column name in Output columns.
Aggregation method Special column name
count _nsubrecs
sum _sum
max _max
min _min
avg _avg

Limitations:

  • If multiple queries are used, the settings of the first query will be valid except for the aggregated items.

Learn more

License

Apache License 2.0, see LICENSE.