def METHOD_NAME():
    with open(os.environ['RSYSLOG_DYNNAME'] + ".errorfile") as json_file:
        json_data = json.load(json_file)
        indexCount =0
        replyCount=0
        for item in json_data:
            if item == "request":
                for reqItem in json_data[item]:
                    if reqItem == "url":
                        print("url found")
                        print(reqItem)
                    elif reqItem == "postdata":
                        print("postdata found")
                        indexCount = str(json_data[item]).count('\"_index\":')
                        print(reqItem)
                    else:
                        print(reqItem)
                        print("Unknown item found")
                        sys.exit(1)
            elif item == "reply":
                for replyItem in json_data[item]:
                    if replyItem == "items":
                        print(json_data[item][replyItem])
                        replyCount = str(json_data[item][replyItem]).count('_index')
                    elif replyItem == "errors":
                        print("error node found")
                    elif replyItem == "took":
                        print("took node found")
                    else:
                        print(replyItem)
                        print("Unknown item found")
                        sys.exit(3)
            else:
                print(item)
                print("Unknown item found")
                print("error")
                sys.exit(4)
    if replyCount == indexCount :
        return 0
    else:
        sys.exit(7)
    return 0