#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.

# Example output from agent:
# List of Objects, else Empty


def inventory_symantec_av_quarantine(info):
    return [(None, None)]


def check_symantec_av_quarantine(_no_item, _no_params, info):
    perf = [("objects", len(info))]
    if len(info) > 0:
        return 2, "%d objects in quarantine" % len(info), perf
    return 0, "No objects in quarantine", perf


check_info["symantec_av_quarantine"] = {
    "check_function": check_symantec_av_quarantine,
    "inventory_function": inventory_symantec_av_quarantine,
    "service_description": "AV Quarantine",
    "has_perfdata": True,
}
