This repository was archived by the owner on Apr 13, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
102 lines (96 loc) · 3.47 KB
/
Copy pathcompose.yml
File metadata and controls
102 lines (96 loc) · 3.47 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Secrets (not checked in!) for the admin username and password for Grafana.
secrets:
graf_admin:
file: ./grafana/graf-admin.txt
graf_password:
file: ./grafana/graf-password.txt
poller_password:
file: ./unpoller/poller-password.txt
services:
# Required. TSDB used for pulling and storing metric data.
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: unless-stopped
depends_on:
- snmp_exporter
- unpoller
volumes:
- ./prometheus:/etc/prometheus
- prom_data:/prometheus
# Required. Graphical interface for viewing metrics and dashboards.
# Secrets for the admin username and password are pulled from the
# respective txt files. (See secrets block above.)
grafana:
image: grafana/grafana-oss:latest-ubuntu
container_name: grafana
ports:
- 3000:3000
restart: unless-stopped
secrets:
- graf_admin
- graf_password
environment:
- GF_SECURITY_ADMIN_USER__FILE=/run/secrets/graf_admin
- GF_SECURITY_ADMIN_PASSWORD__FILE=/run/secrets/graf_password
- GF_INSTALL_PLUGINS=grafana-clock-panel
volumes:
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- ./grafana/dashboards:/var/lib/grafana/dashboards
- graf_data:/var/lib/grafana
# Optional. May remove service block if SNMP not needed.
# If removed, the prometheus service should be modified to eliminate
# the depends_on clause for snmp_exporter.
# The snmp.yml file should be generated using the snmp-generator tool.
# See "https://github.com/prometheus/snmp_exporter/tree/main/generator" for details.
# If necessary, the snmp.yml file may need additional editing to include
# appropriate authentication information.
snmp_exporter:
image: prom/snmp-exporter
container_name: snmp-exporter
ports:
- 9116:9116
restart: unless-stopped
volumes:
- ./snmp/snmp.yml:/etc/snmp_exporter/snmp.yml
# Optional. May remove service block if unpoller is not needed.
# If removed, the prometheus service should be modified to eliminate
# the depends_on clause for unpoller
unpoller:
image: ghcr.io/unpoller/unpoller:latest
container_name: unpoller
ports:
- 9130:9130
restart: unless-stopped
secrets:
- poller_password
env_file:
- ./unpoller/unpoller.env
# The following env settings will need to be customized for each installation.
# The default user is the username set as a read-only admin user for the installation.
# The password is passed as a docker secret. (Username as a docker secret is not supported.)
# The default URL should be the name or IP address of the Unifi controller.
environment:
- UP_UNIFI_DEFAULT_USER=unifipoller
- UP_UNIFI_DEFAULT_PASS=file:///run/secrets/poller_password
- UP_UNIFI_DEFAULT_URL=https://192.168.1.1
# Optional. May remove service block if Tesla power systems not needed.
#pypowerwall:
# image: jasonacox/pypowerwall
# container_name: pypowerwall
# ports:
# - 8675:8675
# restart: unless-stopped
# env_file:
# - ./pypowerwall/powerwall.env
# Required.
# - Used by prometheus service for persistent storage of collected data.
# - Used by grafana service for persistent storage of dashboards and plugins
volumes:
prom_data:
graf_data: