AMQ adapter version w/o endpints for CleverSwarm integration

This commit is contained in:
Stanislav Hejny
2025-01-23 10:27:21 +00:00
committed by Rui Hu
parent d2b1b59c66
commit 286a4986b3
39 changed files with 1104 additions and 271 deletions
+21
View File
@@ -0,0 +1,21 @@
groups:
- name: demo_application
rules:
- alert: application_http_duration_alert
expr: rate(application_demo_http_req_duration_second_seconds_bucket{le="+Inf"}[5s]) >= 100
for: 5s
labels:
severity: critical
annotations:
summary: "Application process http req take too long"
description: "Endpoint {{ $labels.path }} is taking too long"
- name: rabbitmq
rules:
- alert: rabbitmq_queue_message_ready_count_alert
expr: rabbitmq_queue_messages_ready >= 50
for: 3s
labels:
severity: critical
annotations:
summary: "RabbitMQ queue backpressure too high"
description: "Queue {{ $labels.queue }} is taking too long"
+32
View File
@@ -0,0 +1,32 @@
scrape_configs:
- job_name: RabbitMQ
scrape_interval: 2s
metrics_path: /metrics/per-object
docker_sd_configs:
- host: unix:///var/run/docker.sock
relabel_configs:
# Only keep containers that have a `prometheus-job=rabbitmq` label.
# also requires the port = 15962, that's the report port of RabbitMQ
- source_labels: [__meta_docker_container_label_prometheus_job, __meta_docker_port_private]
regex: rabbitmq;15692
action: keep
- job_name: SpringActuator
metrics_path: /actuator/prometheus
scrape_interval: 2s
docker_sd_configs:
- host: unix:///var/run/docker.sock
relabel_configs:
- source_labels: [__meta_docker_container_label_prometheus_job, __meta_docker_port_private]
regex: spring-actuator;8080
action: keep
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- "alertmanager:9093"
rule_files:
- "alert-rules.yml"