How to Install Prometheus Grafana on Macos
Curious how your Mac is really performing? Here’s a quick guide to setting up Prometheus and Grafana on macOS for local, private system monitoring.
Curious how your Mac is really performing? Here’s a quick guide to setting up Prometheus and Grafana on macOS for local, private system monitoring.
Why?
Why not?
Running Prometheus and Grafana locally on macOS has a bunch of perks:
-
🖥️ Full control & privacy: You’re monitoring your own system without sending data anywhere else.
-
⚙️ Real-time performance tracking: Keep an eye on CPU, memory, disk, and network usage as it happens.
-
🔍 Spot bottlenecks easily: See where your Mac struggles under load and fix issues faster.
-
📊 Data-driven upgrades: Use real stats to decide if or when you actually need better hardware.
-
🌐 Flexible setup: Doesn’t have to be your personal Mac — it could be a macOS server instead.
-
⚡ Lightweight setup: Quick to run and doesn’t hog system resources.
Prerequisites
-
MacOS
-
Homebrew installed
Step 1. Install Node Exporter
First, we need a service that collects hardware metrics from macOS — that’s Node Exporter.
brew install node_exporter
make sure that it listens only on localhost:
% cat /opt/homebrew/etc/node_exporter.args
--web.listen-address=127.0.0.1:9100
if you changed the configuration, restart the service:
brew services start node_exporter
you should have metrics available at at 127.0.0.1:9100/metrics.
Step 2. Install Prometheus
Next, let’s set up Prometheus, which stores and queries the collected metrics:
brew install prometheus
ensure it’s also bound only to localhost:
$ cat /opt/homebrew/etc/prometheus.args
--config.file /opt/homebrew/etc/prometheus.yml
--web.listen-address=127.0.0.1:9090
--storage.tsdb.path /opt/homebrew/var/prometheus
Now, add Node Exporter as a scrape target in the Prometheus configuration:
% cat /opt/homebrew/etc/prometheus.yml
global:
scrape_interval: 15s
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "node"
static_configs:
- targets: ["localhost:9100"]
Step 3. Install Grafana
Finally, let’s install Grafana, the place where you’ll visualize your data:
brew install grafana
Restrict Grafana to localhost and disable unnecessary access:
# in /opt/homebrew/etc/grafana/grafana.ini
[server]
# access only from localhost
http_addr = 127.0.0.1
[users]
# disable user signup / registration
allow_sign_up = false
[auth.anonymous]
# disable anonymous access
enabled = false
Then start all services to ensure everything runs automatically on startup:
brew services start node_exporter
brew services start prometheus
brew services start grafana
Step 4. Grafana Dashboards
You can use ready-made dashboards for MacOS at Node Exporter Mac OSX . Or/and you can use a list of metrics available at Grafana Node Exporter metrics .
If you go with custom metrics, for CPU usage you can create a dashboard where:
-
100 * avg by (mode) (rate(node_cpu_seconds_total[1m]))- used CPU by mode (idle, user, system, etc) -
100- 100 %

Conclusion
That’s it, now you have a complete local monitoring setup!
Prometheus collects your metrics, Grafana visualizes them, and you stay in full control of your data. You can now experiment with different dashboards, tweak refresh rates, and explore your Mac’s performance in real time.