blob: 7efe71d07b24615a9cae36b982ab951f866d93a6 [file] [log] [blame]
Matteo Scandoloa3916732018-07-25 13:28:35 -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: "matteoscandolo/prometheus-go-exporter:latest"
17nem_voltha_kpi_exporter_nodePort: 31080
18imagePullPolicy: "Always"
19args:
Matteo Scandolo2eadad72018-07-25 13:40:56 -070020 voltha_kpi_broker: seba-substrate-voltha-kafka:9092
Matteo Scandoloa3916732018-07-25 13:28:35 -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
51 # KB8s monitoring jobs
52 - job_name: prometheus
53 static_configs:
54 - targets:
55 - localhost:9090
56 - job_name: 'kubernetes-apiservers'
57 kubernetes_sd_configs:
58 - role: endpoints
59 scheme: https
60 tls_config:
61 ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
62 insecure_skip_verify: true
63 bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
64 relabel_configs:
65 - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
66 action: keep
67 regex: default;kubernetes;https
68 - job_name: 'kubernetes-nodes'
69 # Default to scraping over https. If required, just disable this or change to
70 # `http`.
71 scheme: https
72 tls_config:
73 ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
74 insecure_skip_verify: true
75 bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
76 kubernetes_sd_configs:
77 - role: node
78 relabel_configs:
79 - action: labelmap
80 regex: __meta_kubernetes_node_label_(.+)
81 - target_label: __address__
82 replacement: kubernetes.default.svc:443
83 - source_labels: [__meta_kubernetes_node_name]
84 regex: (.+)
85 target_label: __metrics_path__
86 replacement: /api/v1/nodes/${1}/proxy/metrics
87 - job_name: 'kubernetes-nodes-cadvisor'
88 scheme: https
89 tls_config:
90 ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
91 insecure_skip_verify: true
92 bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
93 kubernetes_sd_configs:
94 - role: node
95 relabel_configs:
96 - action: labelmap
97 regex: __meta_kubernetes_node_label_(.+)
98 - target_label: __address__
99 replacement: kubernetes.default.svc:443
100 - source_labels: [__meta_kubernetes_node_name]
101 regex: (.+)
102 target_label: __metrics_path__
103 replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor
104 - job_name: 'kubernetes-service-endpoints'
105 kubernetes_sd_configs:
106 - role: endpoints
107 relabel_configs:
108 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
109 action: keep
110 regex: true
111 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
112 action: replace
113 target_label: __scheme__
114 regex: (https?)
115 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
116 action: replace
117 target_label: __metrics_path__
118 regex: (.+)
119 - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
120 action: replace
121 target_label: __address__
122 regex: ([^:]+)(?::\d+)?;(\d+)
123 replacement: $1:$2
124 - action: labelmap
125 regex: __meta_kubernetes_service_label_(.+)
126 - source_labels: [__meta_kubernetes_namespace]
127 action: replace
128 target_label: kubernetes_namespace
129 - source_labels: [__meta_kubernetes_service_name]
130 action: replace
131 target_label: kubernetes_name
132 - job_name: 'prometheus-pushgateway'
133 honor_labels: true
134 kubernetes_sd_configs:
135 - role: service
136 relabel_configs:
137 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
138 action: keep
139 regex: pushgateway
140 - job_name: 'kubernetes-services'
141 metrics_path: /probe
142 params:
143 module: [http_2xx]
144 kubernetes_sd_configs:
145 - role: service
146 relabel_configs:
147 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
148 action: keep
149 regex: true
150 - source_labels: [__address__]
151 target_label: __param_target
152 - target_label: __address__
153 replacement: blackbox
154 - source_labels: [__param_target]
155 target_label: instance
156 - action: labelmap
157 regex: __meta_kubernetes_service_label_(.+)
158 - source_labels: [__meta_kubernetes_namespace]
159 target_label: kubernetes_namespace
160 - source_labels: [__meta_kubernetes_service_name]
161 target_label: kubernetes_name
162 - job_name: 'kubernetes-pods'
163 kubernetes_sd_configs:
164 - role: pod
165 relabel_configs:
166 - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
167 action: keep
168 regex: true
169 - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
170 action: replace
171 target_label: __metrics_path__
172 regex: (.+)
173 - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
174 action: replace
175 regex: ([^:]+)(?::\d+)?;(\d+)
176 replacement: $1:$2
177 target_label: __address__
178 - action: labelmap
179 regex: __meta_kubernetes_pod_label_(.+)
180 - source_labels: [__meta_kubernetes_namespace]
181 action: replace
182 target_label: kubernetes_namespace
183 - source_labels: [__meta_kubernetes_pod_name]
184 action: replace
185 target_label: kubernetes_pod_name
186
187grafana:
188 adminUser: admin
189 adminPassword: strongpassword
190 service:
191 type: NodePort
192 nodePort: 31300
193 sidecar:
194 dashboards:
195 enabled: true
196 label: grafana_dashboard
197 datasources:
198 datasources.yaml:
199 apiVersion: 1
200 datasources:
201 - name: Prometheus
202 type: prometheus
203 url: http://nem-monitoring-prometheus-server.default.svc.cluster.local
204 access: proxy
205 isDefault: true