Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

lucian-ioan
Copy link
Contributor

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

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 Label for the Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] labels Aug 30, 2024
@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

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

- name: cpu.free.mhz
type: long
metric_type: gauge
Copy link
Collaborator

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
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
Contributor

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
Contributor

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
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.

@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.14.0-next"
Copy link
Contributor

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
Contributor

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
Contributor

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
Contributor

@lucian-ioan Please add tags in hbs file.

@ishleenk17
Copy link
Contributor

Update description of commit PR with the snapshot fields as well

Copy link
Contributor

@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.

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

💚 Build Succeeded

History

cc @lucian-ioan

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

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

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 Label for the Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants