Multiple Sensu Handers

#1

Is there a way to get a result of a hander and use this result in another hander in sensu?

I want to have 3 handers. One to create a issue ticket, other to notificate the hipchat and another to send a sms message, but I have to send the ticket id in SMS and to Hipchat.

A way is create a big hander with all logic, but i belive there鈥檚 a more interessant way. :slight_smile:

#2

The best way I could think to do that is have the ticket handler
create a stash with the ticket number upon creation, and remove the
stash when closed.
Then have any other custom handler use that stash if available to add context.

路路路

On Fri, Feb 12, 2016 at 2:15 AM, Jeferson Martins <jmf2004@gmail.com> wrote:

Is there a way to get a result of a hander and use this result in another
hander in sensu?

I want to have 3 handers. One to create a issue ticket, other to notificate
the hipchat and another to send a sms message, but I have to send the ticket
id in SMS and to Hipchat.

A way is create a big hander with all logic, but i belive there's a more
interessant way. :slight_smile:

#3

Hello,

You can make an array of handlers, It鈥檚 that what are you looking for?

Example:

  "handlers": ["mailer", "hipchat", "pagerduty"],

``

I鈥檓 using hipchat handler and works just fine, guess you鈥檒l need to look for the other ones.

Hope it helps!

路路路

On Friday, February 12, 2016 at 11:15:47 AM UTC+1, Jeferson Martins wrote:

Is there a way to get a result of a hander and use this result in another hander in sensu?

I want to have 3 handers. One to create a issue ticket, other to notificate the hipchat and another to send a sms message, but I have to send the ticket id in SMS and to Hipchat.

A way is create a big hander with all logic, but i belive there鈥檚 a more interessant way. :slight_smile: