Hi,
I’m trying to configure sensu handler through puppet which handles the alert only within business hours, like this
sensu handler for out of business hours
sensu::handler { ‘victorops_out’:
source => ‘puppet:///modules/server/sensu/handler-victorops.rb’,
command => ‘/etc/sensu/handlers/handler-victorops.rb’,
filters => [ ‘business_hours_only’ ],
severities => [ ‘critical’ ],
config => {
“api_url” => ‘https://alert.victorops.com/integrations/generic/20131114/alert/05e3de89-eb51-4ea5-825d-a2716e01af95’,
“routing_key” => ‘ops’
},
}
sensu filter for ‘victorops_out’ handler
sensu::filter { ‘business_hours_only’ :
ensure => “present”,
negate => false,
attributes => {
“check” => {
“interval” => 60
}
},
when => {
“days” => {
“all” => [
{
“begin” => “5:00 PM”,
“end” => “8:00 AM”
}
]
}
},
}
Problem here is, I’ve two node of different timezone one is AEST and other one is IST. So how can I filter out the notification time for each node ? Is there any way in sensu for accomplishing this ?