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

update project

parent f273f188
No related branches found
No related tags found
No related merge requests found
# Contributing
If you have any issues or ideas for improvement you can send me an email to _thl-cmk[at]outlook[dot]com_.
For some fixes/improvements I migth need a _snmpwalk_ fom the device in question.
This must contain
- .1.3.6.1.2.1.1.1 sysDescr
- .1.3.6.1.2.1.1.2 sysObjectID
and all the SNMP OIDs used in the plugin.
If you run the _snmpwalk_ command, please uses these options _**-ObentU**_ in addition to your snmp options like community, version etc.
For example:
```
snmpwalk -v2c -c public -ObentU 10.10.10.10 .1.3.6.1.2.1.1.1 > hostname.snmpwalk
snmpwalk -v2c -c public -ObentU 10.10.10.10 .1.3.6.1.2.1.1.2 >> hostname.snmpwalk
snmpwalk -v2c -c public -ObentU 10.10.10.10 .1.3.6.1.4.1.9.9.147.1.2.1.1.1 >> hostname.snmpwalk
```
......@@ -6,6 +6,9 @@ This snmp section/parse function extends the if64 check by replacing ifDescr wit
---
#### Want to contribute?
Nice ;-) Have a look at the [contribution guidelines](CONTRIBUTING.md "Contributing")
---
Sample output
| | original if64 | modifiyed if64name |
......
......@@ -4,7 +4,14 @@
# 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.
# 2021-07-01: extended if64 to use ifNAme instead of ifDescr
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2021-07-01
# extended if64 to use ifNAme instead of ifDescr
#
# 2021-0929: fixed empty interface name handling
#
from typing import (
......@@ -50,7 +57,7 @@ def _get_short_if_name(ifname: str) -> str:
def parse_if64name(string_table: List[type_defs.StringByteTable]) -> interfaces.Section:
for interface in string_table[0]:
if interface[-1] is not '':
if interface[-1] != '':
interface[1] = interface[-1] # replace ifDescr with ifName (.1.3.6.1.2.1.31.1.1.1.1)
interface[1] = _get_short_if_name(interface[1]) # ifDescr (.1.3.6.1.2.1.2.2.1.2)
interface.pop() # remove last entry from interfaces (ifName) -> return original if64 format
......@@ -68,5 +75,5 @@ register.snmp_section(
),
],
detect=if64.HAS_ifHCInOctets,
supersedes=['if', 'statgrab_net', 'if64'],
supersedes=['if', 'statgrab_net', 'if64', 'interfaces'],
)
No preview for this file type
......@@ -11,7 +11,7 @@
'name': 'if64name',
'num_files': 1,
'title': 'ifName extension for if64',
'version': '20210704_v0.0.1',
'version': '20210929.v0.0.1a',
'version.min_required': '2.0.0',
'version.packaged': '2021.04.10',
'version.packaged': '2021.09.20',
'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