Add Slack field configuration documentation#1002
Add Slack field configuration documentation#1002taharah wants to merge 1 commit intoprometheus:masterfrom
Conversation
4b32b94 to
18cec9e
Compare
Signed-off-by: Trevor Wood <Trevor.G.Wood@gmail.com>
18cec9e to
bc710a4
Compare
| [ text: <tmpl_string> | default = '{{ template "slack.default.text" . }}' ] | ||
| [ fallback: <tmpl_string> | default = '{{ template "slack.default.fallback" . }}' ] | ||
|
|
||
| # An optional flag indicating whether the value(s) of all fields defined |
There was a problem hiding this comment.
Keep the style consistent with what's above.
| # An optional list of key/value pairs to provide further details about the incident. | ||
| # The key/value pairs contained within it will be displayed in a table inside the | ||
| # message attachment. | ||
| [ fields: |
There was a problem hiding this comment.
This is not the structure that is defined in the code.
There was a problem hiding this comment.
Not quite sure what you mean here. The way the code reads is a little misleading since it looks like it's looping over a map at first glance [1], but the structure is definitely a list of key/value pairs albeit very specific, i.e., needs to include both the title and value for each field defined. Thus, do you mean that the description in the preceding comment of the structure is inaccurate and needs to be more specific?
I've tested and used the following configuration for defining two different fields:
fields:
- title: 'severity'
value: '{{ .GroupLabels.severity }}'
- title: 'status'
value: '{{ .Status }}'There was a problem hiding this comment.
The code allows for any field to be supplied, not just title and value.
There was a problem hiding this comment.
There was a problem hiding this comment.
That is still not what is implemented in the alertmanager. I think you need to fix the code.
|
Already resolved by #1025. |
Adds documentation on how to configure Slack fields, which were added to the Alertmanager as part of PR #1135.