[prometheus] add sample probe and rule
This commit is contained in:
parent
dbb163789a
commit
da73f95841
2 changed files with 36 additions and 0 deletions
16
prometheus-monitoring/probe.yaml
Normal file
16
prometheus-monitoring/probe.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
kind: Probe
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
metadata:
|
||||
name: ungleich-ch
|
||||
namespace: monitoring
|
||||
spec:
|
||||
interval: 60s
|
||||
module: http_2xx
|
||||
prober:
|
||||
url: blackbox-exporter:19115
|
||||
targets:
|
||||
staticConfig:
|
||||
static:
|
||||
- https://ungleich.ch
|
||||
- https://monitoring.place7.ungleich.ch
|
||||
- https://google.com
|
20
prometheus-monitoring/prometheus-rule.yaml
Normal file
20
prometheus-monitoring/prometheus-rule.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
prometheus: k8s
|
||||
role: alert-rules
|
||||
name: prometheus-example-rules
|
||||
spec:
|
||||
groups:
|
||||
- name: ./example.rules
|
||||
rules:
|
||||
- alert: RAMUsage
|
||||
expr: (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) < 0.25
|
||||
for: 5m
|
||||
labels:
|
||||
severity: info
|
||||
annotations:
|
||||
summary: "Server {{ $labels.instance }} has a less than 25% RAM available"
|
||||
description: "Server {{ $labels.instance }} has only {{ $value }}% of its total amount of RAM available!"
|
Loading…
Reference in a new issue