-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
17516 FIX Stormshield: Cluster Member: add missing ruleset
SUP-21754 Change-Id: I774c2057063c6c88b1d3f14d57652f55aec30daa
- Loading branch information
Showing
4 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[//]: # (werk v2) | ||
# Stormshield: Cluster Member: add missing ruleset | ||
|
||
key | value | ||
---------- | --- | ||
date | 2025-01-07T15:44:30+00:00 | ||
version | 2.3.0p25 | ||
class | fix | ||
edition | cre | ||
component | checks | ||
level | 1 | ||
compatible | yes | ||
|
||
The plugin _"Stormshield: Cluster Member"_ referred to a ruleset that did not exist. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (C) 2025 Checkmk GmbH - License: GNU General Public License v2 | ||
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and | ||
# conditions defined in the file COPYING, which is part of this source code package. | ||
|
||
from cmk.rulesets.v1 import Title | ||
from cmk.rulesets.v1.form_specs import ( | ||
DefaultValue, | ||
DictElement, | ||
Dictionary, | ||
LevelDirection, | ||
Percentage, | ||
SimpleLevels, | ||
) | ||
from cmk.rulesets.v1.rule_specs import CheckParameters, HostAndItemCondition, Topic | ||
|
||
|
||
def _parameter_form_quality() -> Dictionary: | ||
return Dictionary( | ||
elements={ | ||
"quality": DictElement( | ||
required=True, | ||
parameter_form=SimpleLevels( | ||
title=Title("Lower levels on quality"), | ||
level_direction=LevelDirection.LOWER, | ||
form_spec_template=Percentage(), | ||
prefill_fixed_levels=DefaultValue(value=(80.0, 50.0)), | ||
), | ||
) | ||
}, | ||
) | ||
|
||
|
||
rule_spec_stormshield_quality = CheckParameters( | ||
name="stormshield_quality", | ||
topic=Topic.APPLICATIONS, | ||
parameter_form=_parameter_form_quality, | ||
title=Title("Stormshield quality"), | ||
condition=HostAndItemCondition(item_title=Title("Node index")), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters