flapjack notifications

29 views
Skip to first unread message

Filip Slunecko

unread,
Aug 10, 2015, 8:29:01 PM8/10/15
to flapjack
Hi,


I am trying to set up a notification to limit one specific entity to alert only between 7:00 - 23:59 and whatever I try it doesn't work.
I included the setting in the picture.
This is the rule:

{
    "notification_rules": [
        {
            "regex_entities" : ["^tes.*"],
            "time_restrictions": [
                {
                    'start_time': '2013-01-28 07:00:00',
                    'end_time': '2013-01-28 17:59:00',
                    'rrules': [
                        {
                            'rule_type': 'Daily',
                        }
                    ]
                }
            ],
            "unknown_media": [],
            "warning_media": [
                "email"
            ],
            "critical_media": [
                "email"
            ],         
            "unknown_blackhole": True,
            "warning_blackhole": True,
            "critical_blackhole": True
        }
    ]
}

End and start date feels wrong, but I am not sure how to write differently.


Thanks a lot for your help.

Filip
flapjack.png

Jesse Reynolds

unread,
Aug 10, 2015, 9:00:03 PM8/10/15
to flapjack...@googlegroups.com
Hi Filip,

You probably want to set warning_blackhole and critical_blackhole to false otherwise this rule is going to block all notifications for entities matching ^tes.* between 7:00 and 17:59 every day. And change the general rule to be a default drop (remove all media from warning_media and critical_media).

Alternatively, invert it so that the rule is blackholing between 18:00 and 6:59 each day eg:

                    'start_time': '2013-01-28 18:00:00',
                    'end_time': '2013-01-29 6:59:59',

The second approach would work in with your existing general rule that is effectively an allow all. 

Cheers
Jesse
--

---
You received this message because you are subscribed to the Google Groups "flapjack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flapjack-proje...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<flapjack.png>

Filip Slunecko

unread,
Aug 11, 2015, 2:15:06 PM8/11/15
to flapjack
Thank you for you response!

I found the problem. I did not change a timezone settings in flapjack_config.yaml so all the checking was in UTC (I was expecting flapjack to pickup local one.).

Best,

Filip

Jesse Reynolds

unread,
Aug 12, 2015, 12:00:24 AM8/12/15
to flapjack...@googlegroups.com
Hi Filip

Very good. You can also give your contacts specific timezones that override the default in the config. 

Cheers
Jesse
Reply all
Reply to author
Forward
0 new messages