datadog-checks-base 37.6.0__py2.py3-none-any.whl → 37.7.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- datadog_checks/base/__about__.py +1 -1
- datadog_checks/base/checks/base.py +0 -10
- datadog_checks/base/stubs/aggregator.py +1 -1
- datadog_checks/base/utils/fips.py +30 -0
- {datadog_checks_base-37.6.0.dist-info → datadog_checks_base-37.7.0.dist-info}/METADATA +1 -1
- {datadog_checks_base-37.6.0.dist-info → datadog_checks_base-37.7.0.dist-info}/RECORD +7 -7
- {datadog_checks_base-37.6.0.dist-info → datadog_checks_base-37.7.0.dist-info}/WHEEL +0 -0
datadog_checks/base/__about__.py
CHANGED
|
@@ -164,8 +164,6 @@ class AgentCheck(object):
|
|
|
164
164
|
# See https://github.com/DataDog/integrations-core/pull/2093 for more information.
|
|
165
165
|
DEFAULT_METRIC_LIMIT = 0
|
|
166
166
|
|
|
167
|
-
HA_SUPPORTED = False
|
|
168
|
-
|
|
169
167
|
# Allow tracing for classic integrations
|
|
170
168
|
def __init_subclass__(cls, *args, **kwargs):
|
|
171
169
|
try:
|
|
@@ -314,14 +312,6 @@ class AgentCheck(object):
|
|
|
314
312
|
if os.environ.get("GOFIPS", "0") == "1":
|
|
315
313
|
enable_fips()
|
|
316
314
|
|
|
317
|
-
ha_enabled_init = self.init_config.get('ha_enabled', False) if self.init_config else False
|
|
318
|
-
ha_enabled_instance = self.instance.get('ha_enabled', False) if self.instance else False
|
|
319
|
-
|
|
320
|
-
if not self.HA_SUPPORTED and (ha_enabled_init or ha_enabled_instance):
|
|
321
|
-
raise ConfigurationError(
|
|
322
|
-
f"High Availability is enabled for check {self.name} but this integration does not support it"
|
|
323
|
-
)
|
|
324
|
-
|
|
325
315
|
def _create_metrics_pattern(self, metric_patterns, option_name):
|
|
326
316
|
all_patterns = metric_patterns.get(option_name, [])
|
|
327
317
|
|
|
@@ -385,7 +385,7 @@ class AggregatorStub(object):
|
|
|
385
385
|
if hostname is not None and hostname != sc.hostname:
|
|
386
386
|
continue
|
|
387
387
|
|
|
388
|
-
if message is not None and message
|
|
388
|
+
if message is not None and re.search(message, sc.message) is None:
|
|
389
389
|
continue
|
|
390
390
|
|
|
391
391
|
candidates.append(sc)
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
# All rights reserved
|
|
3
3
|
# Licensed under a 3-clause BSD style license (see LICENSE)
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import os
|
|
7
|
+
import sys
|
|
8
|
+
|
|
9
|
+
LOGGER = logging.getLogger(__file__)
|
|
6
10
|
|
|
7
11
|
|
|
8
12
|
def enable_fips(path_to_openssl_conf=None, path_to_openssl_modules=None):
|
|
@@ -24,6 +28,32 @@ def enable_fips(path_to_openssl_conf=None, path_to_openssl_modules=None):
|
|
|
24
28
|
os.environ["OPENSSL_MODULES"] = str(path_to_openssl_modules)
|
|
25
29
|
|
|
26
30
|
|
|
31
|
+
def is_enabled():
|
|
32
|
+
enabled = False
|
|
33
|
+
# On Windows, FIPS mode is activated through a registry:
|
|
34
|
+
# https://csrc.nist.gov/CSRC/media/projects/cryptographic-module-validation-program/documents/security-policies/140sp4825.pdf
|
|
35
|
+
# We copy the Agent's implementation for this function:
|
|
36
|
+
# https://github.com/DataDog/datadog-agent/tree/main/pkg/fips
|
|
37
|
+
if sys.platform == "win32":
|
|
38
|
+
try:
|
|
39
|
+
import winreg
|
|
40
|
+
|
|
41
|
+
with winreg.OpenKey(
|
|
42
|
+
winreg.HKEY_LOCAL_MACHINE, r"SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy"
|
|
43
|
+
) as key:
|
|
44
|
+
fips_registry, _ = winreg.QueryValueEx(key, "Enabled")
|
|
45
|
+
enabled = fips_registry == 1
|
|
46
|
+
except Exception as e:
|
|
47
|
+
LOGGER.debug(
|
|
48
|
+
"Windows error encountered when fetching FipsAlgorithmPolicy registry key,\
|
|
49
|
+
assuming FIPS mode is disabled: %s",
|
|
50
|
+
e,
|
|
51
|
+
)
|
|
52
|
+
else:
|
|
53
|
+
enabled = os.environ.get("GOFIPS", "0") == "1"
|
|
54
|
+
return enabled
|
|
55
|
+
|
|
56
|
+
|
|
27
57
|
def _get_embedded_path():
|
|
28
58
|
import sys
|
|
29
59
|
from pathlib import Path
|
|
@@ -3,7 +3,7 @@ datadog_checks/config.py,sha256=PrAXGdlLnoV2VMQff_noSaSJJ0wg4BAiGnw7jCQLSik,196
|
|
|
3
3
|
datadog_checks/errors.py,sha256=eFwmnrX-batIgbu-iJyseqAPNO_4rk1UuaKK89evLhg,155
|
|
4
4
|
datadog_checks/log.py,sha256=orvOgMKGNEsqSTLalCAQpWP-ouorpG1A7Gn-j2mRD80,301
|
|
5
5
|
datadog_checks/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
|
|
6
|
-
datadog_checks/base/__about__.py,sha256=
|
|
6
|
+
datadog_checks/base/__about__.py,sha256=uC9MNosQSG_gx-e-sqvVM7JrsKTSw1P50Ns6IDQUAko,138
|
|
7
7
|
datadog_checks/base/__init__.py,sha256=rSTDo6-2p_RX6I6wnuXrNMglaatoLRyZFTE5wbHZY8s,1466
|
|
8
8
|
datadog_checks/base/agent.py,sha256=nX9x_BYYizRKGNYfXq5z7S0FZ9xcX_wd2tuxpGe3_8k,350
|
|
9
9
|
datadog_checks/base/config.py,sha256=qcAA4X9sXQZRdwQe8DgiGd2980VBp1SQA0d695tX_tU,604
|
|
@@ -13,7 +13,7 @@ datadog_checks/base/errors.py,sha256=fPcFaR3zHpSkMo8epvF3lRe9KrEnS8g4J0dXM_nvzsw
|
|
|
13
13
|
datadog_checks/base/log.py,sha256=3P5Tq-kWZkqx5AtvQhUk89O1s-5YnE49LJ8xeeKcvB8,6344
|
|
14
14
|
datadog_checks/base/types.py,sha256=anajZS0W0TsxUHJQw-JHOP2NSeuC9BisXSy9mAStlxQ,1623
|
|
15
15
|
datadog_checks/base/checks/__init__.py,sha256=a0Wv-Od0BYUA45z37eVOvugflTZMijgGSOuJqndE3DU,263
|
|
16
|
-
datadog_checks/base/checks/base.py,sha256=
|
|
16
|
+
datadog_checks/base/checks/base.py,sha256=QlDA7UxnbiN2oY5sKZ4zhb5h1S9quf9BkIM1o9AedkU,58037
|
|
17
17
|
datadog_checks/base/checks/network.py,sha256=UijP1OVBCpCNKMy6bVkNazHgy6Sdm8qCvCYGPaWuTDo,1968
|
|
18
18
|
datadog_checks/base/checks/kube_leader/__init__.py,sha256=rEM1wqMkx8JLvJpYNHMOy6OdPmCwQ46JSOfE3QDApyY,399
|
|
19
19
|
datadog_checks/base/checks/kube_leader/base_check.py,sha256=2LIRU6a2cJb4byM4Q3v1SVVJjQW8NjVJr_yUKOfjKjU,708
|
|
@@ -85,7 +85,7 @@ datadog_checks/base/checks/windows/perf_counters/transformers/temporal_percent.p
|
|
|
85
85
|
datadog_checks/base/checks/windows/perf_counters/transformers/time_elapsed.py,sha256=hWM8CHYSqFnFYrNdr1NFY464nMAVFOiN8jhlhZTOb78,513
|
|
86
86
|
datadog_checks/base/stubs/__init__.py,sha256=wpWAR9v7BiTbbmTO6pVpshqa_z-PWaYTr33wSTZLz3c,272
|
|
87
87
|
datadog_checks/base/stubs/_util.py,sha256=ZDGtQa8F3cHf8-QvSVHMB4BGI3C9VgC7sGcGGvO0apI,1268
|
|
88
|
-
datadog_checks/base/stubs/aggregator.py,sha256=
|
|
88
|
+
datadog_checks/base/stubs/aggregator.py,sha256=Px4JgZNjh-vMHibfGR452ZiA3kUiHA02ZUIDK70d62A,24448
|
|
89
89
|
datadog_checks/base/stubs/common.py,sha256=ZGzF2dXy1uVFQGdG_bvz_pMMiULaBcpzra_k9wo9f04,1088
|
|
90
90
|
datadog_checks/base/stubs/datadog_agent.py,sha256=u4e8ZFSt4CO9mxuZ4UinteIJOyLKQgzcHFa0pTzRaCY,5995
|
|
91
91
|
datadog_checks/base/stubs/log.py,sha256=A-eWnzY5gTpTW41Zch-W5CVclzldlmhMTW-vDNFdT1o,836
|
|
@@ -98,7 +98,7 @@ datadog_checks/base/utils/constants.py,sha256=QwTey4CWB0NAxm2rcD-wPYRkEyglekQIrA
|
|
|
98
98
|
datadog_checks/base/utils/containers.py,sha256=LBqUzERHxx5TdgcWVQTq1A1WaGCMhzXT9k4Gn0fX3J8,2753
|
|
99
99
|
datadog_checks/base/utils/date.py,sha256=JJmqP84CgVcFJ0cvAmMu8EtM6v96tIESucQNm9eKeEc,2780
|
|
100
100
|
datadog_checks/base/utils/diagnose.py,sha256=eLMe0tISpkzS3yxVR83IHxorQJfHT_Xi6Cq4zzRNxVI,5285
|
|
101
|
-
datadog_checks/base/utils/fips.py,sha256=
|
|
101
|
+
datadog_checks/base/utils/fips.py,sha256=vxm3K7wTQKYenP1LbXk7pmJ8WA6l367BTJGBNO0DkvQ,2490
|
|
102
102
|
datadog_checks/base/utils/functions.py,sha256=iGlybxR6aPPElNxNb2ELOzbk328j9OVBAxredJxdCRw,695
|
|
103
103
|
datadog_checks/base/utils/headers.py,sha256=0SSdC71jwaB61BODfusahCVr1c56GvT9iwt7cidcHP0,1779
|
|
104
104
|
datadog_checks/base/utils/http.py,sha256=TcOdwoFKggxr_VsCEQoXlxFFGS-n9UYz4pDZH2zxjoM,40516
|
|
@@ -200,6 +200,6 @@ datadog_checks/utils/tracing.py,sha256=HQbQakKM-Lw75MDkItaYJYipS6YO24Z_ymDVxDsx5
|
|
|
200
200
|
datadog_checks/utils/prometheus/__init__.py,sha256=8WwXnM9g1sfS5267QYCJX_hd8MZl5kRgBgQ_SzdNdXs,161
|
|
201
201
|
datadog_checks/utils/prometheus/functions.py,sha256=4vWsTGLgujHwdYZo0tlAQkqDPHofqUJM3k9eItJqERQ,197
|
|
202
202
|
datadog_checks/utils/prometheus/metrics_pb2.py,sha256=xg3UdUHe4TjeR4s13LUKZ2U1WVSt6U6zjsVRG6lX6dc,173
|
|
203
|
-
datadog_checks_base-37.
|
|
204
|
-
datadog_checks_base-37.
|
|
205
|
-
datadog_checks_base-37.
|
|
203
|
+
datadog_checks_base-37.7.0.dist-info/METADATA,sha256=PZB-HV-qp0-y24D_xbNPaucom3CEhb-kaDpnQ7LOmhs,3591
|
|
204
|
+
datadog_checks_base-37.7.0.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
|
205
|
+
datadog_checks_base-37.7.0.dist-info/RECORD,,
|
|
File without changes
|