Hello,
I am struggling with a problem that there are some default notification rules created automatically.
I have grouped my entities with tags, as "prod", "stage", "test" for environments based on the hostname. The tags are set; at least I can see it in the Redis DB, but not the UI.
Anyway when adding additional notification rules that should be valid only on tags, e.g.,
contacts.each do |contact_id|
Flapjack::Diner.create_contact_notification_rules(
contact_id[:id],
{
'tags' => [ 'test' ],
'time_restrictions' => [
{
'start_time' => '2015-01-28 09:00:00',
'end_time' => '2015-01-28 18:00:00',
'rrules' => [
{
'validations' => {
'day' => [ 1, 2, 3, 4, 5 ]
},
'rule_type' => 'Weekly',
'interval' => 1,
'week_start' => 0
}
],
'exrules' => [],
'rtimes' => [],
'extimes' => []
}
],
'unknown_media' => [],
'warning_media' => [ 'email' ],
'critical_media' => [ 'email' ],
'unknown_blackhole' => false,
'warning_blackhole' => false,
'critical_blackhole' => false
}
)
end
then the notifications are also sent after 18:00h and on Saturdays and Sundays and on media not configured for "Test", because for each contact there are some automatic notification rules (I haven't even configured any other media except email and sms_twilio):
Notification Rules
ID | Entities | Entities Regex | Tags | Tags Regex | Warning Media | Critical Media | Time Restrictions | Blackholes |
---|
f2d62055-2fcd-439d-99ef-dfffe7725e90 | - | - | - | - | email, sms, sms_twilio, sms_nexmo, jabber, pagerduty, sns | email, sms, sms_twilio, sms_nexmo, jabber, pagerduty, sns | [] | |
9a898db2-f908-425f-9d4e-2616f347686f | - | - | test | - | email | email | [{"start_time"=>"2015-01-28 09:00:00", "end_time"=>"2015-01-28 18:00:00", "rrules"=>[{"validations"=>{"day"=>[1, 2, 3, 4, 5]}, "rule_type"=>"Weekly", "interval"=>1, "week_start"=>0}], "exrules"=>[], "rtimes"=>[], "extimes"=>[]}] |
|
For Prod I also configured a SMS gateway "sms_twilio" which should be used only for Prod, but it is used for all environments. Is there a way to disable this automatic notification rule?
I am using Flapjack 1.5.0 together with Sensu.
Thanks,
Damian