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

Delete inv_cisco_flash.py

parent b7bfff58
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# License: GNU General Public License v2
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2019-10-28
#
# Cisco flash metrics plugin
#
# change log
# 2019-10-28: initial release
# 2021-07-31: rewritten for CMK 2.0
from cmk.gui.i18n import _
from cmk.gui.plugins.wato import (
HostRulespec,
rulespec_registry,
)
from cmk.gui.valuespec import (
Dictionary,
FixedValue,
ListChoice,
)
from cmk.gui.plugins.wato.inventory import (
RulespecGroupInventory,
)
_inv_cisco_flash_cflDeviceRemovecolumns = [
('minpartitionsize', 'min. partition size (MB)'),
('maxprtitions', 'max. partitions'),
('chipcount', 'Chip count'),
('controller', 'Controller'),
('programmingjumper', 'Programming jumper'),
('inittime', 'Init time'),
('removable', 'Removable'),
('physentindex', 'Phys entity index'),
('nameextended', 'Name extended'),
]
_inv_cisco_flash_cflPartitionRemovecolumns = [
('startchip', 'Start chip'),
('endchip', 'End chip'),
('crcsumalgo', 'Checksumm algorithm'),
('status', 'Status'),
('upgrademethod', 'Upgrade method'),
('neederasure', 'Need erasure'),
('filenamelength', 'File name length'),
('lowspacenotifythreshold', 'Low space notify threshold (%)'),
]
_inv_cisco_flash_cflChipRemovecolumns = [
('code', 'Code'),
('writeretries', 'Write retries'),
('eraseretries', 'Erase retries'),
('maxwriteretries', 'max. write retries'),
('maxeraseretries', 'max. erasure retries'),
]
def _valuespec_inv_cisco_flash():
return Dictionary(
title=_('Cisco flash inventory'),
elements=[
('cflDeviceDisable',
FixedValue(
True,
title=_('disable Flash device inventory'),
)),
('cflPartitionDisable',
FixedValue(
True,
title=_('disable Flash partition inventory'),
)),
('cflChipDisable',
FixedValue(
True,
title=_('disable Flash chips inventory'),
)),
('cflDeviceRemovecolumns',
ListChoice(
title=_('list of columns to remove from flash devices'),
help=_('information to remove from inventory'),
choices=_inv_cisco_flash_cflDeviceRemovecolumns,
default_value=[
'chipcount',
'controller',
'programmingjumper',
'inittime',
'physentindex',
'nameextended',
],
)),
('cflPartitionRemovecolumns',
ListChoice(
title=_('list of columns to remove from flash partitions'),
help=_('information to remove from inventory'),
choices=_inv_cisco_flash_cflPartitionRemovecolumns,
default_value=[
'startchip',
'endchip',
],
)),
('cflChipRemovecolumns',
ListChoice(
title=_('list of columns to remove from flash chips'),
help=_('information to remove from inventory'),
choices=_inv_cisco_flash_cflChipRemovecolumns,
default_value=[
'code',
'writeretries',
'eraseretries',
'maxwriteretries',
'maxeraseretries'
],
)),
],
)
rulespec_registry.register(
HostRulespec(
group=RulespecGroupInventory,
match_type='dict',
name='inv_parameters:inv_cisco_flash',
valuespec=_valuespec_inv_cisco_flash,
))
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