In Kapacitor, I want to create a slack alert handler through the CLI or API. This seems to apply ok but I can’t get alerts and I get this in the logs:
[alert] 2017/04/03 19:49:50 E! failed to send event to Slack service is not enabled
[net_alert:alert2] 2017/04/03 19:49:50 E! failed to send event to Slack service is not enabled
Is it possible to specify alerts without configuring them in the config file? Any idea what I might be missing? I did have “enabled”: true in my alert handler definition.
Right, the problem I’m having is it doesn’t seem to work. I can setup my alert handler through Kapacitor and it looks fine, but I get that error message I pasted in my original post.
I spent some more time looking into this. It seems that only part of the handler config is exposed through the API. For Slack, the channel, username, and icon-emoji are exposed through the API, but the URL and enabled flat and other config is not.
Can anyone explain the reason for this? I was hoping to be able to use multiple different slack handlers with different destinations but it looks like I might have to use multiple instances of Kapacitor to achieve this.
The Slack service config is set via the kapacitor.conf file or via the /kapacitor/v1/config/slack API endpoint.
The handlers config doesn’t effect the aspects of the service itself. This is because the handlers consume the service, meaning you can have multiple Slack handlers to that go to different channels etc, but they all use the same Slack service.