Skip to content

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

Merged
stefans-elastic merged 7 commits into8.19from
mergify/bp/8.19/pr-44205
May 28, 2025
Merged

[8.19](backport #44205) capture extra vsphere metrics (cpu %, disk average, disk rate, disk n…#44495
stefans-elastic merged 7 commits into8.19from
mergify/bp/8.19/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)

# Conflicts:
#	auditbeat/module/file_integrity/mock_performance.go
#	auditbeat/module/file_integrity/performance.go
#	auditbeat/module/file_integrity/performance_test.go
@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
@mergify mergify bot requested a review from a team as a code owner May 26, 2025 12:04
@mergify mergify bot added the conflicts There is a conflict in the backported pull request label May 26, 2025
@mergify
Copy link
Contributor Author

mergify bot commented May 26, 2025

Cherry-pick of 14ac057 has failed:

On branch mergify/bp/8.19/pr-44205
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit 14ac0571a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   CHANGELOG.next.asciidoc
	modified:   metricbeat/module/vsphere/datastore/datastore.go
	modified:   metricbeat/module/vsphere/fields.go
	modified:   metricbeat/module/vsphere/host/host.go
	modified:   metricbeat/module/vsphere/virtualmachine/_meta/fields.yml
	modified:   metricbeat/module/vsphere/virtualmachine/data.go
	modified:   metricbeat/module/vsphere/virtualmachine/virtualmachine.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	added by them:   auditbeat/module/file_integrity/mock_performance.go
	added by them:   auditbeat/module/file_integrity/performance.go
	added by them:   auditbeat/module/file_integrity/performance_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@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
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 18094c4 into 8.19 May 28, 2025
44 checks passed
@stefans-elastic stefans-elastic deleted the mergify/bp/8.19/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 conflicts There is a conflict in the backported pull request enhancement Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team

2 participants