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

update project

parent b3e4845b
No related branches found
No related tags found
No related merge requests found
......@@ -9,3 +9,4 @@
2021-06-14: fixed capabilities (changed to binary/binascii) thanks to andreas[dot]doehler[at]gmail[dot]com
2021-07-10: made use short interface names configurable via wato
fixed cdcapabilities for "b''" on Cisco WLC
2023-02-17: moved wato/metrics from ~/local/share/.. to ~/local/lib/... for CMK2.1
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# 2023-02-17: moved from ~/local/share/check_mk/web/plugins/metrics -> ~7local/lib/check_mk/gui/plugins/metrics
#
from cmk.gui.plugins.views.utils import (
inventory_displayhints,
)
from cmk.gui.plugins.views.inventory import (
declare_invtable_view,
)
from cmk.gui.i18n import _
inventory_displayhints.update({
'.networking.cdp_cache:': {
'title': _('CDP Cache'),
'keyorder': ['address', 'device_id', 'device_port', 'local_port',
],
'view': 'invcdpcache_of_host',
},
'.networking.cdp_cache:*.address': {'title': _('Neighbour address'), },
'.networking.cdp_cache:*.version': {'title': _('Neighbour platform details'), },
'.networking.cdp_cache:*.device_id': {'title': _('Neighbour device'), },
'.networking.cdp_cache:*.device_port': {'title': _('Neighbour port'), },
'.networking.cdp_cache:*.local_port': {'title': _('Local port'), },
'.networking.cdp_cache:*.platform': {'title': _('Neighbour platform'), },
'.networking.cdp_cache:*.capabilities': {'title': _('Capabilites'), },
'.networking.cdp_cache:*.vtp_mgmt_domain': {'title': _('VTP domain'), },
'.networking.cdp_cache:*.native_vlan': {'title': _('Native VLAN'), },
'.networking.cdp_cache:*.duplex': {'title': _('Duplex'), },
'.networking.cdp_cache:*.powerconsumption': {'title': _('Power level'), },
'.networking.cdp_cache:*.last_change': {'title': _('Last Change'), },
})
declare_invtable_view('invcdpcache', '.networking.cdp_cache:', _('CDP cache'), _('CDP Cache'))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# 2023-02-17: moved from ~/local/share/check_mk/web/plugins/wato -> ~7local/lib/check_mk/gui/plugins/wato
#
from cmk.gui.i18n import _
from cmk.gui.plugins.wato.utils import (
HostRulespec,
rulespec_registry,
)
from cmk.gui.valuespec import (
Dictionary,
FixedValue,
TextAscii,
ListChoice,
)
from cmk.gui.plugins.wato.inventory import (
RulespecGroupInventory,
)
def _valuespec_inv_cdp_cache():
removecolumns = [
('version', 'Neighbour platform details'),
('capabilities', 'Capabilites'),
('vtp_mgmt_domain', 'VTP domain'),
('native_vlan', 'Native VLAN'),
('duplex', 'Duplex'),
('powerconsumption', 'Power level'),
('last_change', 'Last Change'),
]
return Dictionary(
title=_('CDP cache'),
elements=[
('remove_domain',
FixedValue(
True,
title=_('Remove domain name from neighbour device name'),
totext=_(''),
default_value=False,
)),
('domain_name',
TextAscii(
title=_('Specific domain name to remove from neighbour device name'),
allow_empty=False,
default_value='',
)),
('removecolumns',
ListChoice(
title=_('List of columns to remove'),
help=_('information to remove from inventory'),
choices=removecolumns,
default_value=[],
)),
('use_short_if_name',
FixedValue(
True,
title=_('use short interface names (i.e. Gi0/0 for GigabitEthernet0/0)'),
totext=_(''),
default_value=False,
)),
],
)
rulespec_registry.register(
HostRulespec(
group=RulespecGroupInventory,
match_type='dict',
name='inv_parameters:inv_cdp_cache',
valuespec=_valuespec_inv_cdp_cache,
))
No preview for this file type
......@@ -6,15 +6,14 @@
'Changelog:\n'
' - 2018-01-24: added local interface\n'
' - 2020-03-15: added support for CMK1.6x\n'
' - 2021-03-16: rewrite for CMK 2.0\n',
' - 2021-03-16: rewrite for CMK 2.0\n'
' - 2023-02-17: modified for CMK 2.1\n',
'download_url': 'https://thl-cmk.hopto.org',
'files': {'agent_based': ['inv_cdp_cache.py'],
'web': ['plugins/views/inv_cdp_cache.py',
'plugins/wato/inv_cdp_cache.py']},
'gui': ['views/inv_cdp_cache.py', 'wato/inv_cdp_cache.py']},
'name': 'inv_cdp_cache',
'num_files': 3,
'title': 'Inventory for Cisco CDP Cache',
'version': '20210719.v0.4c',
'version.min_required': '2.0.0',
'version.packaged': '2021.09.20',
'version': '20230217.v0.5',
'version.min_required': '2.1.0',
'version.packaged': '2.1.0p21',
'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