forked from jjethwa/icinga2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
166 lines (159 loc) · 4.72 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
version: '2'
services:
icinga2:
image: necator94/icinga2_stack:latest
# build:
# context: ./
# dockerfile: Dockerfile
restart: always
# Set your hostname to the FQDN under which your
# sattelites will reach this container
hostname: icinga.dessau.net
environment:
TZ: Europe/Berlin
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
DEFAULT_MYSQL_HOST: mysql
# Important: keep the hostname graphite the same as
# the name of the graphite docker-container
ICINGA2_FEATURE_INFLUXDB: 'true'
ICINGA2_FEATURE_INFLUXDB_HOST: influxdb
ICINGA2_FEATURE_INFLUXDB_PORT: 8086
ICINGA2_FEATURE_INFLUXDB_SEND_THRESHOLDS: 'true'
ICINGA2_FEATURE_INFLUXDB_SEND_METADATA: 'false'
ICINGA2_FEATURE_INFLUXDB_FLUSH_THRESHOLD: 1024
ICINGA2_FEATURE_INFLUXDB_FLUSH_INTERVAL: 10s
ICINGA2_FEATURE_INFLUXDB_DB_NAME: ${INFLUX_DATABASE}
ICINGA2_FEATURE_INFLUXDB_DB_USER: ${INFLUX_USER}
ICINGA2_FEATURE_INFLUXDB_USER_PASSWORD: ${INFLUX_USER_PASSWORD}
ICINGA2_USER_FULLNAME: Icinga2 Docker Monitoring Instance
ICINGAWEB2_ADMIN_USER: ${ICINGAWEB2_ADMIN_USER}
ICINGAWEB2_ADMIN_PASS: ${ICINGAWEB2_ADMIN_PASS}
# Icingaweb2 grafana module
ICINGAWEB2_MODULE_GRAFANA: 'false'
ICINGAWEB2_MODULE_GRAFANA_HOST: grafana:3000
ICINGAWEB2_MODULE_GRAFANA_USERNAME: ${GRAFANA_USERNAME}
ICINGAWEB2_MODULE_GRAFANA_PASSWORD: ${GRAFANA_PASSWORD}
# Explicitly disabled features/modules
ICINGA2_FEATURE_GRAPHITE: 'false'
volumes:
- icinga_cache:/var/cache/icinga2
- icinga_var_lib:/var/lib/icinga2
# - icinga_php:/var/lib/php/sessions
- icinga_var_spool:/var/spool/icinga2
- icinga_plugins:/usr/lib/nagios/plugins
- icinga_etc:/etc
- icinga_log:/var/log
ports:
- "80:80"
- "443:443"
- "5665:5665"
#network_mode: "host"
dns:
- ${DNS_IP}
depends_on:
- mysql
- influxdb
- grafana
logging:
driver: "none"
options:
max-size: 100m
mysql:
image: mariadb
restart: always
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
volumes:
- mysql:/var/lib/mysql
# If you have previously used the container's internal DB use:
#- ./data/icinga/lib/mysql:/var/lib/mysql
logging:
driver: "json-file"
options:
max-size: 10m
influxdb:
image: influxdb:1.8.3
restart: always
ports:
# External port 8087 is chosen because docker-proxy uses port 8086 on localhost
- '127.0.0.1:8087:8086'
volumes:
- influxdb-storage:/var/lib/influxdb
environment:
INFLUXDB_DB: ${INFLUX_DATABASE}
INFLUXDB_ADMIN_USER: ${INFLUX_ADMIN_USERNAME}
INFLUXDB_ADMIN_PASSWORD: ${INFLUX_ADMIN_PASSWORD}
INFLUXDB_USER: ${INFLUX_USER}
INFLUXDB_USER_PASSWORD: ${INFLUX_USER_PASSWORD}
INFLUXDB_HTTP_AUTH_ENABLED: 'true'
INFLUXDB_HTTP_LOG_ENABLED: 'false'
logging:
driver: "json-file"
options:
max-size: 10m
chronograf:
image: chronograf:latest
restart: always
ports:
- '127.0.0.1:8888:8888'
volumes:
- chronograf-storage:/var/lib/chronograf
depends_on:
- influxdb
environment:
INFLUXDB_URL: http://influxdb:8086
INFLUXDB_USERNAME: ${INFLUX_ADMIN_USERNAME}
INFLUXDB_PASSWORD: ${INFLUX_ADMIN_PASSWORD}
logging:
driver: "json-file"
options:
max-size: 10m
grafana:
image: grafana/grafana:latest
restart: always
ports:
- '3000:3000'
volumes:
- grafana-storage:/var/lib/grafana
- ./grafana-provisioning/:/etc/grafana/provisioning
depends_on:
- influxdb
environment:
# Custom env to build the grafana-provisioning/datasources
DB_SOURCE: ${INFLUX_DATABASE}
DB_USER: ${INFLUX_USER}
DB_USER_PASSWORD: ${INFLUX_USER_PASSWORD}
DB_URL: http://influxdb:8086
GF_SECURITY_ADMIN_USER: ${GRAFANA_USERNAME}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}
#GF_RENDERING_SERVER_URL: http://renderer:8081/render
GF_RENDERING_CALLBACK_URL: http://grafana:3000/
# GF_LOG_FILTERS: rendering:debug
# GF_LOG_LEVEL: debug
logging:
driver: "json-file"
options:
max-size: 10m
# renderer:
# image: grafana/grafana-image-renderer:latest
# restart: always
# ports:
# - '127.0.0.1:8081:8081'
# environment:
# BROWSER_TZ: Europe/Berlin
# logging:
# driver: "json-file"
# options:
# max-size: 10m
volumes:
influxdb-storage:
chronograf-storage:
grafana-storage:
mysql:
icinga_cache:
icinga_etc:
icinga_log:
icinga_var_lib:
icinga_var_spool:
icinga_plugins: