-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprom-server-cm.yaml
742 lines (741 loc) · 28.4 KB
/
prom-server-cm.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
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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
apiVersion: v1
data:
alerting_rules.yml: |
groups:
- name: pod_cpu_usage_is_high
rules:
- alert: CPUISHIGH
expr: sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name!=""}[5m])) by (pod_name) > 0.1
for: 1m
labels:
severity: critical
annotations:
description: 'POD {{ $labels.pod }} cpu is high'
summary: 'pod cpu is high'
- name: node_cpu_greater_than_80
rules:
- alert: NODECPUISHIGH
expr: (avg by(instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 80
for: 1m
labels:
severity: critical
annotations:
description: 'node {{ $labels.node }} cpu is high'
summary: 'node cpu is greater than 80 precent'
- name: node_memory_left_lessser_than_10
rules:
- alert: NODEMEMORY
expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10
for: 1m
labels:
severity: critical
annotations:
description: 'node {{ $labels.node }} memory left is low'
summary: 'node memory left is lesser than 10 precent'
- name: spinnaker-service-is-down
rules:
- alert: clouddriver-is-down
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
is not responding
summary: Clouddriver Spinnaker service is down
expr: absent(up{service="spin-clouddriver"}) == 1
labels:
severity: critical
#- alert: clouddriver-rw-is-down
# annotations:
# description: Service {{$labels.service}} in namespace {{$labels.namespace}}
# is not responding
# summary: Clouddriver-rw Spinnaker service is down
# expr: absent(up{service="spin-clouddriver-rw"}) == 1
# labels:
# severity: critical
#- alert: clouddriver-ro-is-down
# annotations:
# description: Service {{$labels.service}} in namespace {{$labels.namespace}}
# is not responding
# summary: Clouddriver-ro Spinnaker service is down
# expr: absent(up{service="spin-clouddriver-ro"}) == 1
# labels:
# severity: critical
#- alert: clouddriver-caching-is-down
# annotations:
# description: Service {{$labels.service}} in namespace {{$labels.namespace}}
# is not responding
# summary: Clouddriver-caching Spinnaker service is down
# expr: absent(up{service="spin-clouddriver-caching"}) == 1
# labels:
# severity: critical
- alert: gate-is-down
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
is not responding
summary: Gate Spinnaker services is down
expr: absent(up{service="spin-gate"}) == 1
labels:
severity: critical
- alert: orca-is-down
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
is not responding
summary: Orca Spinnaker service is down
expr: absent(up{job="opsmx_spinnaker_metrics", service="spin-orca"}) == 1
labels:
severity: critical
- alert: igor-is-down
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
is not responding
summary: Igor Spinnaker service is down
expr: absent(up{service="spin-igor"}) == 1
labels:
severity: critical
- alert: echo-is-down
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
is not responding
summary: Echo Spinnaker service is down
expr: absent(up{service="spin-echo" }) == 1
labels:
severity: critical
#- alert: echo-scheduler-is-down
# annotations:
# description: Service {{$labels.service}} in namespace {{$labels.namespace}}
# is not responding
# summary: Echo-Scheduler Spinnaker service is down
# expr: absent(up{service="spin-echo-scheduler" }) == 1
# labels:
# severity: critical
#- alert: echo-worker-is-down
# annotations:
# description: Service {{$labels.service}} in namespace {{$labels.namespace}}
# is not responding
# summary: Echo-worker Spinnaker service is down
# expr: absent(up{service="spin-echo-worker" }) == 1
# labels:
# severity: critical
- alert: front50-is-down
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
is not responding
summary: Front50 Spinnaker service is down
expr: absent(up{service="spin-front50" }) == 1
labels:
severity: critical
- name: latency-too-high
rules:
- alert: clouddriver-latency-too-high
annotations:
description: "Service {{$labels.service}} is slow ({{$value}} per minute)"
summary: "latency of clouddriver is too high"
expr: sum(rate(clouddriver:controller:invocations__count_total{service="spin-clouddriver",statusCode="200"}[2m]))
by (instance, method)/ sum(rate(clouddriver:controller:invocations__total{service="spin-clouddriver",statusCode="200"}[2m]))
by (instance, method) > 70000
for: 5m
labels:
severity: warning
#- alert: clouddriver-ro-latency-too-high
# annotations:
# description: Service {{$labels.service}} is slow ({{$value}} per minute)
# summary: latency of clouddriver-ro is too high
# expr: sum(rate(clouddriver_ro:controller:invocations__count_total{service="spin-clouddriver-ro",statusCode="200"}[2m]))
# by (instance, method)/ sum(rate(clouddriver_ro:controller:invocations__total{service="spin-clouddriver-ro",statusCode="200"}[2m]))
# by (instance, method) > 200
# for: 5m
# labels:
# severity: warning
#- alert: clouddriver-rw-latency-too-high
# annotations:
# description: Service {{$labels.service}} is slow ({{$value}} per minute)
# summary: latency of clouddriver-rw is too high
# expr: sum(rate(clouddriver_rw:controller:invocations__count_total{service="spin-clouddriver-rw",statusCode="200"}[2m]))
# by (instance, method)/ sum(rate(clouddriver_rw:controller:invocations__total{service="spin-clouddriver-rw",statusCode="200"}[2m]))
# by (instance, method) > 200
# for: 5m
# labels:
# severity: warning
#- alert: clouddriver-caching-latency-too-high
# annotations:
# description: Service {{$labels.service}} is slow ({{$value}} per minute)
# summary: latency clouddriver-caching is too high
# expr: sum(rate(clouddriver_caching:controller:invocations__count_total{service="spin-clouddriver-caching",statusCode="200"}[2m]))
# by (instance, method)/ sum(rate(clouddriver_caching:controller:invocations__total{service="spin-clouddriver-caching",statusCode="200"}[2m]))
# by (instance, method) > 300
# for: 5m
# labels:
# severity: warning
- alert: gate-latency-too-high
annotations:
description: Service {{$labels.service}} is slow ({{$value}} per minute)
summary: latency of gate is too high
expr: sum(rate(gate:controller:invocations__count_total{service="spin-gate",statusCode="200"}[2m]))
by (instance, method)/ sum(rate(gate:controller:invocations__total{service="spin-gate",statusCode="200"}[2m]))
by (instance, method) > 5000
for: 5m
labels:
severity: warning
- alert: orca-latency-too-high
annotations:
description: Service {{$labels.service}} is slow ({{$value}} per minute)
summary: latency of orca is too high
expr: sum(rate(orca:controller:invocations__count_total{service="spin-orca",statusCode="200"}[2m]))
by (instance, method)/ sum(rate(orca:controller:invocations__total{service="spin-orca",statusCode="200"}[2m]))
by (instance, method) > 2000
for: 5m
labels:
severity: warning
- alert: igor-latency-too-high
annotations:
description: Service {{$labels.service}} is slow ({{$value}} per minute)
summary: latency of igor is too high
expr: sum(rate(igor:controller:invocations__count_total{service="spin-igor",statusCode="200"}[2m]))
by (instance, method)/ sum(rate(igor:controller:invocations__total{service="spin-igor",statusCode="200"}[2m]))
by (instance, method) > 10000
for: 5m
labels:
severity: warning
- alert: echo-latency-too-high
annotations:
description: Service {{$labels.service}} is slow ({{$value}} per minute)
summary: latency of echo is too high
expr: sum(rate(echo:controller:invocations__count_total{service="spin-echo",statusCode="200"}[2m]))
by (instance, method)/ sum(rate(echo:controller:invocations__total{service="spin-echo",statusCode="200"}[2m]))
by (instance, method) > 6000
for: 5m
labels:
severity: warning
#- alert: echo_scheduler-latency-too-high
# annotations:
# description: Service {{$labels.service}} is slow ({{$value}} per minute)
# summary: latency of echo-scheduler is too high
# expr: sum(rate(echo_scheduler:controller:invocations__count_total{service="spin-echo-scheduler",statusCode="200"}[2m]))
# by (instance, method)/ sum(rate(echo_scheduler:controller:invocations__total{service="spin-echo-scheduler",statusCode="200"}[2m]))
# by (instance, method) > 300
# for: 5m
# labels:
# severity: warning
#- alert: echo_worker-latency-too-high
# annotations:
# description: Service {{$labels.service}} is slow ({{$value}} per minute)
# summary: latency of echo-worker is too high
# expr: sum(rate(echo_worker:controller:invocations__count_total{service="spin-echo-worker",statusCode="200"}[2m]))
# by (instance, method)/ sum(rate(echo_worker:controller:invocations__total{service="spin-echo-worker",statusCode="200"}[2m]))
# by (instance, method) > 2000
# for: 5m
# labels:
# severity: warning
- alert: front50-latency-too-high
annotations:
description: "Service {{$labels.service}} is slow ({{$value}} per minute)"
summary: 'latency of front50 is too high'
expr: sum(rate(front50:controller:invocations__count_total{service="spin-front50",statusCode="200"}[2m]))
by (instance, method)/ sum(rate(front50:controller:invocations__total{service="spin-front50",statusCode="200"}[2m]))
by (instance, method) > 1200
for: 5m
labels:
severity: warning
- name: jvm-too-high
rules:
- alert: clouddriver-rw-pod-may-be-evicted-soon
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
may be evicted soon
summary: Clouddriver-rw JVM memory too high
expr: (sum(clouddriver_rw:jvm:memory:used__value) by (instance, area) / sum(clouddriver_rw:jvm:memory:max__value)
by (instance, area)) > .9
labels:
severity: warning
- alert: clouddriver-ro-pod-may-be-evicted-soon
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
may be evicted soon
summary: Clouddriver-ro JVM memory too high
expr: (sum(clouddriver_ro:jvm:memory:used__value) by (instance, area) / sum(clouddriver_ro:jvm:memory:max__value)
by (instance, area)) > .9
labels:
severity: warning
- alert: clouddriver-caching-pod-may-be-evicted-soon
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
may be evicted soon
summary: Clouddriver-caching JVM memory too high
expr: (sum(clouddriver_caching:jvm:memory:used__value) by (instance, area) / sum(clouddriver_caching:jvm:memory:max__value)
by (instance, area)) > .9
labels:
severity: warning
- alert: gate-pod-may-be-evicted-soon
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
may be evicted soon
summary: gate JVM memory too high
expr: (sum(gate:jvm:memory:used__value) by (instance, area) / sum(gate:jvm:memory:max__value)
by (instance, area)) > .9
labels:
severity: warning
- alert: orca-pod-may-be-evicted-soon
annotations:
description: Service {{$labels.service}} may be evicted soon
summary: orca JVM memory too high
expr: (sum(orca:jvm:gc:liveDataSize__value) by (instance, area) / sum(orca:jvm:gc:maxDataSize__value)
by (instance, area)) > .9
labels:
severity: warning
- alert: igor-pod-may-be-evicted-soon
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
may be evicted soon
summary: igor JVM memory too high
expr: (sum(igor:jvm:memory:used__value) by (instance, area) / sum(igor:jvm:memory:max__value)
by (instance, area)) > .9
labels:
severity: warning
- alert: echo-scheduler-pod-may-be-evicted-soon
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
may be evicted soon
summary: echo-scheduler JVM memory too high
expr: (sum(echo_scheduler:jvm:memory:used__value) by (instance, area) / sum(echo_scheduler:jvm:memory:max__value)
by (instance, area)) > .9
labels:
severity: warning
- alert: echo-worker-pod-may-be-evicted-soon
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
may be evicted soon
summary: echo-worker JVM memory too high
expr: (sum(echo_worker:jvm:memory:used__value) by (instance, area) / sum(echo_worker:jvm:memory:max__value)
by (instance, area)) > .9
labels:
severity: warning
- alert: front50-pod-may-be-evicted-soon
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
may be evicted soon
summary: Front50 JVM memory too high
expr: (sum(front50:jvm:memory:used__value) by (instance, area) / sum(front50:jvm:memory:max__value)
by (instance, area)) > .9
labels:
severity: warning
# Clouddriver-Service specific alerts
- name: Clouddriver-execution-time
rules:
- alert: Clouddriver-execution-time-too-high
annotations:
description: "Service {{$labels.service}} execution time too high"
summary: "Clouddriver:executiontime is high"
expr: sum(rate(clouddriver:executionTime__total[2m])) by (instance, agent) / sum(rate(clouddriver:executionTime__count_total[2m])) by (instance, agent) > 100
for: 2m
labels:
severity: warning
# Front50-Service specific alerts
- name: Front50-cache
rules:
- alert: "front50:storageServiceSupport:cacheAge__value"
annotations:
description: value = {{$value}}
summary: "front50 cacheAge too high"
expr: front50:storageServiceSupport:cacheAge__value > 300000
for: 2m
labels:
severity: warning
# fiat-Service specific alerts
- name: Fiat-UserRoles-sync
rules:
- alert: fiat-userRoles-sync-time-too-high
annotations:
description: "Fiat userRoles sync time is high"
summary: "fiat-userRoles-sync-time-too-high"
expr: fiat:fiat:userRoles:syncTime__count_total/fiat:fiat:userRoles:syncTime__total > 8
for: 2m
labels:
severity: warning
# gate-Service specific alerts
- name: Gate-issues
rules:
- alert: "Gate:hystrix:latencyTotal__percentile_50__value"
annotations:
description: "Median gate response too slow"
summary: "50 percentile value is {{ $value }}"
expr: gate:hystrix:latencyTotal__percentile_50__value > 1600
for: 5m
labels:
severity: critical
- alert: "gate:hystrix:latencyTotal__percentile_90__value"
annotations:
description: "gate response slow"
summary: "90 percentile value is {{ $value }}"
expr: gate:hystrix:latencyTotal__percentile_90__value > 2000
for: 5m
labels:
severity: warning
- alert: "gate:hystrix:errorPercentage__value"
annotations:
description: "gate experiencing errors"
summary: "Error percentage is {{ $value }}"
expr: gate:hystrix:errorPercentage__value > 0.01
for: 2m
labels:
severity: warning
# Orca-Service specific alerts
- name: orca-queue-issue
rules:
- alert: orca-queue-depth-high
annotations:
description: Service {{$labels.service}} in namespace {{$labels.namespace}}
may be evicted soon
summary: Orca queue depth is high
expr: (sum(orca:queue:ready:depth) by (instance) ) > 10
labels:
severity: warning
- alert: orca-queue-lag-high
annotations:
description: Lag = {{$value}}
summary: Orca queue lag is high
expr: sum(rate (orca:controller:invocations__totalTime_total[2m])) by (instance) /
sum(rate(orca:controller:invocations__count_total[2m])) by (instance) > 0.5
labels:
severity: warning
- name: igor-needs-attention
rules:
- alert: igor-needs-attention
annotations:
description: Igor in namespace {{$labels.namespace}} needs human help
summary: Igor needs attention
expr: igor:pollingMonitor:itemsOverThreshold > 0
labels:
severity: crtical
alerts: |
{}
prometheus.yml: |
global:
evaluation_interval: 1m
scrape_interval: 1m
scrape_timeout: 10s
rule_files:
- /etc/config/recording_rules.yml
- /etc/config/alerting_rules.yml
- /etc/config/rules
- /etc/config/alerts
scrape_configs:
- honor_labels: true
job_name: opsmx_spinnaker_metrics
kubernetes_sd_configs:
- role: endpoints
metrics_path: /prometheus_metrics
relabel_configs:
- action: keep
regex: spin
source_labels:
- __meta_kubernetes_service_label_app
- action: keep
regex: "8008"
source_labels:
- __meta_kubernetes_pod_container_port_number
- regex: Node;(.*)
replacement: ${1}
separator: ;
source_labels:
- __meta_kubernetes_endpoint_address_target_kind
- __meta_kubernetes_endpoint_address_target_name
target_label: node
- regex: Pod;(.*)
replacement: ${1}
separator: ;
source_labels:
- __meta_kubernetes_endpoint_address_target_kind
- __meta_kubernetes_endpoint_address_target_name
target_label: pod
- source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- source_labels:
- __meta_kubernetes_service_name
target_label: service
- source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- replacement: "8008"
target_label: endpoint
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
- bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
job_name: kubernetes-apiservers
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- action: keep
regex: default;kubernetes;https
source_labels:
- __meta_kubernetes_namespace
- __meta_kubernetes_service_name
- __meta_kubernetes_endpoint_port_name
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
- bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
job_name: kubernetes-nodes
kubernetes_sd_configs:
- role: node
relabel_configs:
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- replacement: kubernetes.default.svc:443
target_label: __address__
- regex: (.+)
replacement: /api/v1/nodes/$1/proxy/metrics
source_labels:
- __meta_kubernetes_node_name
target_label: __metrics_path__
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
- bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
job_name: kubernetes-nodes-cadvisor
kubernetes_sd_configs:
- role: node
relabel_configs:
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- replacement: kubernetes.default.svc:443
target_label: __address__
- regex: (.+)
replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
source_labels:
- __meta_kubernetes_node_name
target_label: __metrics_path__
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
- job_name: kubernetes-service-endpoints
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scrape
- action: replace
regex: (https?)
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scheme
target_label: __scheme__
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_service_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: kubernetes_namespace
- action: replace
source_labels:
- __meta_kubernetes_service_name
target_label: kubernetes_name
- action: replace
source_labels:
- __meta_kubernetes_pod_node_name
target_label: kubernetes_node
- job_name: kubernetes-service-endpoints-slow
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scrape_slow
- action: replace
regex: (https?)
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scheme
target_label: __scheme__
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_service_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: kubernetes_namespace
- action: replace
source_labels:
- __meta_kubernetes_service_name
target_label: kubernetes_name
- action: replace
source_labels:
- __meta_kubernetes_pod_node_name
target_label: kubernetes_node
scrape_interval: 5m
scrape_timeout: 30s
- honor_labels: true
job_name: prometheus-pushgateway
kubernetes_sd_configs:
- role: service
relabel_configs:
- action: keep
regex: pushgateway
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_probe
- job_name: kubernetes-services
kubernetes_sd_configs:
- role: service
metrics_path: /probe
params:
module:
- http_2xx
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_probe
- source_labels:
- __address__
target_label: __param_target
- replacement: blackbox
target_label: __address__
- source_labels:
- __param_target
target_label: instance
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
- source_labels:
- __meta_kubernetes_namespace
target_label: kubernetes_namespace
- source_labels:
- __meta_kubernetes_service_name
target_label: kubernetes_name
- job_name: kubernetes-pods
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_pod_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: kubernetes_namespace
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: kubernetes_pod_name
- action: drop
regex: Pending|Succeeded|Failed
source_labels:
- __meta_kubernetes_pod_phase
- job_name: kubernetes-pods-slow
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape_slow
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_pod_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: kubernetes_namespace
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: kubernetes_pod_name
- action: drop
regex: Pending|Succeeded|Failed
source_labels:
- __meta_kubernetes_pod_phase
scrape_interval: 5m
scrape_timeout: 30s
alerting:
alertmanagers:
- kubernetes_sd_configs:
- role: pod
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
relabel_configs:
- source_labels: [__meta_kubernetes_namespace]
regex: oes
action: keep
- source_labels: [__meta_kubernetes_pod_label_app]
regex: prometheus
action: keep
- source_labels: [__meta_kubernetes_pod_label_component]
regex: alertmanager
action: keep
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_probe]
regex: .*
action: keep
- source_labels: [__meta_kubernetes_pod_container_port_number]
regex:
action: drop
recording_rules.yml: |
{}
rules: |
{}
kind: ConfigMap
metadata:
creationTimestamp: "2020-10-26T10:00:49Z"
labels:
app: prometheus
chart: prometheus-11.16.2
component: server
heritage: Helm
release: prom
name: prom-prometheus-server
namespace: oes
resourceVersion: "26024232"
selfLink: /api/v1/namespaces/oes/configmaps/prom-prometheus-server
uid: d0efd080-9d4b-4445-83b1-5967e8516edd