Prometheus is an open source monitoring system for which Grafana provides out-of-the-box support. This topic walks you through the steps to create a series of dashboards in Grafana to display system metrics for a server monitored by Prometheus.
- [Connect to a Prometheus data source in Grafana Cloud](https://www.grafana.com/docs/learning-journeys/prometheus/) to visualize your metrics directly from where they are stored.
- [Send metrics to Grafana Cloud using Prometheus remote write](https://www.grafana.com/docs/learning-journeys/prom-remote-write/) to explore Grafana Cloud without making significant changes to your existing configuration.
Like Grafana, you can install Prometheus on many different operating systems. Refer to the [Prometheus download page](https://prometheus.io/download/) to see a list of stable versions of Prometheus components.
Prometheus Node exporter is a widely used tool that exposes system metrics. For instructions on installing Node exporter, refer to the [Installing and running the Node exporter](https://prometheus.io/docs/guides/node-exporter/#installing-and-running-the-node-exporter) section in the Prometheus documentation.
The instructions in the referenced topic are intended for Linux users. You may have to alter the instructions slightly depending on your operating system. For example, if you are on Windows, use the [windows_exporter](https://github.com/prometheus-community/windows_exporter) instead.
By default, Prometheus looks for the file `prometheus.yml` in the current working directory. This behavior can be changed via the `--config.file` command line flag. For example, some Prometheus installers use it to set the configuration file to `/etc/prometheus/prometheus.yml`.
The following example shows you the code you should add. Notice that static configs targets are set to `['localhost:9100']` to target node-explorer when running it locally.
When running Prometheus locally, there are two ways to configure Prometheus for Grafana. You can use a hosted Grafana instance at [Grafana Cloud](/) or run Grafana locally.

1. Because you are running your own Prometheus instance locally, you must `remote_write` your metrics to the Grafana.com Prometheus instance. Grafana provides code to add to your `prometheus.yml` config file. This includes a remote write endpoint, your user name and password.
Add the following code to your prometheus.yml file to begin sending metrics to your hosted Grafana instance.
To configure your Prometheus instance to work with Grafana locally instead of Grafana Cloud, install Grafana [here](/grafana/download) and follow the configuration steps listed [here](/docs/grafana/latest/datasources/prometheus/#configure-the-data-source).
These are some of the troubleshooting steps you can try if Prometheus isn’t running or functioning as expected. The steps provided have been selected based on the Learning Journeys we offer for Prometheus. If you’d like to explore further, check out the [Prometheus Learning Journey](https://grafana.com/docs/learning-journeys/prometheus/) if you want to visualize data in Grafana Cloud without sending or storing data in Grafana Cloud, such as for local retention needs. Alternatively, if you already have a Prometheus setup and want to explore Grafana Cloud without making significant changes, visit the [Prometheus remote write learning journey](https://grafana.com/docs/learning-journeys/prom-remote-write/).
### 1. Checking if Prometheus is running
If the Prometheus web UI is inaccessible (e.g., "Connection refused" error in the browser) or Prometheus queries fail (e.g., errors in Grafana like "Data source unavailable" or "No data points"), a good place to start is confirming that the Prometheus process and service are running.
You can do this by checking the system process or verifying the service status:
**Linux**
```bash
sudo systemctl status prometheus
```
- Shows whether the process is running and if the service is active.
**MacOS**
```bash
pgrep prometheus
```
- Returns the process ID (PID) if Prometheus is running.
- Recommended for security: runs Prometheus as a non-login user.
### 3. Checking if Prometheus is running as a service
If Prometheus is running as a process, check whether it is properly set up and managed as a service to ensure it restarts automatically after reboots or failures.
**Check Prometheus service status**
**Linux**
```bash
systemctl status prometheus.service
```
**Windows**
```powershell
sc query prometheus
```
**MacOs**
```bash
pgrep prometheus
```
- If the service is **inactive (dead) or stopped**, proceed to the next steps.
### 4. If Prometheus is not running as a service
If Prometheus is not running as a managed service, ensure it is correctly configured and can restart automatically.
**Verify service configuration** **(Linux & MacOs)**
Check the service unit file to ensure correct paths:
- The **binary path** (`/usr/local/bin/prometheus`) is correct.
- The **configuration file** (`/etc/prometheus/prometheus.yml`) is in place.
- The **storage path** (`/var/lib/prometheus/`) exists.
**Restart and enable Prometheus service (Linux & MacOs)**
```bash
sudo systemctl daemon-reload
sudo systemctl enable prometheus
sudo systemctl start prometheus
sudo systemctl status prometheus
```
**Check Prometheus health status**
After restarting, verify if Prometheus is responsive:
```bash
curl -s http://localhost:9090/-/ready
```
- If successful, this confirms Prometheus is **ready to serve requests**.
**Restart Prometheus service (Windows)**
If running as a Windows service, restart it:
```powershell
net stop prometheus
net start prometheus
```
### 5. Checking if Prometheus is capturing metrics
If you installed [Node exporter](#install-prometheus-node-exporter) to expose your system metrics, you can check if Prometheus is capturing metrics by sending a request to the `/metrics` endpoint.
```bash
curl http://localhost:9090/metrics
```
- It should return a number of metrics and metadata about the metrics being exposed.
## Check Prometheus metrics in Grafana Metics Drilldown
In your Grafana instance, go to the [Drilldown](https://www.grafana.com/docs/grafana/latest/explore/simplified-exploration/metrics/) view and experience query-less browsing of Prometheus-compatible metrics.
Now that you have a curated list of queries, create [dashboards](../../dashboards/) to render system metrics monitored by Prometheus. When you install Prometheus and Node exporter or windows_exporter, you will find recommended dashboards for use.