-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgrafana-agent.yaml
45 lines (43 loc) · 1.33 KB
/
grafana-agent.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Co2monitor Grafana Agent
# For a full configuration reference, see: https://github.com/grafana/agent/blob/main/docs/configuration-reference.md.
server:
http_listen_address: '127.0.0.1'
http_listen_port: 9090
grpc_listen_address: 127.0.0.1
prometheus:
global:
scrape_interval: 10s
remote_write:
- url: ${PROM_REMOTE_WRITE_URL}
basic_auth:
username: ${PROM_REMOTE_WRITE_USER}
password: ${PROM_REMOTE_WRITE_PW}
# do not destroy our sd-card on purpose, WAL is not persistent between reboots
wal_directory: '/run/grafana-agent'
configs:
- name: co2exporter
host_filter: false
scrape_configs:
- job_name: co2exporter
file_sd_configs:
- files:
- '/etc/prometheus/targets/co2exporter/*.yml'
integrations:
agent:
enabled: true
prometheus_remote_write:
- url: ${PROM_REMOTE_WRITE_URL}
basic_auth:
username: ${PROM_REMOTE_WRITE_USER}
password: ${PROM_REMOTE_WRITE_PW}
node_exporter:
enabled: true
include_exporter_metrics: true
disable_collectors:
- "mdadm"
enable_collectors:
- "systemd"
# we only really want NRestarts metrics of co2exporter service
systemd_unit_whitelist: "co2exporter.+"
systemd_enable_restarts_metrics: true
systemd_enable_start_time_metrics: true