feat(host_metrics source): add temperature metrics collector#25607
feat(host_metrics source): add temperature metrics collector#25607somaz94 wants to merge 4 commits into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34f8b6fec3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
34f8b6f to
4c51702
Compare
|
Thanks for the approval @evazorro! CLA is signed and CI is green. It looks like this still needs a second review to land. Anything I can do to help move it along? |
|
Hi @somaz94, I checked in with the dev team and they can review it after you've resolved the comments from the AI review tool. More information here: https://github.com/vectordotdev/vector/blob/master/AI_POLICY.md#ai-review-comments Thanks for contributing! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 438cb1c41f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Head branch was pushed to by a user without write access
Summary
Adds a
temperaturecollector to thehost_metricssource. When enabled, it reads hardware temperature sensors viasysinfo::Componentsand emits three gauges, each tagged with thecomponentlabel of the sensor it was read from:temperature_celsius— current temperaturetemperature_max_celsius— highest recorded temperaturetemperature_critical_celsius— critical threshold (only when the sensor reports one)The collector is opt-in (it is not part of the default collector set). Many environments where Vector runs — containers, virtual machines, most cloud instances — expose no temperature sensors, so enabling it by default would add a per-scrape
Componentsrefresh that yields nothing. Users addtemperaturetocollectorsto turn it on. Components that do not report a given value are skipped, and hosts without sensors simply produce no metrics.Closes: #21389
Vector configuration
How did you test this PR?
generates_temperature_metricsunit test that asserts every emitted metric is a gauge namedtemperature*and carries thecomponenttag. The test tolerates an empty result so it also passes in sensorless CI environments.generated/host_metrics.cue) for the newtemperaturecollector enum value.Change Type
Is this a breaking change?
Does this PR include user facing changes?
changelog.d/.no-changeloglabel to this PR.References