Monitoring with Grafana

chauhoangminhnguyen

chauhoangminhnguyen

Posted on September 13, 2024

Monitoring with Grafana

Introduction

In my previous article, I guided you through setting up cAdvisor, Prometheus and Grafana on Docker, which are widely used for system monitoring. Now that you've successfully started Grafana, follow these next steps to start using it.

Grafana monitor

Using Grafana

When you access the Grafana login page, use the following default credentials for your first login. You can change them later as needed.

username: admin
password: admin
Enter fullscreen mode Exit fullscreen mode

Grafana login

Here's how the homepage looks.
Grafana homepage

First, you need to add Prometheus as a data source:

1. Go to Connections > Add new connection > select Prometheus.
Add new connection

2. Enter the Prometheus server URL that you defined when starting Docker Compose.
Connect to Prometheus

Once the data source is successfully added, create a new dashboard:

1. Click on New > New dashboard > Add visualization.
Add visualization

New Dashboard

2. Select Prometheus as the data source and choose a metric to use, such as container_memory_cache.
Config datasource

After saving, you can view the results on your dashboard as follows:
Grafana chart

Using Dashboard Templates

Grafana offers a variety of dashboard templates suitable for data sources like Prometheus. You can browse these templates to find one that fits your needs here.

Once you've found a suitable template, import it into Grafana as follows:

1. Go to Dashboards > New > Import

2. Enter the Dashboard URL or ID and click Load. For example, if the Dashboard URL is https://grafana.com/grafana/dashboards/14900-nginx, the ID would be 14900.
Import dashboard

After successfully loading the dashboard template, save it for easy access in the future.
Dashboard result
What do you think? Leave a comment below!


If you found this content helpful, please visit the original article on my blog to support the author and explore more interesting content.

BlogspotBlogspotDev.toFacebookX


Some series you might find interesting:

💖 💪 🙅 🚩
chauhoangminhnguyen
chauhoangminhnguyen

Posted on September 13, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Monitoring with Grafana
grafana Monitoring with Grafana

September 13, 2024