Skip to content

Commit

Permalink
Updated docs. Fixed YAML newlines
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>
  • Loading branch information
julienduchesne committed Apr 13, 2021
1 parent 59c7fd5 commit f33427c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion config/testdata/conf.slack-both-file-and-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ receivers:
slack_configs:
- channel: '#alerts1'
text: 'test'

1 change: 0 additions & 1 deletion config/testdata/conf.slack-default-api-url-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ receivers:
- channel: '#alerts3'
text: 'test'
api_url: 'http://mysecret.example.com/'

2 changes: 1 addition & 1 deletion config/testdata/conf.slack-no-api-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ receivers:
- name: 'slack-notifications'
slack_configs:
- channel: '#alerts'
text: 'test'
text: 'test'
5 changes: 4 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ global:

# The API URL to use for Slack notifications.
[ slack_api_url: <secret> ]
[ slack_api_url_file: <filepath> ]
[ victorops_api_key: <secret> ]
[ victorops_api_url: <string> | default = "https://alert.victorops.com/integrations/generic/20131114/alert/" ]
[ pagerduty_url: <string> | default = "https://events.pagerduty.com/v2/enqueue" ]
Expand Down Expand Up @@ -567,8 +568,10 @@ an [attachment](https://api.slack.com/docs/message-attachments).
# Whether or not to notify about resolved alerts.
[ send_resolved: <boolean> | default = false ]
# The Slack webhook URL.
# The Slack webhook URL. Either api_url or api_url_file should be set.
# Defaults to global settings if none are set here.
[ api_url: <secret> | default = global.slack_api_url ]
[ api_url_file: <filepath> | default = global.slack_api_url_file ]
# The channel or user to send notifications to.
channel: <tmpl_string>
Expand Down
2 changes: 2 additions & 0 deletions docs/notification_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ In this example we've customised our Slack notification to send a URL to our org

```
global:
# Also possible to place this URL in a file.
# Ex: `slack_api_url_file: '/etc/alertmanager/slack_url'`
slack_api_url: '<slack_webhook_url>'
route:
Expand Down

0 comments on commit f33427c

Please sign in to comment.