From 668be9eddfcfd6af95a87399bdf2f09a37b2a7e4 Mon Sep 17 00:00:00 2001
From: thl-cmk <thl-cmk@outlook.com>
Date: Wed, 7 Jun 2023 08:03:27 +0000
Subject: [PATCH] Delete active_checks_ntp.py

---
 web/plugins/wato/active_checks_ntp.py | 184 --------------------------
 1 file changed, 184 deletions(-)
 delete mode 100644 web/plugins/wato/active_checks_ntp.py

diff --git a/web/plugins/wato/active_checks_ntp.py b/web/plugins/wato/active_checks_ntp.py
deleted file mode 100644
index 4d3ad4e..0000000
--- a/web/plugins/wato/active_checks_ntp.py
+++ /dev/null
@@ -1,184 +0,0 @@
-#!/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  : 2022-10-04
-# File  : wato/active_checks_ntp.py
-#
-
-from cmk.gui.i18n import _
-from cmk.gui.valuespec import (
-    Dictionary,
-    Tuple,
-    Transform,
-    Integer,
-    TextAscii,
-    MonitoringState,
-)
-
-from cmk.gui.plugins.wato import (
-    rulespec_registry,
-    HostRulespec,
-)
-
-from cmk.gui.plugins.wato.active_checks import (
-    RulespecGroupActiveChecks
-)
-
-
-def _valuespec_active_checks_ntp():
-    return Transform(
-        Dictionary(
-            title=_('Check NTP service'),
-            help=_(''),
-            elements=[
-                ('description',
-                 TextAscii(
-                     title=_('Service description'),
-                     help=_(
-                         'Must be unique for every host. The service description starts always with \"NTP server\".'),
-                     size=50,
-                 )),
-                ('server',
-                 TextAscii(
-                     title=_('Server IP-address or name'),
-                     help=_(
-                         'Hostname or IP-address to monitor. Default is the host name/IP-Address of the monitored host.'
-                     ),
-                     size=50,
-                 )),
-                ('port',
-                 Integer(
-                     title=_('NTP port'),
-                     help=_('UDP Port to use. Default is 123.'),
-                     # size=5,
-                     default_value=123,
-                     minvalue=1,
-                     maxvalue=65535,
-                 )),
-                ('version',
-                 Integer(
-                     title=_('NTP version'),
-                     help=_('NTP version for the request. Default is version 4.'),
-                     # size=1,
-                     default_value=4,
-                     minvalue=1,
-                     maxvalue=4,
-                 )),
-                ('timeout',
-                 Integer(
-                     title=_('Request timeout'),
-                     help=_('Timeoute for the request in seconds. Min: 1s, Max: 20, Default is 2 seconds.'),
-                     # size=3,
-                     default_value=2,
-                     minvalue=1,
-                     maxvalue=20,
-                 )),
-                ('state_not_synchronized',
-                 MonitoringState(
-                     title=_('Monitoring state if server is not synchronized'),
-                     help=_('Monitoring state if server is not synchronized. Default is warning.'),
-                     default_value=2,
-                 )),
-                ('state_no_response',
-                 MonitoringState(
-                     default_value=2,
-                     title=_('Monitoring state if server doesn\'t respond (timeout)'),
-                     help=_('Monitoring state if the server doesn\'t respond. Default is "CRIT"')
-                 )),
-                ('stratum_levels',
-                 Tuple(
-                     title=_('max. stratum'),
-                     elements=[
-                         Integer(
-                             title=_('Warning at'),
-                             default_value=10,
-                             maxvalue=255,
-                             minvalue=1,
-                             help=_(
-                                 'The stratum (\'distance\' to the reference clock) at which the check gets warning.'),
-                         ),
-                         Integer(
-                             title=_('Critical at'),
-                             default_value=15,
-                             maxvalue=18,
-                             help=_(
-                                 'The stratum (\'distance\' to the reference clock) at which the check gets critical.'),
-                         )
-                     ],
-                 )),
-                ('offset_levels',
-                 Tuple(
-                     title=_('max. offset in ms'),
-                     help=_('Mean offset in the times reported between this local host and the remote peer or server.'
-                            'Note: This levels will also be used as lower levels.'),
-                     elements=[
-                         Integer(
-                             title=_('Warning at'),
-                             unit='ms',
-                             default_value=200,
-                             help=_('The offset in ms at which a warning state is triggered. Default is 200ms'),
-                         ),
-                         Integer(
-                             title=_('Critical at'),
-                             unit='ms',
-                             default_value=500,
-                             help=_('The offset in ms at which a critical state is triggered. Default is 500ms'),
-                         )
-                     ],
-                 )),
-                ('delay_levels',
-                 Tuple(
-                     title=_('max. delay in ms'),
-                     help=_('Upper levels for delay in milly seconds.'),
-                     elements=[
-                         Integer(
-                             title=_('Warning at'),
-                             unit='ms',
-                             default_value=200,
-                             help=_('The delay in ms at which a warning state is triggered. Default is 200ms'),
-                         ),
-                         Integer(
-                             title=_('Critical at'),
-                             unit='ms',
-                             default_value=500,
-                             help=_('The delay in s at which a critical state is triggered. Default is 500ms'),
-                         )
-                     ],
-                 )),
-                ('dispersion_levels',
-                 Tuple(
-                     title=_('max. root dispersion in s'),
-                     help=_('Upper levels for (root) dispersion in seconds.'),
-                     elements=[
-                         Integer(
-                             title=_('Warning at'),
-                             unit='s',
-                             default_value=3,
-                             help=_('The dispersion in s at which a warning state is triggered. Default is 3s'),
-                         ),
-                         Integer(
-                             title=_('Critical at'),
-                             unit='s',
-                             default_value=5,
-                             help=_('The dispersion in s at which a critical state is triggered. Default is 5s'),
-                         )
-                     ],
-                 )),
-            ],
-        ),
-    )
-
-
-rulespec_registry.register(
-    HostRulespec(
-        group=RulespecGroupActiveChecks,
-        match_type='all',
-        name='active_checks:ntp',
-        valuespec=_valuespec_active_checks_ntp,
-    )
-)
-- 
GitLab