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

update project

parent 0ff48dd7
No related branches found
No related tags found
No related merge requests found
[PACKAGE]: ../../raw/master/mkp/if64name-0.0.3-20231021.mkp "if64name-0.0.3-20231021.mkp"
# if64name
This is a extension for the _if64_ check. It will replace _ifDescr_ with _ifName_ if available.\
......
......@@ -11,16 +11,11 @@
#
# 2021-09-29: fixed empty interface name handling
# 2023-03-02: changed for CMK 2.1.x
#
from typing import (
List,
)
# 2023-10-21: added if_fortigate to supersedes list
from cmk.base.plugins.agent_based.agent_based_api.v1 import (
register,
SNMPTree,
type_defs,
)
from cmk.base.plugins.agent_based.agent_based_api.v1.type_defs import (
......@@ -48,9 +43,13 @@ _interface_displayhints = {
def _get_short_if_name(ifname: str) -> str:
"""
returns short interface name from long interface name
ifname: is the long interface name
:type ifname: str
returns a short interface name from a long interface name
If no short name is found, the long name (ifname) will be returned
Args:
ifname: is the long interface name
Returns:
str: the short interface name as string
"""
for ifname_prefix in _interface_displayhints.keys():
......@@ -73,10 +72,10 @@ register.snmp_section(
name='if64name',
parsed_section_name='if64',
parse_function=parse_if64name,
fetch= SNMPTree(
base=if64.BASE_OID,
oids=if64.END_OIDS + ['31.1.1.1.1'] # IF-MIB::ifName,
),
fetch=SNMPTree(
base=if64.BASE_OID,
oids=if64.END_OIDS + ['31.1.1.1.1'] # IF-MIB::ifName,
),
detect=if64.HAS_ifHCInOctets,
supersedes=['if64', 'interfaces', 'if', 'statgrab_net'],
supersedes=['if64', 'if', 'statgrab_net', 'if_fortigate'],
)
File added
......@@ -10,7 +10,7 @@
'files': {'agent_based': ['if64name.py']},
'name': 'if64name',
'title': 'ifName extension for if64',
'version': '0.0.2-20230603',
'version.min_required': '2.1.0',
'version.packaged': '2.1.0p21',
'version.usable_until': None}
\ No newline at end of file
'version': '0.0.3-20231021',
'version.min_required': '2.1.0b1',
'version.packaged': '2.2.0p11',
'version.usable_until': None}
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