Skip to content

Commit 84e7af5

Browse files
rm-cmkJenkins
authored andcommitted
fireeye_mail: ruleset migration
CMK-37689 Change-Id: Ic6d630d3084f15428e6b5460a8203a4bd41ab9a4
1 parent 0e91f61 commit 84e7af5

2 files changed

Lines changed: 35 additions & 36 deletions

File tree

cmk/gui/plugins/wato/check_parameters/fireeye_mail.py

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env python3
2+
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
3+
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
4+
# conditions defined in the file COPYING, which is part of this source code package.
5+
6+
from cmk.rulesets.v1 import Help, Title
7+
from cmk.rulesets.v1.form_specs import DefaultValue, DictElement, Dictionary, Integer
8+
from cmk.rulesets.v1.rule_specs import CheckParameters, HostCondition, Topic
9+
10+
11+
def _parameter_form() -> Dictionary:
12+
return Dictionary(
13+
elements={
14+
"interval": DictElement(
15+
parameter_form=Integer(
16+
title=Title("Timespan for mail rate computation"),
17+
help_text=Help(
18+
"If set, the mail rates are averaged over this timespan. "
19+
"Without it, the rate of the last check interval is reported."
20+
),
21+
unit_symbol="minutes",
22+
prefill=DefaultValue(60),
23+
),
24+
),
25+
},
26+
)
27+
28+
29+
rule_spec_fireeye_mail = CheckParameters(
30+
name="fireeye_mail",
31+
title=Title("FireEye mail rate average"),
32+
topic=Topic.APPLICATIONS,
33+
condition=HostCondition(),
34+
parameter_form=_parameter_form,
35+
)

0 commit comments

Comments
 (0)