Skip to content

Commit 92361d2

Browse files
committed
Issue #226: Legwork towards showing metrics for Pi itself in Grafana.
1 parent 7eab7b3 commit 92361d2

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ prometheus_extra_scrape_configs: |
7878
- targets: ['192.168.1.1:9100']
7979
```
8080
81+
You can also add more targets to monitor via the node exporter dashboard, say if you have a number of servers or other Pis you want to monitor on this instance. Just add them to the list, after the `nodeexp:9100` entry for the main Pi:
82+
83+
```yaml
84+
prometheus_node_exporter_targets:
85+
- 'nodeexp:9100'
86+
# Add more targets here
87+
- 'another-server.local:9100'
88+
```
89+
8190
## Updating
8291

8392
### pi-hole

example.config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ monitoring_ping_hosts: # [URL];[HUMAN_READABLE_NAME]
2626
- https://www.apple.com/;apple.com
2727

2828
# Prometheus configuration.
29+
prometheus_node_exporter_targets:
30+
- 'nodeexp:9100'
2931
prometheus_extra_scrape_configs: ''
3032

3133
# Shelly Plug configuration. (Also requires `monitoring_enable`)

templates/prometheus.yml.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ scrape_configs:
6969
- target_label: __address__
7070
replacement: ping:9115 # The blackbox exporter's real hostname:port.
7171

72-
- job_name: 'nodeexp'
72+
- job_name: 'node'
73+
scrape_interval: 5s
7374
static_configs:
74-
- targets: ['nodeexp:9100']
75+
- targets: {{ prometheus_node_exporter_targets | to_yaml }}
7576

7677
- job_name: 'pihole-exporter'
7778
static_configs:

0 commit comments

Comments
 (0)