This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
/
prometheus.yml
341 lines (332 loc) · 9.53 KB
/
prometheus.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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
---
name: prometheus
director_uuid: ((director_uuid))
releases:
- name: prometheus
version: latest
stemcells:
- alias: trusty
os: ubuntu-trusty
version: latest
instance_groups:
- name: nginx
instances: 1
vm_type: ((nginx.vm_type))
stemcell: trusty
azs: ((azs))
networks:
- name: ((network_name))
#static_ips: ((nginx.static_ips))
jobs:
- name: nginx
release: prometheus
properties:
nginx: ((nginx.local_properties))
env:
bosh:
password: ((nginx.vm_password))
- name: grafana
instances: 1
vm_type: ((grafana.vm_type))
stemcell: trusty
persistent_disk_type: ((grafana.persistent_disk_type))
azs: ((azs))
networks: [{name: ((network_name))}]
jobs:
- name: grafana
release: prometheus
- name: bosh_dashboards
release: prometheus
- name: cloudfoundry_dashboards
release: prometheus
- name: system_dashboards
release: prometheus
- name: mysql_dashboards
release: prometheus
- name: p_rabbitmq_dashboards
release: prometheus
- name: p_redis_dashboards
release: prometheus
- name: probe_dashboards
release: prometheus
- name: prometheus_dashboards
release: prometheus
properties:
grafana:
security:
admin_password: ((grafana.admin_password))
dashboards:
json:
enabled: true
prometheus:
dashboard_files:
- /var/vcap/jobs/bosh_dashboards/*.json
- /var/vcap/jobs/cloudfoundry_dashboards/*.json
- /var/vcap/jobs/mysql_dashboards/*.json
- /var/vcap/jobs/p_rabbitmq_dashboards/*.json
- /var/vcap/jobs/p_redis_dashboards/*.json
- /var/vcap/jobs/probe_dashboards/*.json
- /var/vcap/jobs/prometheus_dashboards/*.json
- /var/vcap/jobs/system_dashboards/*.json
env:
bosh:
password: ((grafana.vm_password))
- name: alertmanager
instances: 1
vm_type: ((alertmanager.vm_type))
stemcell: trusty
persistent_disk_type: ((alertmanager.persistent_disk_type))
azs: ((azs))
networks: [{name: ((network_name))}]
jobs:
- name: alertmanager
release: prometheus
properties:
alertmanager:
receivers: ((alertmanager.receivers))
route:
receiver: default-receiver
env:
bosh:
password: ((alertmanager.vm_password))
- name: prometheus
instances: 1
vm_type: ((prometheus.vm_type))
stemcell: trusty
persistent_disk_type: ((prometheus.persistent_disk_type))
azs: ((azs))
networks: [{name: ((network_name))}]
jobs:
- name: prometheus
release: prometheus
properties:
prometheus:
rule_files:
- /var/vcap/jobs/bosh_alerts/*.alerts
- /var/vcap/jobs/cloudfoundry_alerts/*.alerts
- /var/vcap/jobs/consul_alerts/*.alerts
- /var/vcap/jobs/haproxy_alerts/*.alerts
- /var/vcap/jobs/kubernetes_alerts/*.alerts
- /var/vcap/jobs/mysql_alerts/*.alerts
- /var/vcap/jobs/p_rabbitmq_alerts/*.alerts
- /var/vcap/jobs/p_redis_alerts/*.alerts
- /var/vcap/jobs/postgres_alerts/*.alerts
- /var/vcap/jobs/probe_alerts/*.alerts
- /var/vcap/jobs/prometheus_alerts/*.alerts
- /var/vcap/jobs/rabbitmq_alerts/*.alerts
- /var/vcap/jobs/redis_alerts/*.alerts
scrape_configs:
- job_name: cf_api
metrics_path: /probe
params:
module:
- http_2xx
static_configs:
- targets:
- ((cf_exporter.cf.api_url))
relabel_configs:
- source_labels: [__address__]
regex: (.*)
target_label: __param_target
replacement: ${1}
- source_labels: [__param_target]
regex: (.*)
target_label: instance
replacement: ${1}
- source_labels: []
regex: .*
target_label: __address__
replacement: localhost:9115
- job_name: bosh
scrape_interval: 1m
scrape_timeout: 1m
static_configs:
- targets:
- localhost:9190
- job_name: collectd
static_configs:
- targets:
- localhost:9103
- job_name: consul
static_configs:
- targets:
- localhost:9107
- job_name: cf_exporter
scrape_interval: 1m
scrape_timeout: 1m
static_configs:
- targets:
- localhost:9193
- job_name: firehose
static_configs:
- targets:
- localhost:9186
#- job_name: github
# static_configs:
# - targets:
# - localhost:9171
#- job_name: graphite
# static_configs:
# - targets:
# - localhost:9108
- job_name: haproxy
static_configs:
- targets:
- localhost:9101
- job_name: mysql
file_sd_configs:
- files:
- /var/vcap/store/bosh_exporter/bosh_target_groups.json
relabel_configs:
- source_labels: [__meta_bosh_job_process_name]
regex: mysqld_exporter
action: keep
- source_labels: [__address__]
regex: "(.*)"
target_label: __address__
replacement: "${1}:9104"
- job_name: nats
static_configs:
- targets:
- localhost:9118
- job_name: node
file_sd_configs:
- files:
- /var/vcap/store/bosh_exporter/bosh_target_groups.json
relabel_configs:
- source_labels: [__meta_bosh_job_process_name]
regex: node_exporter
action: keep
- source_labels: [__address__]
regex: "(.*)"
target_label: __address__
replacement: "${1}:9100"
#- job_name: postgres_exporter
# static_configs:
# - targets:
# - localhost:9113
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
- job_name: pushgateway
static_configs:
- targets:
- localhost:9091
- job_name: rabbitmq
static_configs:
- targets:
- localhost:9125
- job_name: redis
static_configs:
- targets:
- localhost:9121
- name: bosh_alerts
release: prometheus
- name: cloudfoundry_alerts
release: prometheus
- name: mysql_alerts
release: prometheus
- name: p_rabbitmq_alerts
release: prometheus
- name: p_redis_alerts
release: prometheus
- name: probe_alerts
release: prometheus
- name: prometheus_alerts
release: prometheus
- name: blackbox_exporter
release: prometheus
properties:
blackbox_exporter:
config:
modules:
http_2xx:
prober: http
timeout: 5s
- name: bosh_exporter
release: prometheus
properties:
bosh_exporter:
bosh:
uaa:
url: ((bosh_exporter.bosh.uaa.url))
client_id: ((bosh_exporter.bosh.uaa.client_id))
client_secret: ((bosh_exporter.bosh.uaa.client_secret))
url: ((bosh_exporter.bosh.url))
ca_cert: ((bosh_exporter.bosh.ca_cert))
collectors: Deployments,Jobs,ServiceDiscovery
metrics:
environment: cf
- name: cf_exporter
release: prometheus
properties:
cf_exporter:
cf:
api_url: ((cf_exporter.cf.api_url))
client_id: ((cf_exporter.cf.client_id))
client_secret: ((cf_exporter.cf.client_secret))
deployment_name: cf
metrics:
environment: cf
skip_ssl_verify: true
#- name: mysqld_exporter
# release: prometheus
# properties:
# mysqld_exporter:
# mysql:
# address: ((mysqld_exporter.mysql.address))
# username: ((mysqld_exporter.mysql.username))
# password: ((mysqld_exporter.mysql.password))
- name: firehose_exporter
release: prometheus
properties:
firehose_exporter:
uaa:
url: ((firehose_exporter.uaa.url))
client_id: ((firehose_exporter.uaa.client_id))
client_secret: ((firehose_exporter.uaa.client_secret))
doppler:
url: ((firehose_exporter.doppler.url))
web:
port: 9186
metrics:
environment: cf
skip_ssl_verify: true
# - name: cadvisor
# release: prometheus
- name: collectd_exporter
release: prometheus
- name: consul_exporter
release: prometheus
- name: github_exporter
release: prometheus
properties:
github_exporter:
github:
repos: cloudfoundry-community/prometheus-boshrelease
- name: graphite_exporter
release: prometheus
- name: haproxy_exporter
release: prometheus
#- name: kube_state_metrics_exporter
# release: prometheus
- name: nats_exporter
release: prometheus
#- name: postgres_exporter
# release: prometheus
- name: pushgateway
release: prometheus
- name: rabbitmq_exporter
release: prometheus
- name: redis_exporter
release: prometheus
env:
bosh:
password: ((prometheus.vm_password))
update:
canaries: 1
max_in_flight: 32
canary_watch_time: 1000-30000
update_watch_time: 1000-30000
serial: false