Skip to content

Commit

Permalink
Merge pull request #1 from sensu/master
Browse files Browse the repository at this point in the history
Boop
  • Loading branch information
asachs01 authored Jun 15, 2020
2 parents 59367c1 + 55861a7 commit 1a9310b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.3.2] - 2020-05-18

### Changed
- Support for newline (\n) expansion in description template
- README updates

## [1.3.1] - 2020-03-30

### Changed
Expand Down
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ Available Commands:
version Print the version number of this plugin
Flags:
-c, --channel string The channel to post messages to (default "#general")
-h, --help help for sensu-slack-handler
-i, --icon-url string A URL to an image to use as the user avatar (default "https://www.sensu.io/img/sensu-logo.png")
-u, --username string The username that messages will be sent as (default "sensu")
-w, --webhook-url string The webhook url to send messages to
-t, --descriptionTemplate The Slack notification output template, in Golang text/template format
-c, --channel string The channel to post messages to (default "#general")
-t, --description-template string The Slack notification output template, in Golang text/template format (default "{{ .Check.Output }}")
-h, --help help for sensu-slack-handler
-i, --icon-url string A URL to an image to use as the user avatar (default "https://www.sensu.io/img/sensu-logo.png")
-u, --username string The username that messages will be sent as (default "sensu")
-w, --webhook-url string The webhook url to send messages to
```

## Configuration
Expand Down Expand Up @@ -113,6 +113,13 @@ annotations:
sensu.io/plugins/slack/config/channel: '#monitoring'
```
### Proxy Support
This handler supports the use of the environment variables HTTP_PROXY,
HTTPS_PROXY, and NO_PROXY (or the lowercase versions thereof). HTTPS_PROXY takes
precedence over HTTP_PROXY for https requests. The environment values may be
either a complete URL or a "host[:port]", in which case the "http" scheme is assumed.
## Installing from source and contributing
Download the latest version of the sensu-slack-handler from [releases][4],
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ func messageAttachment(event *corev2.Event) *slack.Attachment {
if err != nil {
fmt.Errorf("Error processing template: %s", err)
}
description = strings.Replace(description, `\n`, "\n", -1)
attachment := &slack.Attachment{
Title: "Description",
Text: description,
Expand Down

0 comments on commit 1a9310b

Please sign in to comment.