forked from Apstra/aosom-streaming
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
230 lines (217 loc) · 6.67 KB
/
docker-compose.yml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
version: "3.8"
volumes:
grafana_data: {}
prometheus_data: {}
influxdb_data: {}
chronograf_data: {}
loki_data: {}
logstash_data: {}
networks:
syslog:
driver: bridge
ipam:
driver: default
config:
- subnet: 169.254.100.0/30
gateway: 169.254.100.1
services:
# -------------------------------------------------------------------------
# Grafana - Graphical Interface
# -------------------------------------------------------------------------
grafana:
image: grafana/grafana:latest
volumes:
- /etc/localtime:/etc/localtime
- grafana_data:/var/lib/grafana
- ./config/grafana/grafana.ini:/etc/grafana/grafana.ini
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_LOGIN}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
restart: unless-stopped
depends_on:
- prometheus
ports:
- "3000:3000"
# -------------------------------------------------------------------------
# Prometheus
# -------------------------------------------------------------------------
prometheus:
image: prom/prometheus:latest
volumes:
- ./config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./config/prometheus/alert.rules:/etc/prometheus/alert.rules
- /etc/localtime:/etc/localtime
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.retention=365d'
- '--storage.tsdb.path=/prometheus'
restart: unless-stopped
ports:
- '9090:9090'
# -------------------------------------------------------------------------
# Influxdb + Chronograf
# -------------------------------------------------------------------------
influxdb:
image: influxdb:1.8.9
volumes:
- /etc/localtime:/etc/localtime
- ./config/influxdb/initdb/:/docker-entrypoint-initdb.d/
- influxdb_data:/var/lib/influxdb
environment:
#- INFLUXDB_USER=${INFLUXDB_USER:-user}
#- INFLUXDB_USER_PASSWORD=${INFLUXDB_USER_PASSWORD:-grafanapass123}
- INFLUXDB_ADMIN_ENABLED=true
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER:-admin}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD:-admin}
- INFLUXDB_DB="aos"
- INFLUXDB_HTTP_AUTH_ENABLED=true
- INFLUXDB_HTTP_LOG_ENABLED=false
- INFLUXDB_REPORTING_DISABLED=true
- INFLUXDB_MONITOR_STORE_ENABLED=false
- INFLUXDB_INIT_RETENTION=365d
deploy:
mode: replicated
replicas: 1
resources:
limits:
memory: 2048M
reservations:
memory: 1024M
healthcheck:
test: "/usr/bin/wget -q -Y off http://localhost:8086/metrics -O /dev/null > /dev/null 2>&1"
interval: 25s
timeout: 3s
start_period: 30s
restart: unless-stopped
ports:
- "8086:8086"
chronograf:
image: chronograf:latest
restart: unless-stopped
volumes:
- chronograf_data:/var/lib/chronograf
depends_on:
- influxdb
environment:
- INFLUXDB_URL=http://influxdb:8086
- INFLUXDB_USERNAME=${INFLUXDB_ADMIN_USER}
- INFLUXDB_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
ports:
- '8888:8888'
# -------------------------------------------------------------------------
# Apstra-Telegraf - Prometheus (Alerts and Perfmon)
# -------------------------------------------------------------------------
telegraf-prom:
image: apstra/telegraf:latest
command: telegraf -debug
restart: unless-stopped
env_file:
- .env
volumes:
- ./config/telegraf/telegraf-prom.conf:/etc/telegraf/telegraf.conf
- /etc/localtime:/etc/localtime
depends_on:
- prometheus
ports:
- '6666:6666'
# -------------------------------------------------------------------------
# Apstra-Telegraf - Influx (Events)
# -------------------------------------------------------------------------
telegraf-influx:
image: apstra/telegraf:latest
command: telegraf -debug
depends_on:
- influxdb
restart: unless-stopped
env_file:
- .env
volumes:
- ./config/telegraf/telegraf-influx.conf:/etc/telegraf/telegraf.conf
- /etc/localtime:/etc/localtime
environment:
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
ports:
- '4444:4444'
# -------------------------------------------------------------------------
# Telegraf-Syslog [RFC 5424] +
# Syslog-NG [RFC 3164] --OR-- RSyslog [RFC 3164]
# -------------------------------------------------------------------------
telegraf-syslog:
image: telegraf:latest
command: telegraf -debug
restart: unless-stopped
hostname: telegraf-syslog
env_file:
- .env
volumes:
- ./config/telegraf/telegraf-syslog.conf:/etc/telegraf/telegraf.conf
- /etc/localtime:/etc/localtime
environment:
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
depends_on:
- influxdb
ports:
- '6514:6514/udp'
- '6601:6601'
networks:
default:
syslog:
ipv4_address: 169.254.100.2
syslog-ng:
command: -edv
image: balabit/syslog-ng:latest
restart: always
volumes:
- /etc/localtime:/etc/localtime
- ./config/syslog-ng/syslog-ng.conf:/etc/syslog-ng/syslog-ng.conf:ro
network_mode: "host"
depends_on:
- telegraf-syslog
#rsyslog:
# image: rsyslog/syslog_appliance_alpine:latest
# restart: unless-stopped
# hostname: rsyslog
# volumes:
# - ./config/rsyslog/:/config/
# - /etc/localtime:/etc/localtime
# network_mode: "host"
# environment:
# - RSYSLOG_CONF=/config/rsyslog.conf
# depends_on:
# - telegraf-syslog
# -------------------------------------------------------------------------
# Loki + (Promtail if you need parse some logs)
# -------------------------------------------------------------------------
loki:
command: -config.file=/etc/loki/loki-config.yml
image: grafana/loki:2.3.0
ports:
- protocol: tcp
published: 3100
target: 3100
- protocol: tcp
published: 9093
target: 9093
restart: always
volumes:
- /etc/localtime:/etc/localtime
- loki_data:/loki
- ./config/loki/loki-config.yml:/etc/loki/loki-config.yml:ro
#promtail:
# command: -config.file=/etc/promtail/promtail-config.yml
# image: grafana/promtail:latest
# ports:
# - protocol: tcp
# published: 1514
# target: 1514
# - protocol: tcp
# published: 9080
# target: 9080
# restart: always
# volumes:
# - /logs/:/logs/
# - /etc/localtime:/etc/localtime
# - ./config/promtail/promtail-config.yml:/etc/promtail/promtail-config.yml:ro