You are on page 1of 20

Grafana Guide

Getting Started

Dashboards

Components
Getting Started

Introduction
Grafana is a cloud tool for the creation of visual boards. This tool allows the connection of various

database sources such as InfluxDB, ElasicSearch, PostgreSQL, etc. Thanks to a simple clicking

interface, it is possible to create well-arranged monitoring panels and test graphs, compare values, or

analyze data using various mathematical functions.

Login
Grafana is available on the Hexio IoT Platform at https://grafana.hexio.cloud/login.
Image: Grafana Login Page

Note: Grafana can also have a public organization to which you can be redirected without the need

to log in. By clicking the Log in icon which is displayed on the image below on the left hand side, you

will get back on the Log in page. You can find this icon on the lower left panel. After a successful

login, your profile icon is displayed on the same spot. (image below - right). If the left panel is not

displayed, click on the logo in the upper left corner.

Image: Login icon vs. Profile icon

Home Page
After a successful login, you will see the boards you have recently visited and starred ones. After

clicking the profile icon, you will b eredirected into the Profile section (profile icon > Preferences).
Image: Home Page

Profile
In the Profile section you can see your personal information. You can change your password here as

well. Attention: Grafana and Hexio IoT Cloud are not interconnected and so the password change

only takes place for the specific tool and will not be synced.

Image: Profile Settings

Switching between Organizations


If you are a member in multiple organizations, you will see the boards of only one organization. To

switch to a different organization, click the Profile icon and then hit the button "Switch" by the

currently selected organization labeled as "Current Org" (image above). Then you will see a switching
dialogue window as seen on the image below. After clicking the button "Switch to", you will be taken

to the selected organization.

Image: Organization Switching

Main Menu
The Main menu contains several buttons. Please do not forget that all buttoons are available for all

roles in Grafana (Admin/Editor/Viewer). The example shows the Admin role.

Icon “PLUS” is used to create new boards and folders.

Icon “SQUARES” enables browsing and management of boards, as well as creating a playlist or

a snapshot.

Icon "COMPASS" quickly displays data.

Icon “BELL” gives you overview of all alerts and let´s you set up notification channels.

Icon “GEAR” is available only for the Admins of the organization.

Icon “SHIELD” is available only for the Admins of the whole Grafana.
Image: Main Menu Options

Public Board
If you are not logged in, you will see freely available boards. After logging in, click the icon displayed

on the second image in the section Start. Of the left panel is not displayed, click the logo in the upper

left hand side corner.

Image: Public Home Page


Dashboards

First Dashboard
You can create a new dashboard by clicking the PLUS icon > Dashboard on the Main Menu. You will

see the option to add graphical components (Query, Visualization and Convert to Row - more

description below). By clicking the Diskette icon next to the GEAR icon, you will save the dashboard.

Image: New Dashboard

Dahsboard Settings
After clicking the GEAR icon of the project above on the pane, you will get to the section of setting up

the Dashboard. Here you can change the dashboard name, add a description etc. It is also possible to

display the dashboard in the JSON format for the option to back it up (section View JSON).
Image: Dashboard Settings

Time scope of graphs can be changes in the upper right hand corner by clicking the CLOCK icon. By

using the MAGNIFYING GLASS icon, you can zoom in the graphs. YOu can also refresh the graphs by

clicking refresh or you can choose automatic refresh with a specific interval.

Image: Setting a Time Scope

New Component
You can add a new component to a new dashboard by clicking the Add Query button (recommended)

or Choose Visualization. Additional components are added by clicking the Bar Chart+ icon on the

upper pane.

Each component can be moved by dragging it by the upper pane with the name of the Query or you

can change the size of the component by dragging its lower right hand corner. This behavior is almost

identical with the one found in Windows OS.

If you would like to group components into a foldable section, add a new component and choose
Convert to Row. All components below this line will be automatically added. The folding and unfolding

can be done with the arrow on the given line ( > , V ).

Image: Preview of a Folded Row

Component Edits
You can edit a component by clicking its name in the header and selecting Edit. In the Component

