-
Notifications
You must be signed in to change notification settings - Fork 54
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
Only configured channels recieve notifications? #53
Comments
In slack, if I want one app(suppose it is your sensu server) send message to multiple channels, I need to generate one webhook URL for each channel. Then I need to configure all those webhooks into "webhook_urls". {
"handlers": {
"slack": {
"type": "pipe",
"command": "/opt/sensu/embedded/bin/handler-slack-multichannel.rb",
"filters": ["check_dependencies"],
"services": ["critical", "unknown"]
}
},
"slack": {
"template" : "",
"webhook_urls": {
"channel1": "https://hooks.slack.com/services/aaaaaaaaaa/aaaa/aaaaaaa",
"channel2": "https://hooks.slack.com/services/aaaaaaaaa/bbbb/cccccc",
"channel3": "https://hooks.slack.com/services/aaaaaaaaa/bbbb/ddddddd"
},
"channels": {
"default": ["channel1"]
}
}
} |
@maaark11 does that answer your question? |
Let me explain my use case: Using the 1.0.0 version of the plugin I was able to override the channel when configuring the client JSON (within a standalone check). This way, I only needed to define one hook and one default channel on the server side. If I don’t define a channel in the standalone client check, the handler would use the default one. In my experiments with the latest version, I couldn’t replicate this behavior. Was this feature removed from the plugin? |
I will double check and see if I could re-produce your issue tomorrow.
Regards,
Autumn Wang
…On Nov 1, 2017 1:38 PM, "Marco Aurélio Quirino" ***@***.***> wrote:
Let me explain my use case:
Using the 1.0.0 version of the plugin I was able to override the channel
when configuring the client JSON (within a standalone check). This way, I
only needed to define one hook and one default channel on the server side.
If I don’t define a channel in the standalone client check, the handler
would use the default one.
In my experiments with the latest version, I couldn’t replicate this
behavior. Was this feature removed from the plugin?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACh50wDvwx8ARRZCFWf2tnYzJX0W6isXks5syNbigaJpZM4P1eIn>
.
|
Most suspicious line in diff between the two versions: 1.0.0...2.0.0#diff-2e9b02e7ca696b0f2435aa02a93649ebR103 |
@majormoses the link is broken |
grr github changed some stuff one sec I will get a working one... |
actually looking back that change was only for |
Sorry for the delayed response I have not had the time to circle back until now. So let me make sure I understand what you want vs what happens: What you would like to happenDefine a default channel for the handler on the server side, another inside a check (example is standalone but realistically it applies to a subscription check as well). This should result in an alert going to both channels. What actually happensDefine a default channel for the handler on the server side and a different in a check. This should result in sending to only the one defined in the check. ThoughtsAssuming what I have above is correct I think I see where this behavior changed. This was intentional and I believe I missed your intended use case while reviewing. The change happened here: #45. I am conflicted on what we should do here. On the one hand I do think that in some scenarios it might be desirable to say this default channel must fire every time while you can additionally add channels. On the other hand I think that a default is just that a default meant to be overwritten. This follows the same pattern as sensu redaction as well as the pagerduty handler for teams/services. We could add new configuration options to allow finer control of the behavior. For example instead of having just
These are just a few thoughts, open to suggestions. @eheydrick thoughts? |
I has configured one channel in slack.json but i want to send to N others with override using in check but my checks only send if channel are configured in slack.json like:
On this way only work to checks notify
zz
channel other checks doesn't work.This webhook should working to all channels and can override with check channel, right?
EDIT:
I currently use this way, this webhook and with this configuration and the check overwrite the "default" channel but in previous version of
E.G.
on cliente the check is
The text was updated successfully, but these errors were encountered: