Giter VIP home page Giter VIP logo

mmm-grafanagauges's Introduction

MMM-GrafanaGauges

This [MagicMirror²] module allows you to display several gauges in a row generated by grafana.

Important Note: This is a fork. I have made a few changes since the original did not want to display items from different dashboard databases.

Important Note: This module requires a running grafana installation. To install Grafana, follow the official installation instructions.

This blogpost describes how to install and use grafana and build a weatherchart.
example of a grafana weather gauges

Installation of the module

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/kenzokhome/MMM-GrafanaGauges

Configure the module in your config.js file.

Configuration

To use this module, you have to specify where your grafana installation is hosted and which gauges you'd like to display.

Add the module to the modules array in the config/config.js file:

modules: [
	{
	 module: 'MMM-GrafanaGauges',
		 position: 'top_right',   // This can be any of the regions.
         header: 'Olive tree',
		 config: {
					host: "grafana_host", //Mandatory. See url when displaying within grafana
					port: 3000, // Mandatory.
					https: false, // Optional. Consider using TLS for your data. Default: false
					dashboardname: "flowers", // Mandatory.
					dashboardDB:"d-solo/asda",
					orgId: 1, // Mandatory.
					showIDs: [12, 8, 9, 10],// Mandatory. PanelId from the url.
					width: "100%", // Optional. Default: 100%
					height: "100%", // Optional. Default: 100%
					refreshInterval: 900 //Optional. Default: 900 = 1/4 hour
				}
	},
]

Everything needed is extractable from the url when you're viewing your gauge using grafana in your browser.
The panelid from each gauges has to be represented within the showIDs-array. Also the order set within this array.

url provides needed information

Optional configuration options

The following properties can be configured:

Option Description
width Width of the displayed chart. '150 px' or '50 %' are valid options.
Default value:"100%"
height Height of the displayed chart. '150 px' or '50 %' are valid options.
Default value:"100%"
refreshInterval Update interval of the diagram in seconds.
Default value: 900 = 15 \* 60 (four times every hour)

mmm-grafanagauges's People

Contributors

bikerpatch avatar kenzokhome avatar svensommer 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.