Comprehensive Guide to Installing, Configuring, and Using Grafana for Monitoring
This article provides a step‑by‑step tutorial on what Grafana is, its common monitoring scenarios, how to install it on Linux, Windows, macOS or via Docker, configure data sources such as Prometheus, and create or import dashboards for system and business metric visualization.
Grafana is an open‑source visualization and monitoring platform widely used for system, business, log, and cloud service monitoring by connecting to data sources like Prometheus, InfluxDB, MySQL, Elasticsearch, Loki, AWS, Azure, and Google Cloud.
The guide starts by directing readers to the official Grafana download page ( https://grafana.com/get ) where they can choose packages for Linux, Windows, macOS, or Docker.
For CentOS users, installation can be performed with the following command:
sudo yum install -y https://dl.grafana.com/enterprise/release/grafana-enterprise-10.0.3-1.x86_64.rpmAlternatively, Grafana can be deployed quickly using Docker:
docker run -d --name=grafana -p 3000:3000 grafana/grafana-enterpriseAfter installation, access the web UI at http://localhost:3000 (or the configured address) and log in with the default credentials admin/admin , then change the password for security.
To add a data source, click the "Configuration" → "Data Sources" menu, then "Add data source" and select a source such as Prometheus, Elasticsearch, InfluxDB, or MySQL. The example shows configuring a Prometheus data source as the default.
With a data source in place, create a new dashboard by clicking "Add new panel", choose the visualization type, configure queries and panel options, and save the panel. Screenshots illustrate the resulting chart.
Custom dashboards can be imported from the Grafana dashboard repository (e.g., dashboard ID 8919) by copying the ID and using the "Import" function, after which the imported dashboard appears in the list.
The article also recommends several ready‑made templates, such as the node_exporter host monitoring template (ID 16098), blackbox_exporter (ID 7587), and windows_exporter (ID 10467).
Finally, the author offers a free collection of over 300,000 Chinese characters of Alibaba architect advanced topics and a comprehensive Java interview Q&A set, encouraging readers to contact via WeChat for access.
Mike Chen's Internet Architecture
Over ten years of BAT architecture experience, shared generously!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.