blob: 5c289bce73c51a37b891bdeae9d709468b5a4257 [file] [log] [blame]
Matteo Scandolod28ec7b2018-08-21 12:58:04 -07001---
2# Copyright 2018-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16nem_voltha_kpi_exporter_image: "opencord/kafka-topic-exporter:latest"
17nem_voltha_kpi_exporter_nodePort: 31080
18imagePullPolicy: "Always"
19args:
Matteo Scandolo0906d3f2018-09-17 17:12:01 -070020 voltha_kpi_broker: cord-kafka:9092
Matteo Scandolod28ec7b2018-08-21 12:58:04 -070021 voltha_kpi_topic: voltha.kpis
22
23prometheus:
24 alertmanager:
25 persistentVolume:
26 enabled: false
27 server:
28 persistentVolume:
29 enabled: false
30 service:
31 type: NodePort
32 nodePort: 31301
33 serverFiles:
34 alerts: {}
35 rules: {}
36
37 prometheus.yml:
38 rule_files:
39 - /etc/config/rules
40 - /etc/config/alerts
41
42 scrape_configs:
43 # voltha KPI
44 - job_name: 'voltha-kpi'
45 metrics_path: /metrics
46 scrape_interval: 15s
47 static_configs:
48 - targets:
49 - voltha-kpi-exporter:8080
50
Matteo Scandoloe7610092018-10-03 15:53:07 -070051 # XOS-Core
52 - job_name: 'xos-core'
53 metrics_path: /metrics
54 scrape_interval: 15s
55 static_configs:
56 - targets:
57 - xos-core-prometheus:8000
58
Matteo Scandolod28ec7b2018-08-21 12:58:04 -070059 # KB8s monitoring jobs
60 - job_name: prometheus
61 static_configs:
62 - targets:
63 - localhost:9090
64 - job_name: 'kubernetes-apiservers'
65 kubernetes_sd_configs:
66 - role: endpoints
67 scheme: https
68 tls_config:
69 ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
70 insecure_skip_verify: true
71 bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
72 relabel_configs:
73 - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
74 action: keep
75 regex: default;kubernetes;https
76 - job_name: 'kubernetes-nodes'
77 # Default to scraping over https. If required, just disable this or change to
78 # `http`.
79 scheme: https
80 tls_config:
81 ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
82 insecure_skip_verify: true
83 bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
84 kubernetes_sd_configs:
85 - role: node
86 relabel_configs:
87 - action: labelmap
88 regex: __meta_kubernetes_node_label_(.+)
89 - target_label: __address__
90 replacement: kubernetes.default.svc:443
91 - source_labels: [__meta_kubernetes_node_name]
92 regex: (.+)
93 target_label: __metrics_path__
94 replacement: /api/v1/nodes/${1}/proxy/metrics
95 - job_name: 'kubernetes-nodes-cadvisor'
96 scheme: https
97 tls_config:
98 ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
99 insecure_skip_verify: true
100 bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
101 kubernetes_sd_configs:
102 - role: node
103 relabel_configs:
104 - action: labelmap
105 regex: __meta_kubernetes_node_label_(.+)
106 - target_label: __address__
107 replacement: kubernetes.default.svc:443
108 - source_labels: [__meta_kubernetes_node_name]
109 regex: (.+)
110 target_label: __metrics_path__
111 replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor
112 - job_name: 'kubernetes-service-endpoints'
113 kubernetes_sd_configs:
114 - role: endpoints
115 relabel_configs:
116 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
117 action: keep
118 regex: true
119 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
120 action: replace
121 target_label: __scheme__
122 regex: (https?)
123 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
124 action: replace
125 target_label: __metrics_path__
126 regex: (.+)
127 - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
128 action: replace
129 target_label: __address__
130 regex: ([^:]+)(?::\d+)?;(\d+)
131 replacement: $1:$2
132 - action: labelmap
133 regex: __meta_kubernetes_service_label_(.+)
134 - source_labels: [__meta_kubernetes_namespace]
135 action: replace
136 target_label: kubernetes_namespace
137 - source_labels: [__meta_kubernetes_service_name]
138 action: replace
139 target_label: kubernetes_name
140 - job_name: 'prometheus-pushgateway'
141 honor_labels: true
142 kubernetes_sd_configs:
143 - role: service
144 relabel_configs:
145 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
146 action: keep
147 regex: pushgateway
148 - job_name: 'kubernetes-services'
149 metrics_path: /probe
150 params:
151 module: [http_2xx]
152 kubernetes_sd_configs:
153 - role: service
154 relabel_configs:
155 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
156 action: keep
157 regex: true
158 - source_labels: [__address__]
159 target_label: __param_target
160 - target_label: __address__
161 replacement: blackbox
162 - source_labels: [__param_target]
163 target_label: instance
164 - action: labelmap
165 regex: __meta_kubernetes_service_label_(.+)
166 - source_labels: [__meta_kubernetes_namespace]
167 target_label: kubernetes_namespace
168 - source_labels: [__meta_kubernetes_service_name]
169 target_label: kubernetes_name
170 - job_name: 'kubernetes-pods'
171 kubernetes_sd_configs:
172 - role: pod
173 relabel_configs:
174 - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
175 action: keep
176 regex: true
177 - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
178 action: replace
179 target_label: __metrics_path__
180 regex: (.+)
181 - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
182 action: replace
183 regex: ([^:]+)(?::\d+)?;(\d+)
184 replacement: $1:$2
185 target_label: __address__
186 - action: labelmap
187 regex: __meta_kubernetes_pod_label_(.+)
188 - source_labels: [__meta_kubernetes_namespace]
189 action: replace
190 target_label: kubernetes_namespace
191 - source_labels: [__meta_kubernetes_pod_name]
192 action: replace
193 target_label: kubernetes_pod_name
194
195grafana:
196 adminUser: admin
197 adminPassword: strongpassword
198 service:
199 type: NodePort
200 nodePort: 31300
201 sidecar:
202 dashboards:
203 enabled: true
204 label: grafana_dashboard
205 datasources:
206 datasources.yaml:
207 apiVersion: 1
208 datasources:
209 - name: Prometheus
210 type: prometheus
211 url: http://nem-monitoring-prometheus-server.default.svc.cluster.local
212 access: proxy
213 isDefault: true