-
Notifications
You must be signed in to change notification settings - Fork 459
/
01-install.yaml
64 lines (64 loc) · 1.4 KB
/
01-install.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
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: prometheus-cr
spec:
endpoints:
- port: monitoring
selector:
matchLabels:
app.kubernetes.io/managed-by: opentelemetry-operator
---
apiVersion: batch/v1
kind: Job
metadata:
name: check-metrics
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: check-metrics
image: curlimages/curl
args:
- /bin/sh
- -c
- |
for i in $(seq 30); do
if curl -m 1 -s http://prometheus-cr-collector:9090/metrics | grep "otelcol"; then exit 0; fi
sleep 5
done
exit 1
---
apiVersion: batch/v1
kind: Job
metadata:
name: check-ta-jobs
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: check-metrics
image: curlimages/curl
args:
- /bin/sh
- -c
- curl -s http://prometheus-cr-targetallocator/scrape_configs | grep "prometheus-cr"
---
apiVersion: batch/v1
kind: Job
metadata:
name: check-ta-scrape-configs
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: check-metrics
image: curlimages/curl
args:
- /bin/sh
- -c
- curl -s http://prometheus-cr-targetallocator/jobs | grep "prometheus-cr"