Hi Guys,
I am using sensu 0.22 with mailer plugin to send emails.
I want to send emails to specific users when their servers are down.
With regular checks I am using subscription to do that:
"subscriptions" : { "subscription_name" : { "mail_to": "teamemail@example.com"
} }
Is there a way to that with keepalive checks? to send emails on server "A" keepalive failure to a@example.com and on keepalive failure of server "B" to b@example.com?
Thanks,
Yossi
You can set whatever you need in the keepalive section of the client
configuration:
https://sensuapp.org/docs/latest/clients#keepalive-attributes
···
On Sun, May 1, 2016 at 3:46 AM, Yossi Nachum <nachum234@gmail.com> wrote:
Hi Guys,
I am using sensu 0.22 with mailer plugin to send emails.
I want to send emails to specific users when their servers are down.
With regular checks I am using subscription to do that:
"subscriptions": {
"subscription_name": {
"mail_to": "teamemail@example.com"
}
}
Is there a way to that with keepalive checks? to send emails on server "A"
keepalive failure to a@example.com and on keepalive failure of server "B" to
b@example.com?
Thanks,
Yossi
I don’t see any option to use subscription, so I can’t use mailer handler for that.
It looks like I have to use or write new mail handler for that, am I right?
···
On Tue, May 3, 2016 at 5:08 AM, Kyle Anderson kyle@xkyle.com wrote:
You can set whatever you need in the keepalive section of the client
configuration:
https://sensuapp.org/docs/latest/clients#keepalive-attributes
On Sun, May 1, 2016 at 3:46 AM, Yossi Nachum nachum234@gmail.com wrote:
Hi Guys,
I am using sensu 0.22 with mailer plugin to send emails.
I want to send emails to specific users when their servers are down.
With regular checks I am using subscription to do that:
“subscriptions”: {
"subscription_name": {
"mail_to": "teamemail@example.com"
}
}
Is there a way to that with keepalive checks? to send emails on server “A”
keepalive failure to a@example.com and on keepalive failure of server “B” to
b@example.com?
Thanks,
Yossi
Hmm. I'm not sure what would happen if you put subscriptions in there.
Worth a try I guess?
Maybe adjust your handler to look for mail_to as a base attribute of
the check or in the subscription section.
(https://sensuapp.org/docs/latest/checks#custom-attributes\)
That way it can work with subscription based checks like you have now,
but also with standalone (and keepalive) checks.
···
On Mon, May 2, 2016 at 10:39 PM, Yossi Nachum <nachum234@gmail.com> wrote:
I don't see any option to use subscription, so I can't use mailer handler
for that.
It looks like I have to use or write new mail handler for that, am I right?
On Tue, May 3, 2016 at 5:08 AM, Kyle Anderson <kyle@xkyle.com> wrote:
You can set whatever you need in the keepalive section of the client
configuration:
https://sensuapp.org/docs/latest/clients#keepalive-attributes
On Sun, May 1, 2016 at 3:46 AM, Yossi Nachum <nachum234@gmail.com> wrote:
> Hi Guys,
> I am using sensu 0.22 with mailer plugin to send emails.
> I want to send emails to specific users when their servers are down.
> With regular checks I am using subscription to do that:
>
> "subscriptions": {
> "subscription_name": {
> "mail_to": "teamemail@example.com"
> }
> }
>
>
> Is there a way to that with keepalive checks? to send emails on server
> "A"
> keepalive failure to a@example.com and on keepalive failure of server
> "B" to
> b@example.com?
>
> Thanks,
> Yossi