Kapacitor: Alert Node Message per level


This is really a nice to have, are there any plans to add the ability to have different messages based on the current state in an alert node? i.e. the message for critical vs ok.

    .message(string(alert_header) + '
        Average COAP response time was {{ index .Fields "_response_time_avg" | printf "%0.2f"}}ms over a ' + string(atg_response_time_window_period) + ' window
        Expecting < {{ if eq .Level "CRITICAL" }}' + string(atg_response_time_critical) + '{{ else }}' + string(atg_response_time_warn) + '{{ end }}
        ' + string(atg_response_time_graph_url))

It would be very nice to not have to all the ‘if eq .Level “CRITICAL”’,and to be put out a different message for recovery etc.


Your solution is the only supported solution at the moment, but will keep this in mind going forward as to how to make this more clear.

1 Like

This should be a standard feature.