diff --git a/charts/hg612-exporter/Chart.yaml b/charts/hg612-exporter/Chart.yaml index bdec81a..6da8534 100644 --- a/charts/hg612-exporter/Chart.yaml +++ b/charts/hg612-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 0.1.2 description: A prometheus exporter for the HG612 modem name: hg612-exporter -version: 1.2.2 +version: 1.2.3 kubeVersion: ">=1.16.0-0" keywords: - hg612-exporter @@ -15,4 +15,4 @@ maintainers: dependencies: - name: common repository: https://nikdoof.github.io/helm-charts/ - version: 4.5.2 + version: 4.5.3 diff --git a/charts/hg612-exporter/templates/prometheusrules.yaml b/charts/hg612-exporter/templates/prometheusrules.yaml deleted file mode 100644 index 35ba47a..0000000 --- a/charts/hg612-exporter/templates/prometheusrules.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }} -{{- include "common.values.setup" . -}} -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - name: {{ include "common.names.fullname" . }} - labels: - {{- include "common.labels" . | nindent 4 }} - {{- with .Values.metrics.prometheusRule.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - groups: - - name: {{ include "common.names.fullname" . }} - rules: - - alert: HG612ExporterAbsent - annotations: - description: HG612 Exporter has disappeared from Prometheus service discovery. - summary: HG612 Exporter is down. - expr: | - absent(up{job=~".*{{ include "common.names.fullname" . }}.*"} == 1) - for: 5m - labels: - severity: critical - {{- with .Values.metrics.prometheusRule.rules }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/hg612-exporter/templates/servicemonitor.yaml b/charts/hg612-exporter/templates/servicemonitor.yaml deleted file mode 100644 index b4b1c81..0000000 --- a/charts/hg612-exporter/templates/servicemonitor.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.metrics.enabled }} -{{- include "common.values.setup" . -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "common.names.fullname" . }} - labels: - {{- include "common.labels" . | nindent 4 }} - {{- with .Values.metrics.serviceMonitor.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - selector: - matchLabels: - {{- include "common.labels.selectorLabels" . | nindent 6 }} - endpoints: - - port: metrics - {{- with .Values.metrics.serviceMonitor.interval }} - interval: {{ . }} - {{- end }} - {{- with .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ . }} - {{- end }} - path: /metrics -{{- end }} diff --git a/charts/hg612-exporter/values.yaml b/charts/hg612-exporter/values.yaml index 93831f3..69da234 100644 --- a/charts/hg612-exporter/values.yaml +++ b/charts/hg612-exporter/values.yaml @@ -60,16 +60,16 @@ metrics: labels: {} # -- Configure additionial rules for the chart under this key. # @default -- See prometheusrules.yaml - rules: [] - # - alert: HG612ExporterAbsent - # annotations: - # description: HG612 Exporter has disappeared from Prometheus service discovery. - # summary: HG612 Exporter is down. - # expr: | - # absent(up{job=~".*hg612exporter.*"} == 1) - # for: 5m - # labels: - # severity: critical + rules: + - alert: HG612ExporterAbsent + annotations: + description: HG612 Exporter has disappeared from Prometheus service discovery. + summary: HG612 Exporter is down. + expr: | + absent(up{job=~".*{{ include "common.names.fullname" . }}.*"} == 1) + for: 5m + labels: + severity: critical # -- Enable and configure Grafana dashboard ConfigMaps for the chart under this key. # @default -- See values.yaml dashboards: