Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit 9b1f6806 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent 3370b48e
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@
# 2020-11-28 : added available updates
# 2021-02-08 : transfered license/support info to seperate plugin
# 2021-02-22 : code cleanup
# 2021-03-05 : added hostlabel section
#
# sample string_table
# [
......@@ -28,11 +29,13 @@
from typing import List, NamedTuple
from .agent_based_api.v1.type_defs import (
HostLabelGenerator,
StringTable,
InventoryResult,
)
from .agent_based_api.v1 import (
Attributes,
HostLabel,
register,
SNMPTree,
startswith,
......@@ -85,16 +88,23 @@ def parse_checkpoint_inv_base(string_table: List[StringTable]) -> List:
return section
def host_label_checkpoint_inv_base(section: List) -> HostLabelGenerator:
for invPath, key, value in section:
if key == 'appliance_series' and value.lower() == 'maestro':
yield HostLabel('checkpoint/device_type', 'maestro')
def inventory_checkpoint_base(section: List) -> InventoryResult:
for invPath, key, value in section:
yield Attributes(
path= invPath,
path=invPath,
inventory_attributes={key: value})
register.snmp_section(
name='checkpoint_inv_base',
parse_function=parse_checkpoint_inv_base,
host_label_function=host_label_checkpoint_inv_base,
fetch=[
SNMPTree(
base='.1.3.6.1.4.1.2620.1.6', # CHECKPOINT-MIB::svn
......@@ -129,4 +139,4 @@ register.snmp_section(
register.inventory_plugin(
name='checkpoint_inv_base',
inventory_function=inventory_checkpoint_base,
)
\ No newline at end of file
)
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment