Skip to content

[vSphere][virtualmachine] Add support for additional metrics - #10942

Merged
lucian-ioan merged 23 commits into
elastic:mainfrom
lucian-ioan:update_vsphere_virtual_machine_integration
Sep 20, 2024
Merged

[vSphere][virtualmachine] Add support for additional metrics#10942
lucian-ioan merged 23 commits into
elastic:mainfrom
lucian-ioan:update_vsphere_virtual_machine_integration

Conversation

@lucian-ioan

@lucian-ioan lucian-ioan commented Aug 30, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

Following beats code changes in elastic/beats#40485, the following metrics need integration update:

Metrics API Field Mappings
VirtualMachine.Summary.QuickStats.UptimeSeconds Summary virtualmachine.uptime
VirtualMachine.Summary.OverallStatus Summary virtualmachine.status
VirtualMachine.Summary.Datastore Summary virtualmachine.datastore.names
Alerts  
triggerd_alarms.name Name of the alarm.
triggerd_alarms.id Unique key that identifies the alarm.
triggerd_alarms.status Overall status of the alarm object.
triggerd_alarms.triggered_time Time the alarm triggered.
triggerd_alarms.description Description of the alarm.
triggerd_alarms.entity_name alarm happened in respective entity
Snapshot
snapshot.info.id Unique ID of the snapshot.
snapshot.info.name Name of the snapshot.
snapshot.info.description Description of the snapshot.
snapshot.info.createtime Time the snapshot was created.
snapshot.info.state State of the snapshot (e.g., poweredOn).
snapshot.count Total number of snapshots.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

Author's Checklist

  • Create Snapshot of Metricbeat changes.
  • Use Snapshot to make the changes in the vSphere Integration Host datastream.
  • Update the system and pipeline changes.
  • Add versioning to changelog.
  • Test the Integration for metric collection.
  • Test Integration from TSDB Perspective.
  • Code review.

How to test this PR locally

Related issues

Screenshots

@lucian-ioan lucian-ioan added enhancement New feature or request Integration:vsphere VMware vSphere Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] labels Aug 30, 2024
@lucian-ioan
lucian-ioan requested a review from ishleenk17 August 30, 2024 08:04
@lucian-ioan lucian-ioan self-assigned this Aug 30, 2024
@lucian-ioan
lucian-ioan marked this pull request as ready for review August 30, 2024 08:16
@lucian-ioan
lucian-ioan requested a review from a team as a code owner August 30, 2024 08:16
@elasticmachine

Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Total CPU in Mhz.
- name: cpu.free.mhz
type: long
metric_type: gauge

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason to remove these metric_types?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, reverting, tested first with beats code directly.

- name: name
type: keyword
# Reason to add as a dimension field: Each VM has Unique name assigned
dimension: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lucian-ioan : I suppose you are using the fields.yml directly from the beats code.
That would not be correct as we don't consider tsdb there.
Also, for any new fields please keep TSDB into consideration.

@@ -59,37 +59,58 @@
},
"vsphere": {
"virtualmachine": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are these events autogenerated by system tests ?
Looks like these are being used from beats code ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Tested with beats code, regenerated it now.

Comment thread packages/vsphere/changelog.yml Outdated
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.14.0-next"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lets update this to latest 1.15.0-next

type: long
metric_type: gauge
description: The number of snapshots of this virtualmachine.
- name: triggerd_alarms.*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This needs to incorporate the latest change of this name change yesterday.
"triggered_alamrs"

- name: period
type: text
title: Period
description: The vSphere performance API allows for collecting host and datastore metrics at various intervals, including real-time (every 20 seconds), 5 minutes, or longer durations. Properly configuring the "period" parameter is crucial to manage usage restrictions and ensure accurate data collection. For more information on optimizing your data collection setup, refer to the [Data Collection Intervals](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.monitoring.doc/GUID-247646EA-A04B-411A-8DD4-62A3DCFCF49B.html) and [Data Collection Levels](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.monitoring.doc/GUID-25800DE4-68E5-41CC-82D9-8811E27924BC.html) documentation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Change the description as discussed yesterday

@niraj-elastic

Copy link
Copy Markdown
Contributor

@lucian-ioan Please add tags in hbs file.

@ishleenk17

Copy link
Copy Markdown
Member

Update description of commit PR with the snapshot fields as well

@ishleenk17 ishleenk17 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!
Let the CI pass

@lucian-ioan
lucian-ioan dismissed niraj-elastic’s stale review September 20, 2024 05:27

Addressed changes, merging today.

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @lucian-ioan

@lucian-ioan
lucian-ioan merged commit 69dc708 into elastic:main Sep 20, 2024
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package vsphere - 1.15.0 containing this change is available at https://epr.elastic.co/search?package=vsphere

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
@lucian-ioan
lucian-ioan deleted the update_vsphere_virtual_machine_integration branch February 6, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Integration:vsphere VMware vSphere Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]

5 participants