Open phemmer opened 8 years ago
@phemmer I think the details fields is a good fit here. Kapacitor never consumes the data in the details field, it only produces it. While the details can be HTML the intent is that it is human consumable information.
I would accept a PR that makes use of the .details
property for pagerduty's details field.
I have made this change at https://github.com/influxdata/kapacitor/pull/2297.
Right now the pagerduty handler is hard-coded to send the alert data in the details field. This data is not very useful as the way it is formatted (non-prettified json) is very hard to read (it's hard to match a value in
.values
with a name in.columns
, and the pagerduty details field is meant to be human readable). Instead the details field should be able to be customized. Some of the other handlers use the.details
attribute of the alert, though the documentation seems to emphasize that.details
is meant to be html, where as pagerduty's "details" field is arbitrary data. So I guess the options are to either use this field ignoring the html bit, or provide a new node key that can be used.While we're at it, pagerduty has another field,
contexts
, that would be useful to be able to set as well.