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 ab257466 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent 04938e4f
No related branches found
No related tags found
No related merge requests found
......@@ -10,9 +10,11 @@
# Monitor Check Point Maestro SMO Test status (asg diag verify)
#
# 2021-03-01: rewrite for CMK 2.x
# 2021-03-03: fixed date/time in parse function
#
# sample snmpwalk for one passed asg test
# .1.3.6.1.4.1.2620.1.48.31.1.1.1.21.0 = Wrong Type (should be OCTET STRING): Gauge32: 21
# .1.3.6.1.4.1.2620.1.48.31.1.1.1.21.0 = Wrong Type (should be OCTET STRING): Gauge32: 21
# .1.3.6.1.4.1.2620.1.48.31.1.1.2.21.0 = STRING: Bond
# .1.3.6.1.4.1.2620.1.48.31.1.1.3.21.0 = STRING: 2020-10-23 01:00:02
# .1.3.6.1.4.1.2620.1.48.31.1.1.4.21.0 = STRING: Passed
......@@ -73,6 +75,7 @@ from typing import Mapping, Dict, List, Tuple, NamedTuple
from .agent_based_api.v1.type_defs import (
DiscoveryResult,
CheckResult,
StringTable,
)
......@@ -111,8 +114,8 @@ def parse_checkpoint_asg_diag(string_table: List[StringTable]) -> CheckPointASGD
parsed = CheckPointASGDiag
parsed.summary = CheckPointASGDiagSummary
# todo: change date to real date string, and add warn/crit if last run to old
parsed.summary.date = asgSummary[0][0][3:13]
parsed.summary.time = asgSummary[0][0][18:26]
parsed.summary.date = asgSummary[3:13]
parsed.summary.time = asgSummary[18:26]
parsed.summary.passed = int(asgSummary[28:].split(".")[0].split(' ')[1].split('/')[0])
parsed.summary.maxtest = int(asgSummary[28:].split(".")[0].split(' ')[1].split('/')[1])
parsed.summary.failed = list(map(int, asgSummary.split(':')[-1].strip(' ').split(',')))
......@@ -125,7 +128,7 @@ def discovery_checkpoint_asg_diag(section: CheckPointASGDiag) -> DiscoveryResult
yield Service(parameters={})
def check_checkpoint_asg_diag(params, section: CheckPointASGDiag):
def check_checkpoint_asg_diag(params, section: CheckPointASGDiag) -> CheckResult:
class CheckPointASGDiagTest(NamedTuple):
index: str
name: str
......
No preview for this file type
......@@ -12,5 +12,5 @@
'title': 'Check Point Maestro SMO ASG Diag',
'version': '20210301.v0.1',
'version.min_required': '2.0.0i1',
'version.packaged': '2020.11.27',
'version.packaged': '2.0.0b7',
'version.usable_until': None}
\ No newline at end of file
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