Trigger a handler on status 0

Hi everyone,

I wrote a sensu plugin generating some reports based on Graphite and Logstash metrics and I would like to send them by e-mail at each execution of my plugin.

I already have a mailer handler defined so I was thinking to use it.

The documentation says the following:

By default, only non-zero (exit status > 0) check results produce an event, causing the creation of event data which is passed to one or more handlers.

The By default let think we can customize that somehow…

So my question is the following: can I configure a check to always trigger a handler, even with a status to 0? How?

Thanks for you help :wink:

An email on *every* event? Sounds like a lot of emails?

You can configure a check to always fire on a handler by setting it to
be a "metric" check:
http://sensuapp.org/docs/latest/adding_a_metric

I believe this is the code where that (metric checks are always
processed) is encoded:

···

On Thu, Mar 19, 2015 at 6:26 PM, Brice Argenson <bargenson@gmail.com> wrote:

Hi everyone,

I wrote a sensu plugin generating some reports based on Graphite and
Logstash metrics and I would like to send them by e-mail at each execution
of my plugin.
I already have a mailer handler defined so I was thinking to use it.

The documentation says the following:

By default, only non-zero (exit status > 0) check results produce an
event, causing the creation of event data which is passed to one or more
handlers.

The By default let think we can customize that somehow...

So my question is the following: can I configure a check to always trigger a
handler, even with a status to 0? How?

Thanks for you help :wink: