Hi all, I have configured Alertmanager to send alerts to Amazon SNS,
everything is working correctly but I see a lot of information in the alert
that arrives. I have read the documentation but I have not understood how
to resolve it.
The alert sends the following information.

Alerts Firing:
Labels:
 - alertname = HpaMaxedOut
 - app_kubernetes_io_component = metrics
 - app_kubernetes_io_instance = kube-state-metrics
 - app_kubernetes_io_managed_by = Helm
 - app_kubernetes_io_name = kube-state-metrics
 - app_kubernetes_io_part_of = kube-state-metrics
 - app_kubernetes_io_version = 2.7.0
 - cluster = test-dev
 - helm_sh_chart = kube-state-metrics-4.29.0
 - horizontalpodautoscaler = apache-hpa
 - instance = 10.x.x.x:8080
 - job = kubernetes-service-endpoints
 - namespace = test-apache
 - node = ip-10-x-x-x.ec2.internal
 - service = kube-state-metrics
 - severity = critical
Annotations:
 - description = The maximum number of desired Pods has been hit
  VALUE = 2
  CLUSTER = test-dev
 HPA = apache-hpa
 - summary = Kubernetes HPA scale capability (instance 10.x.x.x:8080)
Source: 
/graph?g0.expr=kube_horizontalpodautoscaler_status_desired_replicas+%3E%3D+kube_horizontalpodautoscaler_spec_max_replicas&g0.tab=1


I would like to put together something simpler without so much information,
for example.

- alertname = HpaMaxedOutVALUE = 2
CLUSTER = test-dev
- description = The maximum number of desired Pods has been hit
- summary = Kubernetes HPA scale capability (instance 10.x.x.x:8080)

Here my config:

    groups:
      - name: HpaMaxedOut
        rules:
        - alert: DeploymentReplicasLimitReached
          expr: kube_horizontalpodautoscaler_status_desired_replicas
>= kube_horizontalpodautoscaler_spec_max_replicas
          for: 1m
          labels:
            severity: critical
          annotations:
            summary: Kubernetes HPA scale capability (instance {{
$labels.instance }})
            description: "The maximum number of desired Pods has been
hit\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"

Any helps?

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAGUDtn%3Dx8iaR%2BgJWuVOcN8HScGs_TE2udbOmiMWJ9ygZK8sq8g%40mail.gmail.com.

Reply via email to