# Stash/silence support in extension handlers

**URL:** <https://discourse.sensu.io/t/stash-silence-support-in-extension-handlers/310>\
**Category:** Sensu Classic (EOL)\
**Created:** [November 14, 2014, 4:11pm UTC](https://discourse.sensu.io/t/stash-silence-support-in-extension-handlers/310 "2014-11-14T16:11:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geoff\_Hicks](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@Geoff\_Hicks](https://discourse.sensu.io/u/Geoff_Hicks)\
**Post date:** [November 14, 2014, 4:11pm UTC](https://discourse.sensu.io/t/stash-silence-support-in-extension-handlers/310/1 "2014-11-14T16:11:43Z")

</div>

We’re using the Flapjack handler extension from sensu-community-plugins in our environment, but we need the ability to silence checks in Uchiwa (since Flapjack doesn’t have a “Never” option). As it turns out, the code for handling stashes is implemented in the sensu plugin class - which is not used by extensions.

To implement stash support in the Flapjack handler, I’m left with basically two options:

1. Borrow the code in sensu-plugins and port it directly into the handler extension.

2. Port it into the extensions library instead.

Option 2 seems like the most logical choice - I would think we aren’t the only users that want to be able to silence notifications from an extension, or the only users who expected it to behave the same way as a plugin-based handler. But, in the past I’ve gotten the impression that this is counter to the philosophy behind extensions, and I don’t know if a feature like that would ever be implemented. (Maybe a compromise would be to leave it off by default but allow a config option for it.)

I’ve posted a GitHub issue on this under the sensu-extension project ([https://github.com/sensu/sensu-extension/issues/2](https://github.com/sensu/sensu-extension/issues/2)) but haven’t gotten any response yet.

Anyone have any thoughts on the best approach for this?

This e-mail, including attachments, contains confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. The reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.

---

<div class="post-metadata">

**Author:** ![Kyle\_Anderson](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@Kyle\_Anderson](https://discourse.sensu.io/u/Kyle_Anderson)\
**Post date:** [November 15, 2014, 4:02am UTC](https://discourse.sensu.io/t/stash-silence-support-in-extension-handlers/310/2 "2014-11-15T04:02:12Z")

</div>

This is a similar question to  
[https://groups.google.com/forum/#!searchin/sensu-users/flapjack|sort:date/sensu-users/OSGXmv6nxUI/rg\_BG3w--8cJ](https://groups.google.com/forum/#!searchin/sensu-users/flapjack%7Csort:date/sensu-users/OSGXmv6nxUI/rg_BG3w--8cJ)  
The filter\_dependencies and filter\_silenced filters are both things  
that are part of the default Sensu \*handler\* operations, but not  
\*extension\* operations.

If you ask me, having two places to silence a check is confusing. If  
you are using flapjack, I think it makes the most sense to handle the  
silencing/acking/resolving from there (for the "Never" option, can't  
you just put in a very long duration?)

I personally would do 1. The majority of sensu extensions are designed  
to consume all events, regardless of what stashes are out there, in a  
high speed manner.  
To me this is a special case, which I think warrants #1. I would be a  
little concerned over performance in a high-event-rate environment.

> **···**
>
> On Fri, Nov 14, 2014 at 8:11 AM, Geoff Hicks \<ghicks@rmn.com\> wrote:
> 
> > We're using the Flapjack handler extension from sensu-community-plugins in  
> > our environment, but we need the ability to silence checks in Uchiwa (since  
> > Flapjack doesn't have a "Never" option). As it turns out, the code for  
> > handling stashes is implemented in the sensu plugin class - which is not  
> > used by extensions.
> > 
> > To implement stash support in the Flapjack handler, I'm left with basically  
> > two options:  
> > 1. Borrow the code in sensu-plugins and port it directly into the handler  
> > extension.  
> > 2. Port it into the extensions library instead.
> > 
> > Option 2 seems like the most logical choice - I would think we aren't the  
> > only users that want to be able to silence notifications from an extension,  
> > or the only users who expected it to behave the same way as a plugin-based  
> > handler. But, in the past I've gotten the impression that this is counter to  
> > the philosophy behind extensions, and I don't know if a feature like that  
> > would ever be implemented. (Maybe a compromise would be to leave it off by  
> > default but allow a config option for it.)
> > 
> > I've posted a GitHub issue on this under the sensu-extension project  
> > ([Issues · sensu/sensu-extension · GitHub](https://github.com/sensu/sensu-extension/issues/2%5C)) but haven't gotten any  
> > response yet.
> > 
> > Anyone have any thoughts on the best approach for this?
> > 
> > This e-mail, including attachments, contains confidential and/or proprietary  
> > information, and may be used only by the person or entity to which it is  
> > addressed. The reader is hereby notified that any dissemination,  
> > distribution or copying of this e-mail is prohibited. If you have received  
> > this e-mail in error, please notify the sender by replying to this message  
> > and delete this e-mail immediately.
