Install and Run Grafana on RHEL 8 with docker

This article will show you how to install and run Grafana on RHEL 8 server.

Use case

I was thinking to get an out of box solution to monitor kubernetes cluster CPU, memory, disk usage etc, then found Grafana. Based on its official documentation, it provides various supports for installation on different OS. I’m going to try with one of its solution that runs docker container on RHEL8 server.

Prepare docker cli script

# run-grafana.sh
docker rm grafana; 
docker run -d \
  -p 3000:3000 \
  --name grafana \
  -e LETSENCRYPT_HOST=your.grafana.host.url \
  -e LETSENCRYPT_EMAIL=yourname@email.com \
  -u "$(id -u)" \
  -v "$(pwd)"/grafana-data:/var/lib/grafana \
  grafana/grafana-enterprise

Verify docker container status

docker ps -a
CONTAINER ID   IMAGE                        COMMAND     CREATED         STATUS         PORTS                                       NAMES
71f205205ebb   grafana/grafana-enterprise   "/run.sh"   4 seconds ago   Up 3 seconds   0.0.0.0:3000->3000/tcp, :::3000->3000/tcp   grafana

Open firewall port for Grafana

Run below command to open ports(3000) used for Grafana

sudo firewall-cmd --permanent --add-port=3000/tcp          

Reload firewall configuration

sudo firewall-cmd --reload

Verify installation of Grafana server

Visit your-server-ip:3000, should have the Grafana signin page loaded, use default username and password admin to sign in, then update your admin password.

I’ll create another article to configure kubernetes with Grafana

Reference

Leave a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Scroll to Top