Skip to content

Commit c52e7e0

Browse files
committed
19740 Ship process discovery rule for the OTel Collector
Add a default process discovery rule for the otelcol process so it is automatically monitored on Checkmk servers, and register it as a new default rule for existing sites during update. CMK-33090 Change-Id: I76f08832550f920e62d16dfa3354778cc5e9326d
1 parent fe39a52 commit c52e7e0

4 files changed

Lines changed: 31 additions & 2 deletions

File tree

.werks/19740.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[//]: # (werk v3)
2+
# Ship process discovery rule for the OTel Collector
3+
4+
key | value
5+
---------- | ---
6+
date | 2026-04-09T16:25:44.760655+00:00
7+
version | 2.5.0b5
8+
class | feature
9+
edition | ultimate
10+
component | wato
11+
level | 1
12+
compatible | yes
13+
14+
Checkmk now ships a default process discovery rule for the OpenTelemetry Collector
15+
process (`otelcol`). This means the OTel Collector is automatically monitored on
16+
Checkmk servers, just like other site processes such as RabbitMQ or the automation
17+
helpers.
18+
19+
Existing sites will receive this rule automatically during the next update.

cmk/gui/watolib/sample_config/_constants.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@
192192
"rrdcached",
193193
"~/omd/sites/[^/]+/bin/rrdcached",
194194
),
195+
(
196+
"a0a69c72-d9ba-412a-a8cb-7a9a6abb4c6b",
197+
"otel-collector",
198+
"~/omd/sites/[^/]+/bin/otelcol",
199+
),
195200
]
196201
]
197202

cmk/update_config/plugins/actions/rulesets_add_ps_discovery.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
RABBITMQ_RULE_ID = "65a3dca4-8d71-45d8-8887-53ef0c63d06f"
1818
AUTOMATION_HELPER_RULE_ID = "94190e27-2836-488a-b6b4-f23f694a455e"
1919
UI_JOB_SCHEDULER_RULE_ID = "8b5616fb-a457-404e-a136-24065da7f170"
20+
OTEL_COLLECTOR_RULE_ID = "a0a69c72-d9ba-412a-a8cb-7a9a6abb4c6b"
2021
PROXMOX_RULE_IDS = frozenset(
2122
{
2223
"c7850d9b-847b-4ae6-b1a7-dc7b1d82a04e",
@@ -25,7 +26,9 @@
2526
"23bd2fc2-a834-421c-8b7f-c790377f9d59",
2627
}
2728
)
28-
_NEW_DEFAULT_RULE_IDS = frozenset({UI_JOB_SCHEDULER_RULE_ID}) | PROXMOX_RULE_IDS
29+
_NEW_DEFAULT_RULE_IDS = (
30+
frozenset({UI_JOB_SCHEDULER_RULE_ID, OTEL_COLLECTOR_RULE_ID}) | PROXMOX_RULE_IDS
31+
)
2932

3033

3134
class UpdatePSDiscovery(UpdateAction):

tests/unit/cmk/update_config/plugins/actions/test_rulesets_add_ps_discovery.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
_NEW_DEFAULT_RULE_IDS,
1616
add_ps_discovery_rules,
1717
AUTOMATION_HELPER_RULE_ID,
18+
OTEL_COLLECTOR_RULE_ID,
1819
overwrite_ps_discovery_rules,
1920
PROXMOX_RULE_IDS,
2021
PS_DISCOVERY_RULE_NAME,
@@ -70,8 +71,9 @@ def test_update_with_preexisting_ui_job_scheduler() -> None:
7071
add_ps_discovery_rules(logging.getLogger(), rulesets)
7172

7273
ruleset = rulesets.get_rulesets()[PS_DISCOVERY_RULE_NAME]
73-
assert ruleset.num_rules() == 1 + len(PROXMOX_RULE_IDS)
74+
assert ruleset.num_rules() == 1 + len(PROXMOX_RULE_IDS) + 1 # +1 for otel-collector
7475
assert rule_present(ruleset, UI_JOB_SCHEDULER_RULE_ID)
76+
assert rule_present(ruleset, OTEL_COLLECTOR_RULE_ID)
7577

7678

7779
@pytest.mark.usefixtures("request_context")

0 commit comments

Comments
 (0)