Grafana
Overview
This installation happens on the
dsb-node-01
.
According to Grafana's Website, Grafana is an open-source platform for monitoring and observability. It allows you to query, visualize, alert on, and understand your metrics no matter where they are stored. Grafana provides a powerful and elegant way to create, explore, and share dashboards that integrate data from various sources, making it an essential tool for DevOps teams to monitor their infrastructure, applications, and services in real time.
Prerequisites
-
Install Docker
-
Install Docker using Snap:
sudo snap install docker
-
-
Create Docker Group and Add User to It
-
Create a Docker group and add your user to it:
sudo groupadd docker
sudo usermod -aG docker $USER
sudo reboot
-
Installation Steps
-
Create a Docker-Compose File for Grafana
-
Create the necessary directories and Docker-Compose file:
mkdir -p ~/apps/grafana
touch ~/apps/grafana/docker-compose.yml
-
-
Copy and Save the Docker-Compose Configuration
-
Use the following configuration in your
docker-compose.yml
file:version: '3.7'
services:
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=your_admin_password
- GF_SECURITY_ADMIN_USER=your_admin_user
volumes:
- grafana_data:/var/lib/grafana
restart: always
network_mode: host
volumes:
grafana_data: -
Open the file with nano or your preferred text editor and paste the configuration:
nano ~/apps/grafana/docker-compose.yml
-