# Sensu check different retry interval on failure

**URL:** <https://discourse.sensu.io/t/sensu-check-different-retry-interval-on-failure/1152>\
**Category:** Sensu Go\
**Created:** [May 2, 2019, 8:44pm UTC](https://discourse.sensu.io/t/sensu-check-different-retry-interval-on-failure/1152 "2019-05-02T20:44:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KendallChenoweth](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@KendallChenoweth](https://discourse.sensu.io/u/KendallChenoweth)\
**Post date:** [May 2, 2019, 8:44pm UTC](https://discourse.sensu.io/t/sensu-check-different-retry-interval-on-failure/1152/1 "2019-05-02T20:44:14Z")

</div>

Sensu seems to have a single per check interval and the ability to set the number of occurrences (hard vs soft failure) before a handler (presumably notification) is invoked. If a non OK check result occurs, unlike Nagios, Sensu is not changing the check interval on subsequent checks (soft failures).

Can Sensu mimic this behavior?

If so, what is the best way to mimic the behavior of Nagios with Sensu?

---

<div class="post-metadata">

**Author:** ![richard](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@richard](https://discourse.sensu.io/u/richard)\
**Post date:** [May 2, 2019, 8:53pm UTC](https://discourse.sensu.io/t/sensu-check-different-retry-interval-on-failure/1152/2 "2019-05-02T20:53:37Z")

</div>

Hello @KendallChenoweth,

If I understand correctly, what you want to do in Sensu is to have the check interval to change after it finds a non-OK check result after it’s configured number of occurrences?

I don’t see a FR for this in the sensu-go repository. I can open one for you or if you’d like to, you can as well:

> **[sensu/sensu-go](https://github.com/sensu/sensu-go/issues)**
>
> Simple. Scalable. Multi-cloud monitoring. Contribute to sensu/sensu-go development by creating an account on GitHub.

While increasing the number of occurrences can get close to this behavior, I can see use cases to want to increase the interval to be more confidant that an outage is occurring before sending an alert.

Regards,  
Richard.

---

<div class="post-metadata">

**Author:** ![KendallChenoweth](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@KendallChenoweth](https://discourse.sensu.io/u/KendallChenoweth)\
**Post date:** [May 2, 2019, 9:19pm UTC](https://discourse.sensu.io/t/sensu-check-different-retry-interval-on-failure/1152/3 "2019-05-02T21:19:45Z")

</div>

It occurred to me that perhaps the best way to mimic this behavior was to create a hook script that executed an ad-hoc check of the same check. If I can get the hook script to delay the ad-hoc request, then I mimic the behavior exactly. I know I can create an AT job or run a temporary script with a sleep to cause the delay. Is there some better way using some feature within Sensu?

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![majormoses](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/majormoses/32/62_2.png) [@majormoses](https://discourse.sensu.io/u/majormoses)\
**Post date:** [May 4, 2019, 2:17am UTC](https://discourse.sensu.io/t/sensu-check-different-retry-interval-on-failure/1152/4 "2019-05-04T02:17:35Z")

</div>

While you probably could leverage a check hook to do that I think it would be best by being implemented as a first class feature. It’s been asked for before on the sensu-core project. @richard we should either transfer or copy the request over to sensu-go IMHO.

---

<div class="post-metadata">

**Author:** ![richard](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@richard](https://discourse.sensu.io/u/richard)\
**Post date:** [May 7, 2019, 6:42pm UTC](https://discourse.sensu.io/t/sensu-check-different-retry-interval-on-failure/1152/5 "2019-05-07T18:42:00Z")

</div>

Hello @KendallChenoweth,

Sorry for the delay here. I’ve opened:

> <https://github.com/sensu/sensu-go/issues/2925>

To cover this. I believe I told the right story, but feel free to comment in the issue if I missed a detail or misunderstood your requirements.

Regards,  
Richard.
