Skip to content

Commit

Permalink
Adds updates for checkmk 2.0 (freddy36#12)
Browse files Browse the repository at this point in the history
* renames Bakery ruleset file

* adds ignored_keys for cmk-update-config

* renames checkman files

* fixes wrong section

* adds check for CRE in bakery plugin

Thank you @gurubert
  • Loading branch information
gurubert authored Feb 4, 2022
1 parent 80c8d28 commit 0601d26
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 53 deletions.
Binary file removed bird/bird-4.0.mkp
Binary file not shown.
Binary file added bird/bird-4.5.mkp
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions bird/lib/check_mk/base/plugins/agent_based/bird.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def check_bird_protocols(item, params, section) -> CheckResult:
register.check_plugin(
name="bird6_status",
service_name="BIRD6 Status",
sections=["bird"],
sections=["bird6"],
discovery_function=discover_bird_status,
check_function=check_bird_status,
check_default_parameters=_bird_status_default_levels,
Expand All @@ -474,7 +474,7 @@ def check_bird_protocols(item, params, section) -> CheckResult:
register.check_plugin(
name="bird6_memory",
service_name="BIRD6 Memory",
sections=["bird"],
sections=["bird6"],
discovery_function=discover_bird_memory,
check_function=check_bird_memory,
check_default_parameters={},
Expand All @@ -494,7 +494,7 @@ def check_bird_protocols(item, params, section) -> CheckResult:
register.check_plugin(
name="bird6_protocols",
service_name="BIRD6 Protocol %s",
sections=["bird"],
sections=["bird6"],
discovery_function=discover_bird_protocols,
check_function=check_bird_protocols,
check_default_parameters=_bird_protocols_default_levels,
Expand Down
47 changes: 0 additions & 47 deletions bird/lib/check_mk/gui/cee/plugins/wato/agent_bakery/bird.py

This file was deleted.

9 changes: 6 additions & 3 deletions bird/web/plugins/wato/bird.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def _parameter_valuespec_bird_status():
default_value = 60
),
),
]
],
ignored_keys = ['config_files', 'memory', 'protocols', 'status', 'version'],
)

rulespec_registry.register(
Expand All @@ -78,7 +79,8 @@ def _parameter_valuespec_bird_memory():
]
),
)
]
],
ignored_keys = ['config_files', 'memory', 'protocols', 'status', 'version'],
)

# bird.protocols
Expand Down Expand Up @@ -120,7 +122,8 @@ def _parameter_valuespec_bird_protocols():
( "route_stats_levels_limit_warning_factor",
Percentage(title = _("Warning level for limit based thresholds"), unit = _("percent"), default_value = 90, minvalue = 0, maxvalue = 100),
)
]
],
ignored_keys = ['config_files', 'memory', 'protocols', 'status', 'version'],
)

def _item_spec_bird_protocols():
Expand Down
52 changes: 52 additions & 0 deletions bird/web/plugins/wato/bird_cee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env python3
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4

# This file is part of the check_mk bird check.
#
# The check_mk bird check is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# The check_mk bird check is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with it. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright 2014 by Frederik Kriewitz <[email protected]>.

try:
from cmk.gui.i18n import _
from cmk.gui.plugins.wato import (
HostRulespec,
rulespec_registry,
)
from cmk.gui.cee.plugins.wato.agent_bakery.rulespecs.utils import RulespecGroupMonitoringAgentsAgentPlugins
from cmk.gui.valuespec import (
DropdownChoice,
)

def _valuespec_agent_config_bird():
return DropdownChoice(
title = _("BIRD Internet Routing Daemon (Linux)"),
help = _("This will deploy the agent plugin <tt>bird</tt> for checking the BIRD Internet Routing Daemon."),
choices = [
( True, _("Deploy plugin for BIRD") ),
( None, _("Do not deploy plugin for BIRD") ),
]
)

rulespec_registry.register(
HostRulespec(
group=RulespecGroupMonitoringAgentsAgentPlugins,
name="agent_config:bird",
valuespec=_valuespec_agent_config_bird,
))

except ModuleNotFoundError:
# RAW edition
pass

0 comments on commit 0601d26

Please sign in to comment.