DEV Community

chauhoangminhnguyen
chauhoangminhnguyen

Posted on • Edited on • Originally published at howtodevez.blogspot.com

3 1 1 1 1

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:

Image of AssemblyAI tool

Challenge Submission: SpeechCraft - AI-Powered Speech Analysis for Better Communication

SpeechCraft is an advanced real-time speech analytics platform that transforms spoken words into actionable insights. Using cutting-edge AI technology from AssemblyAI, it provides instant transcription while analyzing multiple dimensions of speech performance.

Read full post

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay