Hi,
I’d like to have keepalive alerts for all clients sent through a handler (the PagerDuty one in my case). I’m using Sensu 0.23.3
The documentation says:
By default, keepalive events will be sent to the Sensu handler named keepalive
if defined, or thedefault
handler will be used.
So I defined a handler named “keepalive” in my /etc/sensu/config.json and restarted the API and Server processes. It looked like this:
"keepalive": {
"type": "pipe",
"command": "/etc/sensu/handlers/pagerduty.rb"
}
and I also tried
"pagerduty_nofilter": {
"type": "pipe",
"command": "/etc/sensu/handlers/pagerduty.rb"
},
"keepalive": {
"type": "set",
"handlers": ["freq", "hipchat", "pagerduty_nofilter"]
},
Neither of those worked. I disabled the Sensu client on one of my hosts and after a while it showed up in Uchiwa with “No keepalive sent”, as expected, but nothing came through PagerDuty, which does work for other handlers. Is there a way of getting this to work for all the clients? I think there’s a way to do this on a per-client basis, but that would be more tedious to roll out to all the clients, so I have not tried it.
Thanks,
Chuck
This is documented here:
https://sensuapp.org/docs/0.23/reference/clients.html#keepalive-attributes
The handler definition is fine, but yes you need to tell the clients
to use is in their client definition, or make it the "default"
handler.
···
On Wed, Jun 1, 2016 at 3:19 PM, Chuck Musser <cmusser79@gmail.com> wrote:
Hi,
I'd like to have keepalive alerts for all clients sent through a handler
(the PagerDuty one in my case). I'm using Sensu 0.23.3
The documentation says:
By default, keepalive events will be sent to the Sensu handler named
keepalive if defined, or thedefault handler will be used.
So I defined a handler named "keepalive" in my /etc/sensu/config.json and
restarted the API and Server processes. It looked like this:
"keepalive": {
"type": "pipe",
"command": "/etc/sensu/handlers/pagerduty.rb"
}
and I also tried
"pagerduty_nofilter": {
"type": "pipe",
"command": "/etc/sensu/handlers/pagerduty.rb"
},
"keepalive": {
"type": "set",
"handlers": ["freq", "hipchat", "pagerduty_nofilter"]
},
Neither of those worked. I disabled the Sensu client on one of my hosts and
after a while it showed up in Uchiwa with "No keepalive sent", as expected,
but nothing came through PagerDuty, which does work for other handlers. Is
there a way of getting this to work for all the clients? I think there's a
way to do this on a per-client basis, but that would be more tedious to roll
out to all the clients, so I have not tried it.
Thanks,
Chuck