parsed[session_type] = session_metrics
        summary['active_sessions'] += session_metrics['active_sessions']
        summary['cumulative_sessions'] += session_metrics[
            'cumulative_sessions']

    parsed['Summary'] = summary

    return parsed


register.snmp_section(
    name="cisco_vpn_sessions",
    parse_function=parse_cisco_vpn_sessions,
    detect=any_of(
        contains('.1.3.6.1.2.1.1.1.0', 'cisco pix security'),
        contains('.1.3.6.1.2.1.1.1.0', 'cisco adaptive security'),
        contains('.1.3.6.1.2.1.1.1.0', 'cisco firepower threat defense'),
    ),
    trees=[
        SNMPTree(
            base='.1.3.6.1.4.1.9.9.392.1',
            oids=[
                '3.26',  # crasIPSecNumSessions
                '3.27',  # crasIPSecCumulateSessions
                '3.28',  # crasIPSecPeakConcurrentSessions
                '3.29',  # crasL2LNumSessions
                '3.30',  # crasL2LCumulateSessions
                '3.31',  # crasL2LPeakConcurrentSessions
                '3.35',  # crasSVCNumSessions
                '3.36',  # crasSVCCumulateSessions
#!/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.agent_based_api.v0 import (
    contains,
    parse_string_table,
    register,
    SNMPTree,
)

register.snmp_section(
    name="infoblox_systeminfo",
    parse_function=parse_string_table,
    trees=[
        SNMPTree(
            base=".1.3.6.1.4.1.7779.3.1.1.2.1",
            oids=[
                "4",  # IB-PLATFORMONE-MIB::ibHardwareType
                "5",  # IB-PLATFORMONE-MIB::ibHardwareId
                "6",  # IB-PLATFORMONE-MIB::ibSerialNumber
                "7",  # IB-PLATFORMONE-MIB::ibSerialVersion
            ],
        ),
    ],
    detect=contains(".1.3.6.1.2.1.1.1.0", "infoblox"),
)
示例#3
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.agent_based_api.v0 import (
    contains,
    OIDEnd,
    parse_string_table,
    register,
    SNMPTree,
)

register.snmp_section(
    name="inv_cisco_vlans",
    parse_function=parse_string_table,
    trees=[
        SNMPTree(
            base=".1.3.6.1.4.1.9.9.68.1.2.2.1",
            oids=[
                OIDEnd(),
                "1",  # vmVlanType
                "2",  # vmVlan
                "4",  # vmVlans
            ],
        ),
    ],
    detect=contains(".1.3.6.1.2.1.1.1.0", "cisco"),
)
示例#4
0
# scans for *all* hosts.

#   ---ucd cpu load---------------------------------------------------------

# We prefer HOST-RESOURCES-MIB implementation but not in case
# of check 'ucd_cpu_load' because the HR-MIB has not data
# about cpu load

#   ---general ucd/hr-------------------------------------------------------

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.*"),
示例#5
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.agent_based_api.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"),
)
示例#6
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.agent_based_api.v0 import (
    contains,
    parse_string_table,
    register,
    SNMPTree,
)

register.snmp_section(
    name="hp_proliant_systeminfo",
    parse_function=parse_string_table,
    trees=[
        SNMPTree(
            base=".1.3.6.1.4.1.232.2.2.2",
            oids=[
                "1",
            ],
        ),
    ],
    detect=contains(".1.3.6.1.4.1.232.2.2.4.2.0", "proliant"),
)