# Keepalive + slack + fatigue\_plugin

**URL:** <https://discourse.sensu.io/t/keepalive-slack-fatigue-plugin/2328>\
**Category:** Sensu Go\
**Created:** [December 3, 2020, 7:23pm UTC](https://discourse.sensu.io/t/keepalive-slack-fatigue-plugin/2328 "2020-12-03T19:23:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leif](https://avatars.discourse-cdn.com/v4/letter/l/8797f3/32.png) [@Leif](https://discourse.sensu.io/u/Leif)\
**Post date:** [December 3, 2020, 7:23pm UTC](https://discourse.sensu.io/t/keepalive-slack-fatigue-plugin/2328/1 "2020-12-03T19:23:34Z")

</div>

Im stuck trying to get this combo running.  
I have been trying different approaches for two days now, and Im getting more confused by the hour.  
The slack connection is working.  
The keepalives keep coming in to slack if I delete a host.  
Im not able to fine tune the behaviour though.

This is what I want in slack:

- Warning if no keepalive after 120s.
- Critical if no keepalive after 180s.
- Reminder (critical) after twelve hours, 24h, 36h etc until fixed.
- Notification when resolved

Im just looking for a working solution, I can skip the fatigue plugin if necessary.

config:  
(no annotations on entities, but I have tried w. those as well)  
(args in parenthesis for fatigue\_check might be off, Im a bit tired and very frustrated right now)

* * *

type: Handler  
api\_version: core/v2  
metadata:  
name: keepalive  
namespace: test  
spec:  
handlers:

- slack  
type: set

* * *

api\_version: core/v2  
type: Handler  
metadata:  
namespace: test  
name: slack  
spec:  
type: pipe  
command: sensu-slack-handler --channel ‘#larm’ --username ‘larm’ --webhook-url [https://hooks.slack.com/services/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](https://hooks.slack.com/services/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)  
filters:

- is\_incident
- fatigue\_check(event,1, 43200, 1, 4300)  
runtime\_assets:
- sensu/sensu-slack-handler  
timeout: 10

* * *

type: EventFilter  
api\_version: core/v2  
metadata:  
name: fatigue\_check  
namespace: test  
spec:  
action: allow  
expressions:

- fatigue\_check(event)  
runtime\_assets:
- fatigue-filter

* * *

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![anatolijd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/anatolijd/32/507_2.png) [@anatolijd](https://discourse.sensu.io/u/anatolijd)\
**Post date:** [December 4, 2020, 3:43pm UTC](https://discourse.sensu.io/t/keepalive-slack-fatigue-plugin/2328/2 "2020-12-04T15:43:36Z")

</div>

fatigue\_checks handler may need specific agent annotations (`.annotations.fatigue_check/*`) .  
Did you set those annotation for agent ?

---

<div class="post-metadata">

**Author:** ![Leif](https://avatars.discourse-cdn.com/v4/letter/l/8797f3/32.png) [@Leif](https://discourse.sensu.io/u/Leif)\
**Post date:** [December 4, 2020, 3:55pm UTC](https://discourse.sensu.io/t/keepalive-slack-fatigue-plugin/2328/3 "2020-12-04T15:55:24Z")

</div>

Yes, sure,  
fatigue\_check/keepalive\_occurrences: “1”  
fatigue\_check/keepalive\_interval: “3600”

I even tried as arguments, as per docs:  
“These can be set as  
arguments to the `fatigue_check()` function in the filter definition or as  
entity annotations to override the defaults on a per entity basis.”
