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

update project

parent 93115d69
No related branches found
No related tags found
No related merge requests found
......@@ -9,12 +9,13 @@
#
# writen by: Th.L thl-cmk[at]outlook[dot]com
#
# 2016-08-22 : removed index column
# 2017-04-09 : added wato enable/disable, remove columns
# 2018-09-04 : changes for CMK 1.5.x (inv_tree --> inv_tree_list)
# 2020-03-15 : added support for CMK1.6x
# 2021-07-12 : rewritten for CMK 2.0
#
# 2016-08-22: removed index column
# 2017-04-09: added wato enable/disable, remove columns
# 2018-09-04: changes for CMK 1.5.x (inv_tree --> inv_tree_list)
# 2020-03-15: added support for CMK1.6x
# 2021-07-12: rewritten for CMK 2.0
# 2021-07-15: added support for Catalyst 9800 Controllers
import re
import time
......@@ -30,6 +31,7 @@ from cmk.base.plugins.agent_based.agent_based_api.v1 import (
SNMPTree,
TableRow,
contains,
any_of,
)
from cmk.base.plugins.agent_based.agent_based_api.v1.type_defs import (
StringTable,
......@@ -358,7 +360,10 @@ register.snmp_section(
'45', # cldcUserAuthType
]
),
detect=contains('.1.3.6.1.2.1.1.1.0', 'Cisco Controller'), # sysDescr
detect=any_of(
contains('.1.3.6.1.2.1.1.1.0', 'Cisco Controller'), # sysDescr
contains('.1.3.6.1.2.1.1.1.0', 'C9800 Software'), # sysDescr
)
)
register.inventory_plugin(
......
No preview for this file type
......@@ -4,7 +4,6 @@
'Via WATO you can:\n'
' - can add/remove some fields\n'
'\n'
'Tested with Cisco WLC 5520/5505/2504.\n'
'\n'
'2020-03.15: added support for CMK1.6x\n'
'2021-07-12: rewritten for CMK 2.0\n',
......@@ -15,7 +14,7 @@
'name': 'inv_cisco_wlc_clients',
'num_files': 3,
'title': 'inventory of cisco WLC clients',
'version': '20210712.v0.3',
'version': '20210715.v0.3a',
'version.min_required': '2.0.0',
'version.packaged': '2021.04.10',
'version.packaged': '2021.07.14',
'version.usable_until': None}
\ No newline at end of file
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import cmk.gui.utils
from cmk.gui.plugins.views import (
inventory_displayhints, )
from cmk.gui.i18n import _
from cmk.gui.plugins.views.inventory import declare_invtable_view
inventory_displayhints.update({
'.networking.wlan.controller.clients:': {'title': _('WLC clients'),
'keyorder': [
'index', 'username', 'uptime', 'ipaddress', 'apmacaddress', 'ssid',
'channel', 'accessvlan', 'devicetype', 'protocol', 'status',
],
'view': 'invwlcclients_of_host'},
'.networking.wlan.controller.clients:': {
'title': _('WLC clients'),
'keyorder': [
'index', 'username', 'uptime', 'ipaddress', 'apmacaddress', 'ssid',
'channel', 'accessvlan', 'devicetype', 'protocol', 'status',
],
'view': 'invwlcclients_of_host'},
'.networking.wlan.controller.clients:*.index': {'title': _('Index'), },
'.networking.wlan.controller.clients:*.macaddress': {'title': _('MAC Addresse'), },
'.networking.wlan.controller.clients:*.username': {'title': _('Username'), },
'.networking.wlan.controller.clients:*.uptime': {'title': _('Uptime'), },
'.networking.wlan.controller.clients:*.ipaddress': {'title': _('IP address'), },
'.networking.wlan.controller.clients:*.apmacaddress': {'title': _('AP MAC address'), },
'.networking.wlan.controller.clients:*.ssid': {'title': _('SSID'), },
'.networking.wlan.controller.clients:*.channel': {'title': _('Channel'), },
'.networking.wlan.controller.clients:*.accessvlan': {'title': _('Access VLAN'), },
'.networking.wlan.controller.clients:*.devicetype': {'title': _('Device type'), },
'.networking.wlan.controller.clients:*.protocol': {'title': _('Protocol'), },
'.networking.wlan.controller.clients:*.status': {'title': _('Status'), },
'.networking.wlan.controller.clients:*.macaddress': {'title': _('MAC Addresse'), },
'.networking.wlan.controller.clients:*.wlanprofilename': {'title': _('WLAN profile name'), },
'.networking.wlan.controller.clients:*.wgbstatus': {'title': _('WGB status'), },
'.networking.wlan.controller.clients:*.wgbmacaddress': {'title': _('WGB MAC address'), },
'.networking.wlan.controller.clients:*.protocol': {'title': _('Protocol'), },
'.networking.wlan.controller.clients:*.associationmode': {'title': _('Association mode'), },
'.networking.wlan.controller.clients:*.apmacaddress': {'title': _('AP MAC address'), },
'.networking.wlan.controller.clients:*.iftype': {'title': _('Interface type'), },
'.networking.wlan.controller.clients:*.ipaddress': {'title': _('IP address'), },
'.networking.wlan.controller.clients:*.nacstate': {'title': _('NAC state'), },
'.networking.wlan.controller.clients:*.quarantinevlan': {'title': _('Quarantine VLAN'), },
'.networking.wlan.controller.clients:*.accessvlan': {'title': _('Access VLAN'), },
'.networking.wlan.controller.clients:*.logintime': {'title': _('Login time'), },
'.networking.wlan.controller.clients:*.uptime': {'title': _('Uptime'), },
'.networking.wlan.controller.clients:*.powersavemode': {'title': _('Power save mode'), },
'.networking.wlan.controller.clients:*.currenttxrateset': {'title': _('Current TX rate (MBit/s)'), },
'.networking.wlan.controller.clients:*.datarateset': {'title': _('Data rate set'), },
......@@ -42,15 +47,12 @@ inventory_displayhints.update({
'.networking.wlan.controller.clients:*.redirecturl': {'title': _('Redirect URL'), },
'.networking.wlan.controller.clients:*.aaaoverrideaclname': {'title': _('AAA overide ACL name'), },
'.networking.wlan.controller.clients:*.aaaoverrideaclapplied': {'title': _('AAA overide ACL applied'), },
'.networking.wlan.controller.clients:*.username': {'title': _('Username'), },
'.networking.wlan.controller.clients:*.ssid': {'title': _('SSID'), },
'.networking.wlan.controller.clients:*.securitytagid': {'title': _('Security tag ID'), },
'.networking.wlan.controller.clients:*.typekts': {'title': _('NEC KTS SIP client'), },
'.networking.wlan.controller.clients:*.ipv6aclname': {'title': _('IPv6 ACL name'), },
'.networking.wlan.controller.clients:*.ipv6aclapplied': {'title': _('IPv6 ACL applied'), },
'.networking.wlan.controller.clients:*.dataswitching': {'title': _('Data switching'), },
'.networking.wlan.controller.clients:*.authentication': {'title': _('Authentication'), },
'.networking.wlan.controller.clients:*.channel': {'title': _('Channel'), },
'.networking.wlan.controller.clients:*.authmode': {'title': _('Auth mode'), },
'.networking.wlan.controller.clients:*.reasoncode': {'title': _('Reason code'), },
'.networking.wlan.controller.clients:*.sessionid': {'title': _('Session ID'), },
......@@ -59,7 +61,6 @@ inventory_displayhints.update({
'.networking.wlan.controller.clients:*.mdnsadvcount': {'title': _('mDNS adv count'), },
'.networking.wlan.controller.clients:*.policyname': {'title': _('Policy name'), },
'.networking.wlan.controller.clients:*.aaarole': {'title': _('AAA role'), },
'.networking.wlan.controller.clients:*.devicetype': {'title': _('Device type'), },
'.networking.wlan.controller.clients:*.userauthtype': {'title': _('User auth type'), },
})
......
......@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
#
#
from cmk.gui.i18n import _
from cmk.gui.plugins.wato import (
HostRulespec,
......@@ -16,12 +17,23 @@ from cmk.gui.plugins.wato.inventory import (
RulespecGroupInventory,
)
_removecolumns = [
_removecolumns_cisco_wlc_clients = [
# 'index': {'title', 'Index'),
# 'username': {'title', 'Username'),
# 'uptime': {'title', 'Uptime'),
# 'ipaddress': {'title', 'IP address'),
# 'apmacaddress': {'title', 'AP MAC address'),
# 'ssid': {'title', 'SSID'),
# 'channel': {'title', 'Channel'),
# 'accessvlan': {'title', 'Access VLAN'),
# 'devicetype': {'title', 'Device type'),
# 'protocol': {'title', 'Protocol'),
# 'status': {'title', 'Status'),
('ieee80211ucapable', '802.11u capable'),
('aaaoverrideaclapplied', 'AAA overide ACL applied'),
('aaaoverrideaclname', 'AAA overide ACL name'),
('aaarole', 'AAA role'),
('accessvlan', 'Access VLAN'),
('aclapplied', 'ACL applied'),
('aclname', 'ACL name'),
('aproammacaddress', 'AP roam MAC address'),
......@@ -67,9 +79,8 @@ def _valuespec_inv_cisco_wlc_clients():
ListChoice(
title=_('list of columns to remove'),
help=_('information to remove from inventory'),
choices=_removecolumns,
default_value=[
],
choices=_removecolumns_cisco_wlc_clients,
default_value=[],
)),
],
)
......@@ -79,6 +90,6 @@ rulespec_registry.register(
HostRulespec(
group=RulespecGroupInventory,
match_type='dict',
name='inv_cisco_wlc_clients',
name='inv_parameters:inv_cisco_wlc_clients',
valuespec=_valuespec_inv_cisco_wlc_clients,
))
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