Add new metrics for performance tests
[dcaegen2/collectors/hv-ves.git] / tools / performance / cloud / prometheus / prometheus-config-map.yaml
1 # ============LICENSE_START=======================================================
2 # dcaegen2-collectors-veshv
3 # ================================================================================
4 # Copyright (C) 2019 NOKIA
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=========================================================
18
19 apiVersion: v1
20 kind: ConfigMap
21 metadata:
22   name: prometheus-server-conf
23   labels:
24     name: prometheus-server-conf
25   namespace: onap
26 data:
27   prometheus.yml: |-
28     global:
29       scrape_interval: 5s
30       external_labels:
31         monitor: 'my-monitor'
32
33     scrape_configs:
34       - job_name: 'prometheus'
35         static_configs:
36           - targets: ['localhost:9090']
37
38       - job_name: 'kafka-processing-consumer'
39         metrics_path: '/monitoring/prometheus'
40         static_configs:
41           - targets: ['kafka-processing-consumer.onap:6063']
42
43       - job_name: 'kafka-offset-consumer'
44         metrics_path: '/monitoring/prometheus'
45         static_configs:
46           - targets: ['kafka-counting-consumer.onap:6062']
47
48       - job_name: 'ves-hv-collector'
49         metrics_path: '/monitoring/prometheus'
50         static_configs:
51           - targets: ['dcae-hv-ves-collector.onap:6060']
52
53       - job_name: 'kubernetes-cadvisor'
54
55         scheme: https
56
57         tls_config:
58           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
59         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
60
61         kubernetes_sd_configs:
62         - role: node
63
64         relabel_configs:
65         - action: labelmap
66           regex: __meta_kubernetes_node_label_(.+)
67         - target_label: __address__
68           replacement: kubernetes.default.svc:443
69         - source_labels: [__meta_kubernetes_node_name]
70           regex: (.+)
71           target_label: __metrics_path__
72           replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor
73