The alert name is the fixed identifier of the alert, e.g. 
"SSLCertExpiringSoon".  It is not dynamic.

What problem are you trying to solve?  There may be a different way to 
solve it, e.g. using templating in alertmanager at the time the alert is 
delivered.

On Friday, 3 March 2023 at 09:55:31 UTC Prashant Singh wrote:

> Hi , 
>
> I want to pass value or $value in alertname . it is possible to pass value 
> in alertname .
>
> - alert: SSLCertExpiringSoon $value
>
> --
> groups:
> - name: Blackbox rules
> rules:
> - alert: SSLCertExpiringSoon
> expr: probe_ssl_earliest_cert_expiry - time() < 86400 * 4
> for: 1m
> labels:
> severity: warning
> annotations:
> description: "TLS certificate will expire in {{ $value | humanizeDuration 
> }} (instance {{ $labels.instance }})"
>
>

-- 
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/21304b65-a5aa-41de-a477-e07b4c765633n%40googlegroups.com.

Reply via email to