Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To monitor a server with Prometheus and Grafana, expose its system metrics through an exporter, configure Prometheus to scrape that endpoint, then connect Grafana to Prometheus and build dashboard panels with PromQL. Prometheus collects and stores the time series; Grafana is the interface for exploring and visualizing them.

How the monitoring workflow fits together

Each part has a distinct job:

  • Exporter: exposes metrics about a host or service through an HTTP endpoint. Node exporter is the example for Linux host metrics in Grafana’s getting-started guide.
  • Prometheus: pulls metrics from configured target endpoints and stores them as time series.
  • Grafana: connects to Prometheus as a data source, queries its metrics with PromQL, and displays results in Explore or dashboard panels.

Prometheus is not the dashboard interface, and Grafana does not replace the metrics collector. See the Prometheus overview, Grafana Prometheus data source documentation, and Prometheus support for Grafana.

What you need before setup

  • Identify the server or servers you want to monitor and note their operating systems. Grafana’s introductory procedure is written for Linux; other operating systems may need different steps.
  • Choose where Prometheus and Grafana will run. An existing host or virtual machine may be sufficient; the documented workflow does not require dedicated hardware.
  • Make sure Prometheus can reach each exporter endpoint over the network. The endpoint must be accessible from the Prometheus server, not merely from your browser.

Set up a server metrics dashboard

1. Install an exporter on the server

For a Linux host, Grafana’s example uses Node exporter. Its local metrics endpoint is http://localhost:9100/metrics when the exporter is running on the same machine. Confirm the endpoint is reachable from the Prometheus host; if Prometheus is on another machine, use the server’s reachable address rather than assuming that localhost refers to the monitored server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For Windows, Grafana’s guide points to windows_exporter. Exporters and their installation details vary by operating system and service, so follow the current instructions for the exporter you choose. The Prometheus exporter guidance distinguishes projects maintained in its official GitHub organization from external contributions; check an exporter’s maintainer and compatibility before relying on it.

2. Configure Prometheus to scrape the exporter

Prometheus reads its scrape configuration from prometheus.yml. Add a scrape job that targets the exporter’s reachable host and port, then use Prometheus’s configuration and target status to check that the target is being scraped successfully. The exact address depends on where the exporter and Prometheus run; a local endpoint is not automatically the correct target for a remote server.

Prometheus uses a pull model: it requests metrics from the target’s HTTP endpoint. The Prometheus first-steps guide explains this basic model and configuration. The cited setup guidance does not establish one scrape interval or retention period suitable for every server, so choose those settings for your workload and storage constraints rather than treating a single value as universal.

3. Add Prometheus as a Grafana data source

In Grafana, configure a Prometheus data source with the address of your Prometheus server. Grafana’s Prometheus data source is included, so the documented setup does not require installing a separate plugin. Use the address reachable from Grafana: when Grafana and Prometheus run in different environments, localhost may point to the wrong machine or container.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Grafana’s current Prometheus data source documentation for connection settings and supported features.

4. Explore metrics and create panels

Open Grafana Explore, select the Prometheus data source, and inspect the metric names available from the target. Write PromQL queries to select or calculate the data you want, then use those queries in dashboard panels. For example, a panel can show a metric over time or summarize a value, but the right query depends on what the exporter exposes and what you need to observe.

When using PromQL’s rate or increase functions in Grafana, the Prometheus visualization guidance recommends Grafana’s $__rate_interval variable for Grafana 7.2 and later. This is version-specific guidance; consult the current Prometheus and Grafana visualization guidance alongside the documentation for the Grafana version you run.

Dashboards and alerts serve different purposes

A dashboard panel helps you inspect a metric; a displayed threshold alone is not an alert with a notification route. To alert on a server condition, define the rule’s query and condition, evaluation interval, pending period, labels, and notification handling. Grafana’s alerting documentation also calls for a Prometheus data source and familiarity with the relevant PromQL metrics.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose who owns the alert rule

Rule type Where it is defined and evaluated Where to edit it
Grafana-managed Defined and evaluated in Grafana, using Prometheus as the query source. In Grafana’s alerting interface.
Data source-managed (Prometheus-native) Defined in Prometheus configuration or rule files. In Prometheus configuration or rule files. Grafana can display these rules in its alerting UI when the relevant setting is enabled, but the documentation describes them as read-only there.

Decide which system owns each rule before editing or troubleshooting it. The Grafana Prometheus alerting documentation describes both paths and their configuration.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose self-managed or hosted Grafana

Approach What it means
Self-managed Grafana You install and operate the Grafana instance. The setup can run on an existing host or virtual machine; the introductory material does not require separate hardware.
Grafana Cloud A hosted option described by Grafana as a way to avoid installing, maintaining, and scaling a Grafana instance.

The cited documentation does not establish a general winner on total cost, feature limits, data residency, or vendor lock-in. Evaluate those requirements for your own deployment rather than inferring them from the setup workflow.

Monitor Grafana as well as the server

Grafana can expose its own internal metrics at /metrics, which Prometheus can scrape. Those metrics can be used in Grafana dashboards, Explore, or alerts to observe items such as dashboards, users, HTTP status codes, active alerts, and performance. Grafana’s monitoring documentation also describes native histogram settings and notes that disabling classic HTTP histogram buckets can reduce metric cardinality. See Set up Grafana monitoring for the applicable settings.

Troubleshoot the data path

  • No exporter metrics: check that the exporter is running and its endpoint responds from the Prometheus host. A browser on another machine reaching an address does not by itself confirm Prometheus can reach it.
  • Prometheus target is unavailable: verify the target address and port in prometheus.yml, network access, and that the exporter serves its metrics endpoint.
  • Grafana cannot query Prometheus: check the data source address from Grafana’s network context and confirm Prometheus is reachable there.
  • Explore has no expected metric: confirm Prometheus is scraping the intended target, then check the metric names exposed by that exporter before writing the query.
  • An alert appears but is not editable in Grafana: it may be a Prometheus-native, data source-managed rule; edit it in Prometheus configuration or rule files instead.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.