Skip to content

Commit

Permalink
Merge pull request #62 from Starttoaster/helm-bump
Browse files Browse the repository at this point in the history
Add custom prometheus rules to helm chart
  • Loading branch information
Starttoaster authored Dec 10, 2024
2 parents fc96af2 + f677bef commit 9ff88cf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chart/proxmox-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.3
version: 0.2.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
5 changes: 5 additions & 0 deletions chart/proxmox-exporter/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ spec:
groups:
- name: ProxmoxNodes
rules:
{{- with .Values.prometheusRule.additionalRules }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.prometheusRule.enableBuiltinRules }}
- alert: ProxmoxNodeDown
annotations:
summary: Proxmox node {{ printf "{{ $labels.node }}" }} is down
Expand Down Expand Up @@ -141,4 +145,5 @@ spec:
for: 5m
labels:
severity: critical
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions chart/proxmox-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@ serviceMonitor:
prometheusRule:
enabled: false

# Disable this to use your own rules provided in additionalRules
enableBuiltinRules: true

# A list of additional rules to provide to the PrometheusRule CR
# additionalRules:
# - alert: ProxmoxRuleName
# annotations:
# summary: Proxmox node {{ printf "{{ $labels.node }}" }} is down
# description: Check the alerting Proxmox host
# expr: |
# proxmox_metric_name != 0
# for: 1m
# labels:
# severity: critical

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit 9ff88cf

Please sign in to comment.