Skip to content

fix: Emit sys metrics from k8s peons.#19305

Merged
gianm merged 2 commits intoapache:masterfrom
gianm:k8s-peon-sysmetrics
Apr 16, 2026
Merged

fix: Emit sys metrics from k8s peons.#19305
gianm merged 2 commits intoapache:masterfrom
gianm:k8s-peon-sysmetrics

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Apr 14, 2026

Currently the SysMonitor and OshiSysMonitor are both skipped for peons, on the logic that they are redundant to the MiddleManager (see #12802). However, with the Kubernetes runner, we launch peons directly and we want them to emit sys metrics.

To make it possible to differentiate these cases, this patch adds a property "druid.peon.managed" that informs the MetricsModule that the peon is managed by another process and should not emit metrics.

Currently the SysMonitor and OshiSysMonitor are both skipped for peons,
on the logic that they are redundant to the MiddleManager (see apache#12802).
However, with the Kubernetes runner, we launch peons directly and we
want them to emit sys metrics.

To make it possible to differentiate these cases, this patch adds a
property "druid.peon.managed" that informs the MetricsModule that the
peon is managed by another process and should not emit metrics.
Copy link
Copy Markdown
Contributor

@capistrant capistrant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea. The MetricsModuleTest fail is legit as the change breaks the validation since the new property is not set there, to get the noop monitor. Other test fails look unrelated

@gianm gianm merged commit 98e8c8a into apache:master Apr 16, 2026
63 of 64 checks passed
@gianm gianm deleted the k8s-peon-sysmetrics branch April 16, 2026 16:45
@github-actions github-actions Bot added this to the 38.0.0 milestone Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants