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

update project

parent 3260629a
No related branches found
No related tags found
No related merge requests found
......@@ -9,16 +9,19 @@
#
# inventory of cisco wlc aps
#
# 2016-08-22 : removed index column
# 2018-08-04 : changed scan function, code cleanup
# 2018-09-04 : changes for CMK 1.5.x (inv_tree --> inv_tree_list)
# 2021-07-11 : rewritten for CMK 2.0
# 2016-08-22: removed index column
# 2018-08-04: changed scan function, code cleanup
# 2018-09-04: changes for CMK 1.5.x (inv_tree --> inv_tree_list)
# 2020-03-15: added support for CMK1.6x
# 2021-07-11: rewritten for CMK 2.0
# 2021-07-15: added support for Catalyst 9800 Controllers
from cmk.base.plugins.agent_based.agent_based_api.v1 import (
register,
SNMPTree,
TableRow,
contains,
any_of,
)
from cmk.base.plugins.agent_based.agent_based_api.v1.type_defs import (
StringTable,
......@@ -223,15 +226,15 @@ def parse_inv_cisco_wlc_aps_lwap(string_table: StringTable):
for ap in string_table:
wlcprimaryaddress = ap[5]
if _inet_address_type.get(int(ap[4])) == 'ipv4':
if _inet_address_type.get(ap[4]) == 'ipv4':
wlcprimaryaddress = _render_ip_address(wlcprimaryaddress)
wlcsecondaryaddress = ap[7]
if _inet_address_type.get(int(ap[6])) == 'ipv4':
if _inet_address_type.get(ap[6]) == 'ipv4':
wlcsecondaryaddress = _render_ip_address(wlcsecondaryaddress)
wlctertiaryaddress = ap[9]
if _inet_address_type.get(int(ap[8])) == 'ipv4':
if _inet_address_type.get(ap[8]) == 'ipv4':
wlctertiaryaddress = _render_ip_address(wlctertiaryaddress)
aps.append({
......@@ -323,7 +326,6 @@ def inventory_cisco_wlc_aps_lwap(params, section) -> InventoryResult:
status_columns.pop(entry)
except KeyError:
pass
yield TableRow(
path=path,
key_columns=key_columns,
......@@ -397,7 +399,10 @@ register.snmp_section(
'85', # cLApBleFWDownloadStatus
]
),
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
......@@ -12,7 +12,7 @@
'name': 'inv_cisco_wlc_aps_lwap',
'num_files': 3,
'title': 'inventory for CISCO-LWAPP-AP-MIB',
'version': '20210711.v0.4',
'version': '20210715.v0.4a',
'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
......@@ -8,20 +8,27 @@ from cmk.gui.plugins.views.inventory import declare_invtable_view
inventory_displayhints.update({
'.networking.wlan.controller.accesspoints_lwap:': {'title' : _('Access Points LWAP info'),
'keyorder': ['name', 'if_mac_address', ],
'view' : 'invwlcapslwap_of_host',
},
'.networking.wlan.controller.accesspoints_lwap:': {
'title': _('Access Points LWAP info'),
'keyorder': [
'name', 'if_mac_address', 'admin', 'power_status', 'led_state', 'last_reboot_reason', 'telnet', 'ssh',
'encryption_supported', 'encryption', 'data_encryption', 'wips',
],
'view': 'invwlcapslwap_of_host',
},
'.networking.wlan.controller.accesspoints_lwap:*.name' : {'title': _('Name')},
'.networking.wlan.controller.accesspoints_lwap:*.if_mac_address' : {'title': _('MAC Address')},
'.networking.wlan.controller.accesspoints_lwap:*.admin' : {'title': _('Admin state')},
'.networking.wlan.controller.accesspoints_lwap:*.last_reboot_reason' : {'title': _('Last reboot reason')},
'.networking.wlan.controller.accesspoints_lwap:*.power_status' : {'title': _('Power status')},
'.networking.wlan.controller.accesspoints_lwap:*.led_state' : {'title': _('LED state')},
'.networking.wlan.controller.accesspoints_lwap:*.last_reboot_reason' : {'title': _('Last reboot reason')},
'.networking.wlan.controller.accesspoints_lwap:*.telnet' : {'title': _('Telnet enabled'), 'short': _('Telnet')},
'.networking.wlan.controller.accesspoints_lwap:*.ssh' : {'title': _('SSH enabled'), 'short': _('SSH')},
'.networking.wlan.controller.accesspoints_lwap:*.encryption_supported' : {'title': _('Encryption supported')},
'.networking.wlan.controller.accesspoints_lwap:*.encryption' : {'title': _('Encryption enabled')},
'.networking.wlan.controller.accesspoints_lwap:*.data_encryption' : {'title': _('Data encryption')},
'.networking.wlan.controller.accesspoints_lwap:*.wips' : {'title': _('wireless IPS,')},
'.networking.wlan.controller.accesspoints_lwap:*.rogue_detection' : {'title': _('Rogue detection enabled'), 'short': _('Rouge detection')},
'.networking.wlan.controller.accesspoints_lwap:*.pwr_injector_state' : {'title': _('Pow. inj. state')},
'.networking.wlan.controller.accesspoints_lwap:*.pwr_injector_selection' : {'title': _('Pow. inj. selection')},
......@@ -30,11 +37,9 @@ inventory_displayhints.update({
'.networking.wlan.controller.accesspoints_lwap:*.wlc_primary_address' : {'title': _('primary WLC')},
'.networking.wlan.controller.accesspoints_lwap:*.wlc_secondary_address' : {'title': _('secondary WLC')},
'.networking.wlan.controller.accesspoints_lwap:*.wlc_tertiary_address' : {'title': _('tertiary WLC')},
'.networking.wlan.controller.accesspoints_lwap:*.max_#_of_dot11_slots' : {'title': _('max # of dot11 slots')},
'.networking.wlan.controller.accesspoints_lwap:*.max_#_of_ethernet_slots' : {'title': _('max # of ethernet slots')},
'.networking.wlan.controller.accesspoints_lwap:*.failover_priority' : {'title': _('failover priority')},
'.networking.wlan.controller.accesspoints_lwap:*.wips' : {'title': _('wireless IPS,')},
'.networking.wlan.controller.accesspoints_lwap:*.monitor_mode_optimization' : {'title': _('monitor mode optimization')},
'.networking.wlan.controller.accesspoints_lwap:*.amsdu' : {'title': _('Aggregate MAC Service Data Unit'), 'short': _('AMSDU')},
'.networking.wlan.controller.accesspoints_lwap:*.tcp_mss' : {'title': _('TCP MSS')},
......@@ -43,7 +48,6 @@ inventory_displayhints.update({
'.networking.wlan.controller.accesspoints_lwap:*.venue_config_venue_type' : {'title': _('Venue type')},
'.networking.wlan.controller.accesspoints_lwap:*.venue_config_venue_name' : {'title': _('Venue name')},
'.networking.wlan.controller.accesspoints_lwap:*.venue_config_language' : {'title': _('Venue language')},
'.networking.wlan.controller.accesspoints_lwap:*.led_state' : {'title': _('LED state')},
'.networking.wlan.controller.accesspoints_lwap:*.trunk_vlan' : {'title': _('Mgmt VLAN ID')},
'.networking.wlan.controller.accesspoints_lwap:*.trunk_vlan_status' : {'title': _('Mgmt VLAN tagged state')},
'.networking.wlan.controller.accesspoints_lwap:*.location' : {'title': _('Location')},
......
......@@ -16,9 +16,21 @@ from cmk.gui.plugins.wato.inventory import (
RulespecGroupInventory,
)
_removecolumns = [
_removecolumns_cisco_wlc_aps_lwap = [
# ('name', 'Name'),
# (if_mac_address', 'MAC Address'),
# ('admin', 'Admin state'),
# ('power_status', 'Power status'),
# ('led_state', 'LED state'),
# ('last_reboot_reason', 'Last reboot reason'),
# ('telnet', 'Telnet enabled'),
# ('ssh', 'SSH enabled'),
# ('encryption_supported', 'Encryption supported'),
# ('data_encryption', 'Data encryption'),
# ('encryption', 'Encryption enabled'),
# ('wips', 'wireless IPS,'),
('adj_channel_rogue_enabled', 'Adj. channel rogue'),
('admin', 'Admin state'),
('amsdu', 'Aggregate MAC Service Data Unit'),
('antenna_band_mode', 'Antenna band mode'),
('is_master', 'AP is master'),
......@@ -26,13 +38,8 @@ _removecolumns = [
('submode', 'AP submode'),
('universal_prime_status', 'AP universal prime status'),
('ble_fw_download_status', 'Ble FW downaload status'),
('data_encryption', 'Data encryption'),
('encryption', 'Encryption enabled'),
('encryption_supported', 'Encryption supported'),
('failover_priority', 'failover priority'),
('floor_label', 'Floor label'),
('last_reboot_reason', 'Last reboot reason'),
('led_state', 'LED state'),
('location', 'Location'),
('max_#_of_dot11_slots', 'max # of dot11 slots'),
('max_#_of_ethernet_slots', 'max # of ethernet slots'),
......@@ -45,17 +52,14 @@ _removecolumns = [
('module_inserted', 'Module inserted'),
('monitor_mode_optimization', 'monitor mode optimization'),
('port_number', 'Port number'),
('power_status', 'Power status'),
('pwr_injector_selection', 'Pow. inj. selection'),
('pwr_injector_state', 'Pow. inj. state'),
('pwr_injector_sw_mac_addr', 'Pow. inj. MAC address'),
('pwr_pre_std_state', 'PoE pre standard'),
('real_time_stats_mode_enabled', 'Real time stats'),
('rogue_detection', 'Rogue detection enabled'),
('ssh', 'SSH enabled'),
('sys_net_id', 'Sys net ID'),
('tcp_mss', 'TCP MSS'),
('telnet', 'Telnet enabled'),
('upgrade_failure_cause', 'Upgrade failure cause'),
('upgrade_from_version', 'Upgrade from version'),
('upgrade_to_version', 'Upgrade to version'),
......@@ -63,12 +67,23 @@ _removecolumns = [
('venue_config_venue_group', 'Venue group'),
('venue_config_venue_name', 'Venue name'),
('venue_config_venue_type', 'Venue type'),
('wips', 'wireless IPS,'),
('wlc_primary_address', 'primary WLC'),
('wlc_secondary_address', 'secondary WLC'),
('wlc_tertiary_address', 'tertiary WLC'),
]
_removecolumns_defaul_cisco_wlc_aps_lwap = [
'adj_channel_rogue_enabled', 'amsdu', 'is_master', 'is_universal', 'submode',
'universal_prime_status', 'max_client_limit_cause', 'ble_fw_download_status', 'antenna_band_mode',
'module_inserted', 'floor_label', 'max_client_limit_set', 'enable_module',
'pwr_injector_sw_mac_addr', 'pwr_injector_selection', 'pwr_injector_state', 'pwr_pre_std_state',
'trunk_vlan', 'trunk_vlan_status', 'tcp_mss', 'monitor_mode_optimization', 'sys_net_id',
'upgrade_failure_cause', 'upgrade_from_version', 'upgrade_to_version', 'venue_config_language',
'venue_config_venue_group', 'venue_config_venue_name', 'port_number', 'venue_config_venue_type',
'max_#_of_dot11_slots', 'max_#_of_ethernet_slots', 'failover_priority', 'wlc_primary_address',
'wlc_secondary_address', 'wlc_tertiary_address'
]
def _valuespec_inv_cisco_wlc_aps_lwap():
return Dictionary(
......@@ -78,18 +93,8 @@ def _valuespec_inv_cisco_wlc_aps_lwap():
ListChoice(
title=_('list of columns to remove'),
help=_('information to remove from inventory'),
choices=_removecolumns,
default_value=[
'adj_channel_rogue_enabled', 'amsdu', 'is_master', 'is_universal', 'submode',
'universal_prime_status', 'max_client_limit_cause', 'ble_fw_download_status', 'antenna_band_mode',
'module_inserted', 'floor_label', 'max_client_limit_set', 'enable_module',
'pwr_injector_sw_mac_addr', 'pwr_injector_selection', 'pwr_injector_state', 'pwr_pre_std_state',
'trunk_vlan', 'trunk_vlan_status', 'tcp_mss', 'monitor_mode_optimization', 'sys_net_id',
'upgrade_failure_cause', 'upgrade_from_version', 'upgrade_to_version', 'venue_config_language',
'venue_config_venue_group', 'venue_config_venue_name', 'port_number', 'venue_config_venue_type',
'max_#_of_dot11_slots', 'max_#_of_ethernet_slots', 'failover_priority', 'wlc_primary_address',
'wlc_secondary_address', 'wlc_tertiary_address'
],
choices=_removecolumns_cisco_wlc_aps_lwap,
default_value=_removecolumns_defaul_cisco_wlc_aps_lwap,
)),
],
)
......
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