-
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.
15517 FIX check_cert: Fixed metrics in output
The active check for monitoring certificates produces two metrics by now. These metrics have been written in a broken format and therefore never been created. This is now fixed and both metrics are now available. The affected metrics are * certificate_remaining_validity (is also used for Perf-O-Meter) * overall_execution_time CMK-17766 Change-Id: Icce810f87375e4b25e1662ec75068b89c66f193b
- Loading branch information
1 parent
c241ab1
commit 624d4de
Showing
3 changed files
with
59 additions
and
0 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,20 @@ | ||
[//]: # (werk v2) | ||
# check_cert: Fixed metrics in output | ||
|
||
key | value | ||
---------- | --- | ||
date | 2024-09-23T14:48:43+00:00 | ||
version | 2.4.0b1 | ||
class | fix | ||
edition | cre | ||
component | checks | ||
level | 2 | ||
compatible | yes | ||
|
||
The active check for monitoring certificates produces two metrics by now. | ||
These metrics have been written in a broken format and therefore never | ||
been created. This is now fixed and both metrics are now available. | ||
|
||
The affected metrics are | ||
* certificate_remaining_validity (is also used for Perf-O-Meter) | ||
* overall_execution_time |
24 changes: 24 additions & 0 deletions
24
cmk/plugins/collection/graphing/check_cert_certificate_remaining_validity.py
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,24 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (C) 2024 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.graphing.v1 import metrics, perfometers, Title | ||
|
||
UNIT_TIME = metrics.Unit(metrics.TimeNotation()) | ||
|
||
metric_certificate_remaining_validity = metrics.Metric( | ||
name="certificate_remaining_validity", | ||
title=Title("Remaining certificate validity time"), | ||
unit=UNIT_TIME, | ||
color=metrics.Color.YELLOW, | ||
) | ||
|
||
perfometer_certificate_remaining_validity = perfometers.Perfometer( | ||
name="certificate_remaining_validity", | ||
focus_range=perfometers.FocusRange( | ||
perfometers.Closed(0), | ||
perfometers.Open(15552000), # 180 days | ||
), | ||
segments=["certificate_remaining_validity"], | ||
) |
15 changes: 15 additions & 0 deletions
15
cmk/plugins/collection/graphing/check_cert_overall_response_time.py
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,15 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (C) 2024 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.graphing.v1 import metrics, Title | ||
|
||
UNIT_TIME = metrics.Unit(metrics.TimeNotation()) | ||
|
||
metric_overall_response_time = metrics.Metric( | ||
name="overall_response_time", | ||
title=Title("Overall response time"), | ||
unit=UNIT_TIME, | ||
color=metrics.Color.ORANGE, | ||
) |