-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Slack field configuration documentation #1002
Conversation
4b32b94
to
18cec9e
Compare
Signed-off-by: Trevor Wood <Trevor.G.Wood@gmail.com>
18cec9e
to
bc710a4
Compare
@@ -454,6 +454,23 @@ channel: <tmpl_string> | |||
[ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the structure that is defined in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code allows for any field to be supplied, not just title and value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.