Exemplo n.º 1
0
 def with_rules(self, *rules):
     """Rules to include in the detector."""
     util.check_collection(rules, Rule)
     self.options.update({
         'rules': list(map(lambda x: x.options, rules))
     })
     return self
Exemplo n.º 2
0
 def with_notifications(self, *notifications):
     """Determines where notifications will be sent when an incident occurs.
     """
     util.check_collection(notifications, Notification)
     self.options.update(
         {'notifications': list(map(lambda x: x.options, notifications))})
     return self
Exemplo n.º 3
0
    def with_teams(self, *team_ids):
        """Team IDs to associate the detector to.

        Arguments:
            *team_ids: List of team_ids to attach to the detector
        """
        util.check_collection(team_ids, string_types)
        self.options.update({'teams': list(team_ids)})
        return self
Exemplo n.º 4
0
    def with_tags(self, *tags):
        """Tags associated with the detector.

        Arguments:
            *tags: List of tags to attach to the detector
        """
        util.check_collection(tags, string_types)
        self.options.update({'tags': list(tags)})
        return self
Exemplo n.º 5
0
    def with_notifications(self, *notifications):
        """Determines where notifications will be sent when an incident occurs.

        Arguments:
            *notifications: List of notification destinations

            See https://developers.signalfx.com/reference#section-notifications for notification destinations.
        """
        util.check_collection(notifications, Notification)
        self.options.update(
            {'notifications': list(map(lambda x: x.options, notifications))})
        return self
Exemplo n.º 6
0
 def with_tags(self, *tags):
     """Tags associated with the detector."""
     util.check_collection(tags, string_types)
     self.options.update({'tags': list(tags)})
     return self
Exemplo n.º 7
0
 def with_rules(self, *rules):
     util.check_collection(rules, Rule)
     self.options.update({'rules': list(map(lambda x: x.options, rules))})
     return self