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

update project

parent d22c9842
No related branches found
No related tags found
No related merge requests found
[PACKAGE]: ../../raw/master/mkp/snmp_uptime-0.0.2-20230805.mkp "snmp_uptime-0.0.2-20230805.mkp"
[PACKAGE]: ../../raw/master/mkp/snmp_uptime-0.0.3-20240616.mkp "snmp_uptime-0.0.3-20240616.mkp"
# SNMP uptime
This check is based on the snmp_uptime check form CMK. It adds the SNMP-FRAMEWORK-MIB::snmpEngineTime OID to the check. Its value is in seconds not ticks and therefore the Uptime can now be around 68 years before a rollover of the counter :-)
......
File added
......@@ -15,12 +15,13 @@
# 2022-03-07: fixed if snmpEngineTime == 0
# 2022-03-08: renamed to snmp_uptime_extended to avoid caching issues with the original check
# 2023-08-05: made parse function more stable (try/except/else)
# 2024-06-16: modified imports for CMK 2.3
from typing import Optional
from cmk.base.plugins.agent_based.agent_based_api.v1 import exists, register, SNMPTree
from cmk.base.plugins.agent_based.agent_based_api.v1.type_defs import StringTable
from cmk.base.plugins.agent_based.utils import uptime
from cmk.plugins.lib import uptime
def parse_snmp_uptime_extended(string_table: StringTable) -> Optional[uptime.Section]:
......@@ -33,7 +34,6 @@ def parse_snmp_uptime_extended(string_table: StringTable) -> Optional[uptime.Sec
True
>>> parse_snmp_uptime_extended([['2297331594', '', '313671']])
Section(uptime_sec=313671, message=None)
"""
try:
sysUpTime, hrSystemUptime, snmpEngineTime = string_table[0]
......
......@@ -8,7 +8,7 @@
'files': {'agent_based': ['snmp_uptime.py']},
'name': 'snmp_uptime',
'title': 'SNMP Uptime',
'version': '0.0.2-20230805',
'version.min_required': '2.0.0b1',
'version': '0.0.3-20240616',
'version.min_required': '2.3.0b1',
'version.packaged': 'cmk-mkp-tool 0.2.0',
'version.usable_until': '2.3.0b1'}
'version.usable_until': '2.4.0b1'}
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