Skip to content

Commit

Permalink
Merge pull request #27 from Starttoaster/prometheus-rules
Browse files Browse the repository at this point in the history
Add proxmox storage alert rules
  • Loading branch information
Starttoaster authored Mar 13, 2024
2 parents 397ca4e + 44137eb commit 692ce79
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
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.1.5
version: 0.1.6

# 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
46 changes: 42 additions & 4 deletions chart/proxmox-exporter/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,58 @@ spec:

- alert: ProxmoxCertificateExpiring
annotations:
summary: Proxmox certificate on node {{ printf "{{ $labels.node }}" }} is expiring in 7 days
description: The certificate with subject {{ printf "{{ $labels.subject }}" }} on that node is expiring soon!
summary: Proxmox certificate on node {{ printf "{{ $labels.node }}" }} is expiring in a week
description: The certificate with subject {{ printf "{{ $labels.subject }}" }} on that node is expiring in {{ printf "{{ $value }}" }} days
expr: |
proxmox_node_days_until_cert_expiration < 7
for: 5m
labels:
severity: critical
- alert: ProxmoxCertificateExpiringWarning
annotations:
summary: Proxmox certificate on node {{ printf "{{ $labels.node }}" }} is expiring in 14 days
description: The certificate with subject {{ printf "{{ $labels.subject }}" }} on that node is expiring soon
summary: Proxmox certificate on node {{ printf "{{ $labels.node }}" }} is expiring soon
description: The certificate with subject {{ printf "{{ $labels.subject }}" }} on that node is expiring in {{ printf "{{ $value }}" }} days
expr: |
proxmox_node_days_until_cert_expiration < 14
for: 5m
labels:
severity: warning

- alert: ProxmoxUnsharedStorageNearlyFull
annotations:
summary: Proxmox storage volume {{ printf "{{ $labels.node }}" }}/{{ printf "{{ $labels.storage }}" }} nearly full
description: Volume of type {{ printf "{{ $labels.type }}" }} is {{ printf "{{ $value }}" }}% full
expr: |
100 * (sum by (storage,node) (proxmox_node_storage_used_bytes{shared="false"}) / sum by (storage,node) (proxmox_node_storage_total_bytes)) > 90
for: 5m
labels:
severity: critical
- alert: ProxmoxUnsharedStorageFilling
annotations:
summary: Proxmox storage volume {{ printf "{{ $labels.node }}" }}/{{ printf "{{ $labels.storage }}" }} nearly full
description: Volume of type {{ printf "{{ $labels.type }}" }} is {{ printf "{{ $value }}" }}% full
expr: |
100 * (sum by (storage,node) (proxmox_node_storage_used_bytes{shared="false"}) / sum by (storage,node) (proxmox_node_storage_total_bytes)) > 80
for: 5m
labels:
severity: warning

- alert: ProxmoxSharedStorageNearlyFull
annotations:
summary: Proxmox shared storage volume {{ printf "{{ $labels.storage }}" }} nearly full
description: Volume of type {{ printf "{{ $labels.type }}" }} is {{ printf "{{ $value }}" }}% full
expr: |
100 * (sum by (storage) (proxmox_node_storage_used_bytes{shared="true"}) / sum by (storage) (proxmox_node_storage_total_bytes)) > 90
for: 5m
labels:
severity: critical
- alert: ProxmoxSharedStorageFilling
annotations:
summary: Proxmox shared storage volume {{ printf "{{ $labels.storage }}" }} nearly full
description: Volume of type {{ printf "{{ $labels.type }}" }} is {{ printf "{{ $value }}" }}% full
expr: |
100 * (sum by (storage) (proxmox_node_storage_used_bytes{shared="true"}) / sum by (storage) (proxmox_node_storage_total_bytes)) > 80
for: 5m
labels:
severity: warning
{{- end }}

0 comments on commit 692ce79

Please sign in to comment.