prometheus: pre filtering setup
Some checks failed
/ Ansible Lint (push) Failing after 1m57s

This commit is contained in:
chris 2025-06-01 01:33:10 +02:00
commit 0e61131c1b
Signed by: c6ristian
SSH key fingerprint: SHA256:B3m+yzpaxGXSEcDBpPHfvza/DNC0wuX+CKMeGq8wgak
3 changed files with 22 additions and 6 deletions

View file

@ -3,13 +3,15 @@
# - https://github.com/prometheus/alertmanager/blob/48a99764a1fc9279fc828de83e7a03ae2219abc7/doc/examples/simple.yml # - https://github.com/prometheus/alertmanager/blob/48a99764a1fc9279fc828de83e7a03ae2219abc7/doc/examples/simple.yml
route: route:
group_by: ["alertname", "site", "type", "hypervisor"] receiver: 'ccchh-infrastructure-alerts'
group_by: [ "alertname", "site", "type", "hypervisor" ]
group_wait: 30s group_wait: 30s
group_interval: 5m group_interval: 5m
repeat_interval: 3h repeat_interval: 3h
routes:
receiver: ccchh-infrastructure-alerts - matchers:
- org="ccchh"
receiver: 'ccchh-infrastructure-alerts'
{# Disable these for now, but might be interesting in the future. {# Disable these for now, but might be interesting in the future.

View file

@ -22,7 +22,7 @@ Links & Resources
{{ define "alert-message.telegram.ccchh" }} {{ define "alert-message.telegram.ccchh" }}
{{- if .Alerts.Firing }} {{- if .Alerts.Firing }}
<u>🔥{{ len .Alerts.Firing }} Alert(/s) Firing 🔥</u> <u>🔥{{ len .Alerts.Firing }} Alert(/s) Firing 🔥</u>
{{- if le (len .Alerts.Firing) 6 }} {{- if le (len .Alerts.Firing) 5 }}
{{- range .Alerts.Firing }} {{- range .Alerts.Firing }}
{{ template "alert-item.telegram.ccchh.internal" . }} {{ template "alert-item.telegram.ccchh.internal" . }}
{{- end }} {{- end }}
@ -33,7 +33,7 @@ Links & Resources
{{- if .Alerts.Resolved }} {{- if .Alerts.Resolved }}
<u>✅{{ len .Alerts.Resolved }} Alert(/s) Resolved ✅</u> <u>✅{{ len .Alerts.Resolved }} Alert(/s) Resolved ✅</u>
{{- if le (len .Alerts.Resolved) 6 }} {{- if le (len .Alerts.Resolved) 5 }}
{{- range .Alerts.Resolved }} {{- range .Alerts.Resolved }}
{{ template "alert-item.telegram.ccchh.internal" . }} {{ template "alert-item.telegram.ccchh.internal" . }}
{{- end }} {{- end }}

View file

@ -22,6 +22,8 @@ scrape_configs:
static_configs: static_configs:
- targets: - targets:
- localhost:9090 - localhost:9090
labels:
org: ccchh
- job_name: alertmanager - job_name: alertmanager
honor_timestamps: true honor_timestamps: true
metrics_path: /metrics metrics_path: /metrics
@ -29,6 +31,8 @@ scrape_configs:
static_configs: static_configs:
- targets: - targets:
- alertmanager:9093 - alertmanager:9093
labels:
org: ccchh
- job_name: mumble - job_name: mumble
honor_timestamps: true honor_timestamps: true
scrape_interval: 5s scrape_interval: 5s
@ -38,6 +42,8 @@ scrape_configs:
static_configs: static_configs:
- targets: - targets:
- mumble.hamburg.ccc.de:443 - mumble.hamburg.ccc.de:443
labels:
org: ccchh
- job_name: opnsense-ccchh - job_name: opnsense-ccchh
honor_timestamps: true honor_timestamps: true
metrics_path: /metrics metrics_path: /metrics
@ -45,6 +51,8 @@ scrape_configs:
static_configs: static_configs:
- targets: - targets:
- 185.161.129.132:9100 - 185.161.129.132:9100
labels:
org: ccchh
- job_name: jitsi - job_name: jitsi
honor_timestamps: true honor_timestamps: true
scrape_interval: 5s scrape_interval: 5s
@ -54,10 +62,14 @@ scrape_configs:
static_configs: static_configs:
- targets: - targets:
- jitsi.hamburg.ccc.de:9888 # Jitsi Video Bridge - jitsi.hamburg.ccc.de:9888 # Jitsi Video Bridge
labels:
org: ccchh
- job_name: 'pve' - job_name: 'pve'
static_configs: static_configs:
- targets: - targets:
- 212.12.48.126 # chaosknoten - 212.12.48.126 # chaosknoten
labels:
org: ccchh
metrics_path: /pve metrics_path: /pve
params: params:
module: [ default ] module: [ default ]
@ -74,6 +86,7 @@ scrape_configs:
static_configs: static_configs:
# Wieske Chaosknoten VMs # Wieske Chaosknoten VMs
- labels: - labels:
org: ccchh
site: wieske site: wieske
type: virtual_machine type: virtual_machine
hypervisor: chaosknoten hypervisor: chaosknoten
@ -98,6 +111,7 @@ scrape_configs:
- zammad-intern.hamburg.ccc.de:9100 - zammad-intern.hamburg.ccc.de:9100
- pretalx-intern.hamburg.ccc.de:9100 - pretalx-intern.hamburg.ccc.de:9100
- labels: - labels:
org: ccchh
site: wieske site: wieske
type: physical_machine type: physical_machine
targets: targets: