# How is silence supposed to work?

**URL:** <https://discourse.sensu.io/t/how-is-silence-supposed-to-work/58>\
**Category:** Sensu Classic (EOL)\
**Created:** [July 9, 2013, 2:36pm UTC](https://discourse.sensu.io/t/how-is-silence-supposed-to-work/58 "2013-07-09T14:36:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![windowsrefund](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@windowsrefund](https://discourse.sensu.io/u/windowsrefund)\
**Post date:** [July 9, 2013, 2:36pm UTC](https://discourse.sensu.io/t/how-is-silence-supposed-to-work/58/1 "2013-07-09T14:36:12Z")

</div>

I’ve read the FAQ and understand how stashes are created as a result of silencing a node or check

How is the default handler supposed to interact with these stashes when they exist?

Also, how does dashboard interact with these stashes if they exist?

Thanks,  
Adam

---

<div class="post-metadata">

**Author:** ![Bryan\_Brandau](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@Bryan\_Brandau](https://discourse.sensu.io/u/Bryan_Brandau)\
**Post date:** [July 9, 2013, 2:40pm UTC](https://discourse.sensu.io/t/how-is-silence-supposed-to-work/58/2 "2013-07-09T14:40:25Z")

</div>

You need to do one of two things to take advantage of silence stashes. You can extend Sensu::Handler as part of sensu-plugin and you get the stash filtering by default. If not, you can implement your own stash filtering as part of your handler.

The dashboard does nothing but create or delete stashes. It uses the API endpoints to do this.

> **···**
>
> On Tue, Jul 9, 2013 at 9:36 AM, windowsrefund [windowsrefund@gmail.com](mailto:windowsrefund@gmail.com) wrote:
> 
> > I’ve read the FAQ and understand how stashes are created as a result of silencing a node or check
> > 
> > How is the default handler supposed to interact with these stashes when they exist?
> > 
> > Also, how does dashboard interact with these stashes if they exist?
> > 
> > Thanks,  
> > Adam

---

<div class="post-metadata">

**Author:** ![windowsrefund](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@windowsrefund](https://discourse.sensu.io/u/windowsrefund)\
**Post date:** [July 9, 2013, 6:53pm UTC](https://discourse.sensu.io/t/how-is-silence-supposed-to-work/58/3 "2013-07-09T18:53:59Z")

</div>

I may be over-complicating things as I’m basically just looking for a way to simulate the old Nagios Host/Service dependencies bits. Maybe using a mutator to create a stash in order to silence events is not the cleanest way.

I just noticed the filter\_dependencies method in sensu-handler.rb. Is anyone using it? Looks like the a ‘dependencies’ attribute can be added to a check with an array of check names. This seems like a possible solution for node-specific checks. For example, my super\_duper\_check can depend on ‘keepalive’ which would (hopefully) result in super\_duper\_check not generating an event when the node’s ‘keepalive’ check fails. If I’m correct, I’m probably going to see if I can extend this to work across nodes. This could probably be done by refactoring the method to use a hash rather than an array where the key would represent the node and the value represents checks related to that node.

Anxious to hear any thoughts…

Adam

---

<div class="post-metadata">

**Author:** ![Bryan\_Brandau](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@Bryan\_Brandau](https://discourse.sensu.io/u/Bryan_Brandau)\
**Post date:** [July 9, 2013, 7:57pm UTC](https://discourse.sensu.io/t/how-is-silence-supposed-to-work/58/4 "2013-07-09T19:57:29Z")

</div>

I’m not using any of the dependent check stuff. I did submit a pull request to allow more filtering options based on subscription groups and silencing all.

> **···**
>
> On Tue, Jul 9, 2013 at 1:53 PM, windowsrefund [windowsrefund@gmail.com](mailto:windowsrefund@gmail.com) wrote:
> 
> > I may be over-complicating things as I’m basically just looking for a way to simulate the old Nagios Host/Service dependencies bits. Maybe using a mutator to create a stash in order to silence events is not the cleanest way.
> > 
> > I just noticed the filter\_dependencies method in sensu-handler.rb. Is anyone using it? Looks like the a ‘dependencies’ attribute can be added to a check with an array of check names. This seems like a possible solution for node-specific checks. For example, my super\_duper\_check can depend on ‘keepalive’ which would (hopefully) result in super\_duper\_check not generating an event when the node’s ‘keepalive’ check fails. If I’m correct, I’m probably going to see if I can extend this to work across nodes. This could probably be done by refactoring the method to use a hash rather than an array where the key would represent the node and the value represents checks related to that node.
> > 
> > Anxious to hear any thoughts…
> > 
> > Adam

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [November 22, 2018, 2:04am UTC](https://discourse.sensu.io/t/how-is-silence-supposed-to-work/58/5 "2018-11-22T02:04:57Z")

</div>