Menu, you can delete it (Remove), duplicate it (More > Duplicateú, or display a JSON configuration

(More > JSON Panel).


Image: Editing a Component

Edits are divided into several sections

Queries - creating database quesries

Visualization - selection and setting up of graphical components (chart, alert, etc.)

General - general component settings (name, description, etc.)

Additional Settings - these settings are available only for some components (graph - Alert)

Queries

In this section you can select a database and put together a data query. The quesry can be put

together through a click-tool with smart help. More queries can be done with the button Add Query; to

display the resulting query, you can click the Query Inspector.

There is a global setting of the minimal interval at the and of all queries - $__interval parameter,

then also time scope settings, and time shift.


Image: Database Queries

Basic Query Structure

FROM <database> <measurement(your-topics)> WHERE tag=valueSELECT field(<value(parsed-fields)>)

<selectors(agregation-functions)>

GROUP BY time(<time-interval>) fill(<value>)

FORMAT AS Time series

ALIAS BY <your label>

Legend

database – selecting a database, leave at default

measurement – list of all measuring (topics) in the database

tag – other parameters of measuring (not required)

x-sender-id – user publishing the current message

x-source – channel used for sending the message

value in the item field – a list of found values found in the given measuring

selector – after setting up grouping ( GROUP BY ) the selector is used to receive aggregated

values from a given interval

time-interval – grouping interval for data aggregation ( $__interval is a variable which can be

globally set up on the Options bar > Min. time interval)

value in the item fill – indicates how missing data will be interpreted

your label – own name of the measuring which must be present in case of using two Y axes

(left and right)

Examples:
ZReceiving all data points of voltage from the topic example.1.voltage

FROM default example.1.voltage WHERE +

SELECT field(voltage_Volt)

GROUP BY +

FORMAT AS Time series

ALIAS BY Raw Voltage

Receiving a mean value of pressure from 5-minute intervals from the topic example.2.pressure

FROM default example.2.pressure WHERE +

SELECT field(p_bar) mean()

GROUP BY time(5m) fill(null)

FORMAT AS Time series

ALIAS BY Pressure

Receiving a maximum temperature of the whole day from the topic example.3.temperature

FROM default example.3.temperature WHERE +

SELECT field(T_°C) max()

GROUP BY time(1d) fill(null)

FORMAT AS Time series

ALIAS BY Max temperature per day

Receiving temperature from the topic example.4.temperature and converting to Fahrenheit degrees

FROM default example.4.temperature WHERE +

SELECT field(T_°C) math(*1.8+32.0)

GROUP BY +

FORMAT AS Time series

ALIAS BY Temperature [°F]

Receiving a first derivative of vibrations from a second interval in the topic example.5.vibration
FROM default example.5.vibration WHERE +

SELECT field(vibration) mean() derivative(1s)

GROUP BY time(1s) fill(null)

FORMAT AS Time series

ALIAS BY dVibration / 1s dt

You can find out more about database queries in the official documentation for InfluxDB.

Visualization

After creating a query, it is possible to select a specific visual component. There is a wide array of

charts, grahps, counters, text, and maps available.

Image: Selecting a Component

General

In the General section, you can change the name and description of the component. It is also possible

to set up a pattern for repetition.


Image: General Settings
Components

Graph

General

Image: Basic Graph Settings

Draw Modes

Here you can set up the mode in which the graph will be drawn.

Bars

Lines

Points

Mode Options
You can select the thickness of the line, fill etc. The Staircase option creates stair-like transitions

among data points.

Stacking & Null value


Stack - several graphs are put on top of each other

Null value - defines the way null values are displayed

null - graph outage

connected - outage is connected

null as zero - outage is displayed as zero

Axes
Graphs enable additional edits, such as axes set up - axes range, unit, label, etc. Settings are

available individually for each axis.

Image: Graph Axis Setting

To assign a metric to a given axis, click the color line next to the measuring label under the graph.

The line is on the following image highlighted by a red rectangle. Here you can also change the color

of the specific measuring.


Image: Change the Y Axis Color

Legend
The Legend is used to set up labels of individual measurings.

Image: Graoh Legend Set Up

Alert
Grafana also provides basic alerting system.
Image: Alert Settings

After setting up the alerts, you can set up channels and messages in the section Notifications.

However, channels have to be first set up in the Main Menu - Alerting > Notification Channels.

Supported channels are:

email

slack

webhook

Image: Notification Settings

Gauge

Basic
Image: Gauge Options Settings

Display
Show

Calculation - display of calculated aggregated values from the returned database values

All values - display of all returned values from teh database

Labels

Turns on numerical tresholds in the gauge.

Markers

Turns on color labels in the gauge.

Field
This settings allows to secundarly name the gauge (Title), choose the unit (Unit), set up the minimal

and maximal range of values, and set up the decimal places.

The element Title contains several "wild-cards":

$__series_name - inputs name of the measuring

$__field_name - inputs name of the value

$__calc - calculation type

Tresholds
Treshold values create color sections for a more easily readable value recognition. Value Base is

taken from Field > Min

Value mapping
Value mapping is a very useful tool for definind own text values. For example, the value 0 can mean
CLOSED and 1 OPEN. On the image below you can see default mapping - not found data (null) are

displayed as N/A text.

Image: Gauge Value Mapping

You might also like