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 Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay