GithubHelp home page GithubHelp logo

doytsujin / gravo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andig/gravo

0.0 1.0 0.0 1.1 MB

Grafana for Volkszaehler

Home Page: https://volkszaehler.org

License: MIT License

Go 88.62% Makefile 3.16% Dockerfile 8.22%

gravo's Introduction

gravo

Build Status Donate

gravo - Grafana for Volkszaehler - is an adapter for using Grafana with Volkszaehler.

While it is possible to run Grafana against the Volkszaehler database directly using the Grafana MySQL datasource, gravo supports additional features:

  • metrics discovery: all public channels are discoverable via the Grafana UI, private channels can also be used by adding them via their UUID
  • custom channel name: you can change the channels name for Grafana
  • performance: using Volkszaehler data aggregation gravo can achieve sub-second query times even when retrieving multiple years of data similar to the native Volkszaehler UI

Installation

Prerequisites

  1. Install Volkszaehler

  2. Install Grafana and the JSON Datasource plugin. Simple JSON Datasource will also work but not allow you to specify additional query parameters.

gravo

gravo can either be run using docker or built manually:

docker run -p 8000:8000 andig/gravo -api http://myserver/middleware.php

Building and running gravo manually:

make
gravo -api http://myserver/middleware.php -url 0.0.0.0:8000 

Grafana datasource

Create a Grafana Simple JSON Datasource and point it to gravo running on machine and port chosen before:

http://gravo-host:8000

Usage

To use gravo for querying Volkszaehler data. Create Grafana panels for gravo datasource and add metrics:

  • metric can use the channel name if the channel is public
  • alternatively the UUID of a private channel can be used

Customization

Using the JSON Datasource, the Volkszaehler query can further be tailored by adding "Additional JSON Data":

  • To override the UUID with the channel name add:

    {"name": "channel title"}
    
  • Volkszaehler can generate aggregated/averaged data by time period:

    {"group": "hour/day/month"}
    
  • To improve Volkszaehler response times gravo is able to optimize queries. In order to do so the number of expected result tuples can be specified. If not specified Volkszaehler will return data in highest resultion which can potentially be millions of records:

    {"tuples": 500}
    

    This requires active data aggreation in the Volkszaehler installation.

  • Volkszaehler can also return "raw", uninterpreted data which is e.g. useful for retrieving meter reading values or meters pulses without pulse to power conversion. Use the following to return daily consumption values:

    {"options": "raw"}
    
  • "options" can also be used to send other options that the Volkszaehler middleware accepts. One example is retrieving consumption data per period:

    {
        "group": "day",
        "options": "consumption"
    }
    

    Note: consumption data requires volkszaehler next (andig/volkszaehler.org)

Example

Below is an example of a complex Grafana dashboard for Volksaehler:

Panel

See json for the example dashboard source.

gravo's People

Contributors

andig avatar grseidel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.