You are reading the documentation for Statusengine 3.x - Switch to Version 2.x for old stable

Install Grafana Ubuntu 18.04

Install Grafana

Related topics:

Before you start! Please take a look at the official documentation!

echo "deb stretch main" > /etc/apt/sources.list.d/grafana.list
curl | apt-key add -
apt-get update
apt-get install grafana

systemctl daemon-reload
systemctl start grafana-server
systemctl enable grafana-server

Configure Apache as reverse proxy for Grafana (optional)

apt-get install apache2 ssl-cert

Create the file /etc/apache2/sites-available/apache2-grafana.conf with the following content:

<VirtualHost *:80>

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]

<VirtualHost *:443>
    ProxyPreserveHost On
    ProxyPass /
    ProxyPassReverse /

    SSLEngine On
    SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

Notice: We added an automatically redirect from http to https using self-signed certificates.

Enable the new configuration

a2ensite apache2-grafana
a2enmod proxy
a2enmod proxy_http
a2enmod ssl
a2enmod xml2enc
a2enmod rewrite
systemctl restart apache2

Now you should able to browse to the Grafana Frontend via https://your-address.

Username: admin

Password: admin

Grafana via HTTPS

The Grafana configuration is located at /etc/grafana/grafana.ini. I would recommend you to take a look at this file.

Add Datasource for Statusengine

This tutorial is basically made for the Statusengine project. To continue, decide which storage backend you prefer to store metric data.