How To Install and Secure Grafana on Ubuntu

Published: 21 September 2022
on channel: MivoCloud
1,808
172

Grafana is an open-source data visualization and monitoring tool that integrates with complex data from sources like Prometheus, InfluxDB, Graphite, and ElasticSearch. Grafana lets you create alerts, notifications, and ad-hoc filters for your data while also making collaboration with your teammates easier through built-in sharing features.

In this tutorial, you will install Grafana and secure it with an Nginx reverse proxy. Once you have set up Grafana, you’ll have the option to configure user authentication.

Useful links
Rent VPS/VDS/Dedicated server - https://mivocloud.com/

Commands Used

FIRST STEP
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
apt update
apt install grafana
systemctl start grafana-server
systemctl status grafana-server
systemctl enable grafana-server

SECOND STEP
nano /etc/nginx/sites-available/your_domain
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 80;
listen [::]:80;

root /var/www/your_domain/html;
index index.html index.htm index.nginx-debian.html;

server_name your_domain www.your_domain;

location / {
proxy_set_header Host $http_host;
proxy_pass http://localhost:3000;
}

location /api/live {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $http_host;
proxy_pass http://localhost:3000;
}
}

THIRD STEP
nginx -t
systemctl reload nginx

FOURTH STEP
nano /etc/grafana/grafana.ini
systemctl restart grafana-server
systemctl status grafana-server


Watch video How To Install and Secure Grafana on Ubuntu online without registration, duration hours minute second in high quality. This video was added by user MivoCloud 21 September 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,808 once and liked it 172 people.