Skip to content

Instantly share code, notes, and snippets.

@tommeramber
Last active June 11, 2025 07:49
Show Gist options
  • Save tommeramber/be0c31f086b1e9c6d3ecebe9ea197e96 to your computer and use it in GitHub Desktop.
Save tommeramber/be0c31f086b1e9c6d3ecebe9ea197e96 to your computer and use it in GitHub Desktop.
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: pvc-over-used
namespace: openshift-monitoring
spec:
groups:
- name: cron-job-monitoring
rules:
- alert: PVC-OVER-USED
annotations:
summary: ’PVC {{ $labels.persistentvolumeclaim }} has {{ $value }} of Usage’
expr: >-
max(round(100 * (kubelet_volume_stats_used_bytes{namespace=~"openshift-monitoring",persistentvolumeclaim=~".*"}/(kubelet_volume_stats_capacity_bytes{namespace=~"openshift-monitoring",persistentvolumeclaim=~".*"}))) > 10) by(persistentvolumeclaim,namespace)
for: 10s
labels:
severity: custom
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: tommer-poc-test
namespace: openshift-monitoring
spec:
groups:
- name: tommer-poc-test
rules:
- alert: NodeTestProblem
annotations:
summary: event driven poc
expr: |
max(node_disk_info{instance=~"<worker-name>"}) by(instance)
for: 10s
labels:
severity: custom
- alert: TestNodeProblem
annotations:
summary: event driven poc
expr: |
max(node_disk_info{instance=~"<worker-name>"}) by(instance)
for: 10s
labels:
severity: custom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment