Integrate collectd, prometheus and grafana.
[multicloud/k8s.git] / kud / tests / vnfs / comp-app / collection / app2 / helm / prometheus-operator / charts / prometheus-node-exporter / templates / monitor.yaml
1 {{- if .Values.prometheus.monitor.enabled }}
2 apiVersion: monitoring.coreos.com/v1
3 kind: ServiceMonitor
4 metadata:
5   name: {{ template "prometheus-node-exporter.fullname" . }}
6   namespace: {{ template "prometheus-node-exporter.namespace" . }}
7   labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
8   {{- if .Values.prometheus.monitor.additionalLabels }}
9 {{ toYaml .Values.prometheus.monitor.additionalLabels | indent 4 }}
10   {{- end }}
11 spec:
12   selector:
13     matchLabels:
14       app: {{ template "prometheus-node-exporter.name" . }}
15       release: {{ .Release.Name }}
16   endpoints:
17     - port: metrics
18       {{- if .Values.prometheus.monitor.scrapeTimeout }}
19       scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }}
20       {{- end }}
21 {{- end }}