# Slack handler not firing

**URL:** <https://discourse.sensu.io/t/slack-handler-not-firing/1647>\
**Category:** Sensu Go\
**Created:** [February 27, 2020, 9:21pm UTC](https://discourse.sensu.io/t/slack-handler-not-firing/1647 "2020-02-27T21:21:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Capt-Tom](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@Capt-Tom](https://discourse.sensu.io/u/Capt-Tom)\
**Post date:** [February 27, 2020, 9:21pm UTC](https://discourse.sensu.io/t/slack-handler-not-firing/1647/1 "2020-02-27T21:21:34Z")

</div>

Hello, it’s me again.

I’m now attempting to hook up my handlers and have stalled. I’ve gone through a few pieces of documentation:  
[https://docs.sensu.io/sensu-go/latest/reference/handlers/#keepalive-event-handlers](https://docs.sensu.io/sensu-go/latest/reference/handlers/#keepalive-event-handlers)  
[https://docs.sensu.io/sensu-go/latest/getting-started/sample-app/#create-a-sensu-pipeline-to-slack](https://docs.sensu.io/sensu-go/latest/getting-started/sample-app/#create-a-sensu-pipeline-to-slack)  
[https://docs.sensu.io/sensu-go/latest/guides/send-slack-alerts/](https://docs.sensu.io/sensu-go/latest/guides/send-slack-alerts/)

Given my experience with the environment I feel I have an acceptable understanding of how all this should function, yet the handler is not firing, or at least no messages are arriving.

I have manually verified my webhook URL.  
 ![Screen Shot 2020-02-27 at 3.49.09 PM](https://us1.discourse-cdn.com/flex016/uploads/sensu/original/1X/03067c36af926398dde36507142018f804bc1940.png)

My assets:

```
root@default-ubuntu-1804:~# sensuctl asset list
            Name URL Hash
 ────────────────────────── ───────────────────────────────────────────────────────────────────────────────────────────────── ─────────
  b3fc-ruby-runtime //assets.bonsai.sensu.io/.../b3f-ruby-runtime_2.1.0_ruby-2.4.4_debian_linux_amd64.tar.gz a603f43
  b3fc-sensu-checks //assets.bonsai.sensu.io/.../b3fc-sensu-checks_1.1.0_ruby-2.3.0_debian_linux_amd64.tar.gz 5fdb2df
  sensu-plugins-cpu-checks //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_debian_linux_amd64.tar.gz f0435fd
  sensu-plugins-monitoring //assets.bonsai.sensu.io/.../monitoring-plugins-debian_2.3.0_linux_amd64.tar.gz 9f72313
  sensu-plugins-syslog-ng //assets.bonsai.sensu.io/.../sensu-plugins-syslog-ng_1.1.1_ruby-2.3.0_debian_linux_amd64.tar.gz 20ce4f1
  sensu-slack-handler //assets.bonsai.sensu.io/.../b3f-ruby-runtime_2.1.0_ruby-2.4.4_debian_linux_amd64.tar.gz dc4ef75

```

My checks, output truncated:

```
root@default-ubuntu-1804:~# sensuctl check list
          Name Command Interval Cron Timeout TTL Subscriptions Handlers Assets Hooks Publish? Stdin? Metric Format Metric Handlers
 ─────────────────────── ─────────────────────────────────────────────────────────────────────────────────────────────────────── ────────── ────── ───────── ───── ──────────────── ────────── ──────────────────────────────────────────── ─────── ────────── ──────── ─────────────── ─────────────────
  check-syslog metrics-syslog-ng.rb 60 500 500 system slack sensu-plugins-syslog-ng,b3fc-ruby-runtime true false
  check_swap check_swap -c 1 -w 1 60 10 500 system slack sensu-plugins-monitoring true false
  cpu-usage check-cpu.rb -c 95 -w 90 60 10 500 system slack b3fc-ruby-runtime,sensu-plugins-cpu-checks true false

```

My handlers:

```
root@default-ubuntu-1804:~# sensuctl handler list
    Name Type Timeout Filters Mutator Execute Environment Variables Assets
 ─────────── ────── ───────── ───────── ───────── ──────────────────────────────────────────────────────────── ──────────────────────────────────────────────────────────────────────── ─────────────────────
  keepalive set 0 CALL: slack
  slack pipe 0 RUN: sensu-slack-handler --channel '#channel-name' SLACK_WEBHOOK_URL=https://hooks.slack.com/services/redacted sensu-slack-handler

```

I’m running the sensu-rhel docker image. I’m creating this topic because I’ve tried both removing an agent to fire force the keepalive into a warning status, as well as running stress on a machine to pin its CPU. Neither resulted in a message posted.

```
sensu-backend version 5.18.0, build 670381e539b7af2ee9dff3863249950d71db7b53, built 2020-02-25T22:59:19Z`

```

I’m not receiving any log lines indicating an issue from the backend container, and I’ve checked topics here and on github.

 ![Screen Shot 2020-02-27 at 4.18.09 PM](https://us1.discourse-cdn.com/flex016/uploads/sensu/original/1X/4fc8689cf1b5a73b19133dbd3edefe83648b9741.png)

![Screen Shot 2020-02-27 at 4.19.57 PM](https://us1.discourse-cdn.com/flex016/uploads/sensu/original/1X/b9f0d18d62917e5cd4028b5b17c44ebe9beb5f3a.png)

I’ve tried both the -w flag in the sensu-slack-handler command as well as loading the webhook URL through the environmental variables array in the handler object.

---

<div class="post-metadata">

**Author:** ![Capt-Tom](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@Capt-Tom](https://discourse.sensu.io/u/Capt-Tom)\
**Post date:** [February 27, 2020, 9:23pm UTC](https://discourse.sensu.io/t/slack-handler-not-firing/1647/2 "2020-02-27T21:23:52Z")

</div>

Does the slack handler asset need to be included in the check runtime assets as well?

---

<div class="post-metadata">

**Author:** ![todd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/todd/32/936_2.png) [@todd](https://discourse.sensu.io/u/todd)\
**Post date:** [February 27, 2020, 9:34pm UTC](https://discourse.sensu.io/t/slack-handler-not-firing/1647/3 "2020-02-27T21:34:38Z")

</div>

No, the handler asset only needs to be included for the handler itself.

One thing I notice is that the URL for your sensu-slack-handler asset is pointed to a ruby runtime.

---

<div class="post-metadata">

**Author:** ![Capt-Tom](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@Capt-Tom](https://discourse.sensu.io/u/Capt-Tom)\
**Post date:** [February 27, 2020, 10:25pm UTC](https://discourse.sensu.io/t/slack-handler-not-firing/1647/4 "2020-02-27T22:25:40Z")

</div>

I consciously checked for this, I can’t believe I missed that.

Interestingly I did paste over the hash correctly. It matches [https://bonsai.sensu.io/assets/sensu/sensu-slack-handler/](https://bonsai.sensu.io/assets/sensu/sensu-slack-handler/).

Weird there was no mismatch error. Thank you very much for correcting my carelessness.

---

<div class="post-metadata">

**Author:** ![todd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/todd/32/936_2.png) [@todd](https://discourse.sensu.io/u/todd)\
**Post date:** [February 27, 2020, 10:37pm UTC](https://discourse.sensu.io/t/slack-handler-not-firing/1647/5 "2020-02-27T22:37:39Z")

</div>

Glad to have helped find it.

Now you’re going to want some filters on those handlers so you’re not getting every event into Slack.
