influxdata / influxdata/kapacitor
Slack workspace specification in handler doesn't work
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
We have the following Slack configuration in our Kapacitor `1.5.1`:
```
[[slack]]
enabled = true
default = true
url = "$KAPACITOR_SLACK_0_URL"
```
And the following handler specs:
```
id: slack-monitoring_alerts_channel
topic: slack-monitoring_alerts_channel
kind: slack
options:
workspace: '.slack.com'
channel: '#alerts'
username: 'kapacitor'
```
And with that, when alert kicks off, the following error `"workspace id not found"` shows up:
```
ts=2018-09-11T06:43:59.947Z lvl=error msg="failed to send event" service=slack handler=slack-monitoring_alerts_channel topic=slack-monitoring_alerts_channel err="workspace id not found"
```
(also tried setting log level to `"DEBUG"` but this still didn't provide a clue)
However, when the same `workspace` is specified in `kapacitor.conf`, it successfully sends alert to the channel.
```
[[slack]]
enabled = true
default = true
url = "$KAPACITOR_SLACK_0_URL"
workspace = ".slack.com"
```
```
id: slack-monitoring_alerts_channel
topic: slack-monitoring_alerts_channel
kind: slack
options:
channel: '#alerts'
username: 'kapacitor'
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the alert with the handler specification's workspace option, then compare its behavior with the equivalent workspace setting in kapacitor.conf. Trace the Slack handler configuration entry point and verify that a handler-level workspace resolves and sends to #alerts without the "workspace id not found" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100