Exemple #1
0
    def post(self, request, *args, **kwargs):
        event = json.loads(request.body)['event']

        event.update(
            find_by_event(event['check']['name'], event['check']['output']))

        return HttpResponse(json.dumps(event))
Exemple #2
0
    def post(self, request, *args, **kwargs):
        event = json.loads(request.body)['event']

        event.update(
            find_by_event(event['check']['name'], event['check']['output']))

        return HttpResponse(json.dumps(event))
Exemple #3
0
    def post(self, request, *args, **kwargs):

        output = []

        try:
            events = json.loads(request.body)['events']
            for event in events:
                event.update(find_by_event(event["check"]))
                output.append(event)
        except Exception as e:
            raise e
            log.error(e)

        return HttpResponse(json.dumps(output))
Exemple #4
0
    def post(self, request, *args, **kwargs):

        output = []

        try:
            events = json.loads(request.body)['events']
            for event in events:
                event.update(find_by_event(event["check"]))
                output.append(event)
        except Exception as e:
            raise e
            log.error(e)

        return HttpResponse(json.dumps(output))