Skip to content

Commit

Permalink
never discover string params XXI: checks/[w-z]*
Browse files Browse the repository at this point in the history
Change-Id: I26dcdfb78c5ea66fd6c9c9cfaa60ad1420029928
  • Loading branch information
mo-ki committed Apr 6, 2023
1 parent 6ae78dc commit 1f59162
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
8 changes: 2 additions & 6 deletions checks/wagner_titanus_topsense
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ wagner_titanus_topsense_info = [
]


def wagner_titanus_topsense_scan(oid):
return oid(".1.3.6.1.2.1.1.2.0") in [".1.3.6.1.4.1.34187.21501", ".1.3.6.1.4.1.34187.74195"]


def parse_wagner_titanus_topsens(info):
# not much of a parse function. simply retrieves the info blocks that apply for the
# respective topsens model and returns only those
Expand Down Expand Up @@ -334,8 +330,8 @@ wagner_titanus_topsense_airflow_deviation_default_values = (-20.0, -20.0, 20.0,

def inventory_wagner_titanus_topsense_airflow_deviation(info):
return [
("1", "wagner_titanus_topsense_airflow_deviation_default_values"),
("2", "wagner_titanus_topsense_airflow_deviation_default_values"),
("1", wagner_titanus_topsense_airflow_deviation_default_values),
("2", wagner_titanus_topsense_airflow_deviation_default_values),
]


Expand Down
2 changes: 1 addition & 1 deletion checks/winperf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def inventory_win_diskstat(info):
for line in info:
try:
if line[0] == "2:16" or line[0] == "2:18":
return [(None, None, None)]
return [(None, None)]
except Exception:
pass
return []
Expand Down
6 changes: 1 addition & 5 deletions checks/wut_webtherm
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ from cmk.base.check_legacy_includes.humidity import * # pylint: disable=wildcar
from cmk.base.check_legacy_includes.temperature import * # pylint: disable=wildcard-import,unused-wildcard-import


def detect_webtherm(oid):
return oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.5040.1.2.")


def parse_wut_webtherm(info):
map_sensor_type = {
"1": "temp",
Expand Down Expand Up @@ -144,7 +140,7 @@ wut_webtherm_humidity_defaultlevels = (35, 40, 60, 65)

def inventory_wut_webtherm_humidity(parsed):
return [
(sensor_id, "wut_webtherm_humidity_defaultlevels")
(sensor_id, wut_webtherm_humidity_defaultlevels)
for sensor_id, values in parsed.items()
if values["type"] == "humid"
]
Expand Down
4 changes: 2 additions & 2 deletions cmk/base/check_legacy_includes/wmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def inventory_wmi_table_instances( # type: ignore[no-untyped-def]
tables: WMISection,
required_tables: Iterable[str] | None = None,
filt: Callable[[WMISection, str | int], bool] | None = None,
levels=None,
levels: tuple | dict | None = None, # important for now: not str!
):
if required_tables is None:
required_tables = tables
Expand All @@ -140,7 +140,7 @@ def inventory_wmi_table_total( # type: ignore[no-untyped-def]
tables: WMISection,
required_tables: Iterable[str] | None = None,
filt: Callable[[WMISection, None], bool] | None = None,
levels=None,
levels: tuple | dict | None = None, # important for now: not str!
):
if required_tables is None:
required_tables = tables
Expand Down

0 comments on commit 1f59162

Please sign in to comment.