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.
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
Here's how the homepage looks.
First, you need to add Prometheus as a data source:
1. Go to Connections > Add new connection > select Prometheus.
2. Enter the Prometheus server URL that you defined when starting Docker Compose.
Once the data source is successfully added, create a new dashboard:
1. Click on New > New dashboard > Add visualization.
2. Select Prometheus as the data source and choose a metric to use, such as container_memory_cache.
After saving, you can view the results on your dashboard as follows:
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.
After successfully loading the dashboard template, save it for easy access in the future.
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.
Some series you might find interesting:
Top comments (0)