sensu-plugins-slack 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +8 -3
- data/bin/handler-slack-multichannel.rb +5 -4
- data/lib/sensu-plugins-slack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f3f9a918ef13d9b355b40c09354e1c88729a3ae
|
4
|
+
data.tar.gz: 9852fac7e1faf796eb9e7fd0fd3a5f7366e37d1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6d3c867acafaf6b89cb500fe2cd4240c8e93beeae9b555873ed4ed69d44713268faf840745a3ea267c487540b5a93bee12b3bfb40576a1749b0d21f690b105d
|
7
|
+
data.tar.gz: ed616147d09b618f9ee203a5d00ce561bc61ec3d12b5730e3609df9385e48657fcafdc7a51c3d984f8057b82fbf9bc173641f024d6a4d729224e64919e165bfa
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
|
+
## [1.5.1] - 2017-08-18
|
8
|
+
### Fixed
|
9
|
+
- `handler-slack-multichannel.rb`: Add param webhook_urls to support one webhook_url per channel
|
10
|
+
|
11
|
+
### Added
|
12
|
+
- slack badge to README.
|
7
13
|
|
8
14
|
## [1.5.0] - 2017-08-07
|
9
15
|
### Added
|
@@ -98,6 +104,7 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
98
104
|
- initial release
|
99
105
|
|
100
106
|
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-slack/compare/1.5.0...HEAD
|
107
|
+
[1.5.1]: https://github.com/sensu-plugins/sensu-plugins-slack/compare/1.5.0...1.5.1
|
101
108
|
[1.5.0]: https://github.com/sensu-plugins/sensu-plugins-slack/compare/1.4.0...1.5.0
|
102
109
|
[1.4.0]: https://github.com/sensu-plugins/sensu-plugins-slack/compare/1.3.0...1.4.0
|
103
110
|
[1.3.0]: https://github.com/sensu-plugins/sensu-plugins-slack/compare/1.2.0...1.3.0
|
data/README.md
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-slack/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-slack)
|
6
6
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-slack/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-slack)
|
7
7
|
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-slack.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-slack)
|
8
|
+
[![Community Slack](https://slack.sensu.io/badge.svg)](https://slack.sensu.io/badge)
|
9
|
+
|
8
10
|
|
9
11
|
## Functionality
|
10
12
|
|
@@ -46,10 +48,13 @@
|
|
46
48
|
```
|
47
49
|
{
|
48
50
|
"slack": {
|
49
|
-
"
|
51
|
+
"webhook_urls": {
|
52
|
+
"no-team-alerts": "https://hooks.slack.com/services/AAAAAAA",
|
53
|
+
"all-alerts": "https://hooks.slack.com/services/BBBBBB"
|
54
|
+
},
|
50
55
|
"channel": {
|
51
|
-
"default": [ "
|
52
|
-
"compulsory": [ "
|
56
|
+
"default": [ "no-team-alerts" ],
|
57
|
+
"compulsory": [ "all-alerts" ]
|
53
58
|
}
|
54
59
|
"message_prefix": "optional prefix - can be used for mentions",
|
55
60
|
"surround": "optional - can be used for bold(*), italics(_), code(`) and preformatted(```)",
|
@@ -101,10 +101,6 @@ class Slack < Sensu::Handler
|
|
101
101
|
get_setting('icon_url')
|
102
102
|
end
|
103
103
|
|
104
|
-
def slack_webhook_url
|
105
|
-
get_setting('webhook_url')
|
106
|
-
end
|
107
|
-
|
108
104
|
def slack_icon_emoji
|
109
105
|
get_setting('icon_emoji')
|
110
106
|
end
|
@@ -129,6 +125,10 @@ class Slack < Sensu::Handler
|
|
129
125
|
get_setting('surround')
|
130
126
|
end
|
131
127
|
|
128
|
+
def webhook_urls
|
129
|
+
get_setting('webhook_urls')
|
130
|
+
end
|
131
|
+
|
132
132
|
def default_channels
|
133
133
|
return get_setting('channels')['default']
|
134
134
|
rescue
|
@@ -244,6 +244,7 @@ class Slack < Sensu::Handler
|
|
244
244
|
end
|
245
245
|
|
246
246
|
def post_data(notice, channel)
|
247
|
+
slack_webhook_url = webhook_urls[channel]
|
247
248
|
uri = URI(slack_webhook_url)
|
248
249
|
|
249
250
|
http = if defined?(slack_proxy_addr).nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-slack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubis
|