I'm want to send out an SMS alert when a client fails a keep alive check. I have no desire to reconfigure any clients keep alive settings, just simply use the defaults and send the alert.
2 Answers
You can configure this VERY easily on just the server. Your keepalives should use your default handler. You can set up your default handler to send the SMS (I just use the email handler but send it to mynumber@verizonwireless.com) if you are using the default handler for other things it is easeir to change your other checks to use a different handler than to reconfigure each client... Ps as a side note (if you have more than a few servers that are being monitored by sensu) You should look into some configuration management tools. We use chef and it is wonderful. If I needed to change a handler for a check or even all of them I simply modify the recipe and then tell the machines to re converge and it the process is done in just a few minutes.

- 119
- 4
-
I'm fine with keeping it on the client (especially since there are some with custom configs). We use puppet as the config management tool, never really got on board with chef. – Mike Aug 08 '14 at 23:05
The keepalive check is just like any other check, and can take handlers.
http://sensuapp.org/docs/latest/keepalives
If you are using puppet, you can set the keepalive settings like this:
class { 'sensu':
...
client_keepalive => {
handlers => [ 'sms' ],
}
}

- 138
- 8
-
Great solution but is not available in last stable version (tag v5.9.0 ) – icalvete Jan 13 '23 at 17:11