示例#1
0
#!/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.
from cmk.base.plugins.agent_based.v0 import (
    all_of,
    contains,
    exists,
)

DETECT_RICOH = all_of(
    contains(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.367.1.1"),
    exists(".1.3.6.1.4.1.367.3.2.1.2.19.5.1.5.1"),
)
示例#2
0
#!/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.
from typing import List, Tuple

from cmk.base.plugins.agent_based.v0 import (
    all_of,
    any_of,
    startswith,
    matches,
)

DETECT = all_of(
    any_of(
        matches(".1.3.6.1.2.1.1.1.0", "[^ ]+ [^ ]+ [^ ]*cp( .*)?"),
        startswith(".1.3.6.1.2.1.1.1.0", "IPSO "),
        matches(".1.3.6.1.2.1.1.1.0", "Linux.*cpx.*"),
    ),
    startswith(".1.3.6.1.4.1.2620.1.1.21.0", 'firewall'),
)
示例#3
0
HR = exists(".1.3.6.1.2.1.25.1.1.0")

_NOT_HR = not_exists(".1.3.6.1.2.1.25.1.1.0")

UCD = any_of(
    contains(".1.3.6.1.2.1.1.1.0", "linux"),
    contains(".1.3.6.1.2.1.1.1.0", "cmc-tc"),
    contains(".1.3.6.1.2.1.1.1.0", "hp onboard administrator"),
    contains(".1.3.6.1.2.1.1.1.0", "barracuda"),
    contains(".1.3.6.1.2.1.1.1.0", "pfsense"),
    contains(".1.3.6.1.2.1.1.1.0", "genugate"),
    contains(".1.3.6.1.2.1.1.1.0", "bomgar"),
    contains(".1.3.6.1.2.1.1.1.0", "pulse secure"),
    all_of(  # Artec email archive appliances
        equals(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.8072.3.2.10"),
        contains(".1.3.6.1.2.1.1.1.0", "version"),
        contains(".1.3.6.1.2.1.1.1.0", "serial"),
    ),
    all_of(
        equals(".1.3.6.1.2.1.1.1.0", ""),
        exists(".1.3.6.1.4.1.2021.*"),
    ))

_NOT_UCD = all_of(
    # This is an explicit negation of the constant above.
    # We don't have a generic negation function as we want
    # discourage constructs like this.
    # In the future this will be acomplished using the 'supersedes'
    # feature (according to CMK-4232), and this can be removed.
    not_contains(".1.3.6.1.2.1.1.1.0", "linux"),
    not_contains(".1.3.6.1.2.1.1.1.0", "cmc-tc"),