[home-assistant] Added metricRelabelings for service monitor (#101)

* Added metricRelabelings for service monitor

* Fixes

* Added end

* Changed chart version to 2.6.0

Co-authored-by: Jeff Billimek <jeff@billimek.com>
This commit is contained in:
Patrik Boström 2020-10-28 13:40:20 +01:00 committed by GitHub
parent cce27da342
commit bc17f3cc7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 2 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.116.1 appVersion: 0.116.1
description: Home Assistant description: Home Assistant
name: home-assistant name: home-assistant
version: 2.5.2 version: 2.6.0
keywords: keywords:
- home-assistant - home-assistant
- hass - hass

View File

@ -191,6 +191,7 @@ The following tables lists the configurable parameters of the Home Assistant cha
| `monitoring.serviceMonitor.labels` | Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator | `{}` | | `monitoring.serviceMonitor.labels` | Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator | `{}` |
| `monitoring.serviceMonitor.bearerTokenFile` | Set bearerTokenFile for home-assistant auth (use long lived access tokens) | `nil` | | `monitoring.serviceMonitor.bearerTokenFile` | Set bearerTokenFile for home-assistant auth (use long lived access tokens) | `nil` |
| `monitoring.serviceMonitor.bearerTokenSecret` | Set bearerTokenSecret for home-assistant auth (use long lived access tokens) | `nil` | | `monitoring.serviceMonitor.bearerTokenSecret` | Set bearerTokenSecret for home-assistant auth (use long lived access tokens) | `nil` |
| `monitoring.serviceMonitor.metricRelabelings` | Add metricRelabelings [Documentation](https://coreos.com/operators/prometheus/docs/latest/api.html#relabelconfig) | `{}` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

View File

@ -27,6 +27,10 @@ spec:
{{- if .Values.monitoring.serviceMonitor.bearerTokenSecret.optional }} {{- if .Values.monitoring.serviceMonitor.bearerTokenSecret.optional }}
optional: {{ .Values.monitoring.serviceMonitor.bearerTokenSecret.optional }} optional: {{ .Values.monitoring.serviceMonitor.bearerTokenSecret.optional }}
{{- end }} {{- end }}
{{- end }}
{{- if .Values.monitoring.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ toYaml .Values.monitoring.serviceMonitor.metricRelabelings | indent 4 }}
{{- end }} {{- end }}
jobLabel: {{ template "home-assistant.fullname" . }}-prometheus-exporter jobLabel: {{ template "home-assistant.fullname" . }}-prometheus-exporter
namespaceSelector: namespaceSelector:

View File

@ -224,7 +224,18 @@ monitoring:
# bearerTokenFile: # bearerTokenFile:
# Set bearerTokenSecret for home assistant auth (use long lived access tokens) # Set bearerTokenSecret for home assistant auth (use long lived access tokens)
# bearerTokenSecret: # bearerTokenSecret:
# Relabel metrics if needed example removes pod and instance labels from metrics beginning with hass
# metricRelabelings: []
# - regex: hass.*
# replacement: ""
# sourceLabels:
# - __name__
# targetLabel: pod
# - regex: hass_.*
# replacement: ""
# sourceLabels:
# - __name__
# targetLabel: instance
vscode: vscode:
enabled: false enabled: false