Skip to content

[9.0](backport #44205) capture extra vsphere metrics (cpu %, disk average, disk rate, disk n…#44496

Merged
stefans-elastic merged 4 commits into9.0from
mergify/bp/9.0/pr-44205
May 28, 2025
Merged

[9.0](backport #44205) capture extra vsphere metrics (cpu %, disk average, disk rate, disk n…#44496
stefans-elastic merged 4 commits into9.0from
mergify/bp/9.0/pr-44205

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented May 26, 2025

…umber, memory usage %)

Proposed commit message

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Using vcsim simulation of vSphere API not all metrics were available to check (it appears that vcsim doesn't generate disk usage metrics).
So only 2 of the new metrics were generated by vsim (cpu.percent and memory.percent):
Screenshot 2025-05-19 at 17 31 55

However when I tried commenting out the check if a metric is in list of "available" metrics in the code (line 70 in metricbeat/module/vsphere/client/performance.go) it showed more metrics:
Screenshot 2025-05-19 at 17 41 21

So only disk.numberWrite and disk.numberRead I wasn't able to test at all.

Logs


This is an automatic backport of pull request #44205 done by [Mergify](https://mergify.com).
#44205)

* capture extra vsphere metrics (cpu %, disk average, disk rate, disk number, memory usage %)

* add missing license headers

* mage fmt

* convert percentage values from fixed point integers

* add CHANGELOG.next.asciidoc entry

* refactor performance data fetching for datastore

* document new fields

* remove unused function

* remove debug log

* add unit tests

* mage fmt

* fixed precision issue for percentage performance manager values

* correct percentage property names

* converts kilobytes per sec to bytes per sec

* update fields.go

* fix linter

* fix type assertion pabic

* fix unit test failure

* address PR comments

* changed percentage fields to scaled_float type

* make field names same between fields.go and fields.yml

---------

Co-authored-by: Ishleen Kaur <102962586+ishleenk17@users.noreply.github.com>
(cherry picked from commit 14ac057)
@mergify mergify bot added the backport label May 26, 2025
@mergify mergify bot requested a review from a team as a code owner May 26, 2025 12:04
@mergify mergify bot added the backport label May 26, 2025
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 26, 2025
@github-actions github-actions bot added enhancement Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team labels May 26, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 26, 2025
@stefans-elastic stefans-elastic requested a review from a team as a code owner May 27, 2025 12:11
Copy link
Member

@ishleenk17 ishleenk17 left a comment

Choose a reason for hiding this comment

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

Backport PR

@stefans-elastic stefans-elastic merged commit 26ce6f2 into 9.0 May 28, 2025
173 checks passed
@stefans-elastic stefans-elastic deleted the mergify/bp/9.0/pr-44205 branch May 28, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport enhancement Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team

2 participants