-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat][vSphere] Support for configurable IntervalId for performance API #40678
Merged
kush-elastic
merged 36 commits into
elastic:main
from
kush-elastic:36-vsphere-support-for-configurable-intervalid-for-performance-api
Sep 11, 2024
Merged
Changes from 32 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
04ae955
initial commit for intervalId supports for performance metrics
kush-elastic 2e5d6a1
Merge branch 'main' into 36-vsphere-support-for-configurable-interval…
kush-elastic 831b070
Merge branch 'main' into 36-vsphere-support-for-configurable-interval…
kush-elastic 1704e6e
update docs and fix CI
kush-elastic 2e995ba
Add changelog entry
kush-elastic 3727a3b
fix CI
kush-elastic 416177c
resolve review comments
kush-elastic d2ac1b6
fix loggers
kush-elastic 23fd9e4
resolved review comments
kush-elastic 8da1d2a
update versions
kush-elastic ab175fd
update UTs
kush-elastic 6b08b73
update integration tests
kush-elastic 48e72b7
10s -> 20s
kush-elastic 24bfb61
Merge branch 'main' into 36-vsphere-support-for-configurable-interval…
kush-elastic 7b38b73
Update CHANGELOG.next.asciidoc
kush-elastic 587aac6
Update metricbeat/docs/modules/vsphere.asciidoc
kush-elastic d5cd481
make update
kush-elastic 0c4cb23
add recover for ToMetricSeries panic
kush-elastic 7907f68
return error instead just logging it.
kush-elastic 1806e5c
remove restriction of interval IDs
kush-elastic 417703a
remove unnecessary validations
kush-elastic 7fc5691
Merge branch 'main' into 36-vsphere-support-for-configurable-interval…
kush-elastic ad1c095
remove recover and add empty condition
kush-elastic c538f15
update changelog entry
kush-elastic 0a156c8
Merge branch 'main' into 36-vsphere-support-for-configurable-interval…
kush-elastic 9808c1e
Fix wrapping of errors in loggers
kush-elastic 5a79756
update data.json
kush-elastic a2ee751
update data.json
kush-elastic 09f540c
fix CI and loggers
kush-elastic d17fa70
Merge branch 'main' into 36-vsphere-support-for-configurable-interval…
kush-elastic 4013033
update changelog entries
kush-elastic 3edf243
make update
kush-elastic 2c55bfe
Merge branch 'main' of https://github.com/kush-elastic/beats into 36-…
kush-elastic 8f162b3
fix changelog entries
kush-elastic 99be228
update changelog entry
kush-elastic 1002544
Merge branch 'main' into 36-vsphere-support-for-configurable-interval…
kush-elastic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
- module: vsphere | ||
enabled: true | ||
metricsets: ["cluster", "datastore", "datastorecluster", "host", "network", "resourcepool", "virtualmachine"] | ||
# Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds. | ||
|
||
# Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds by default. | ||
# Supported Periods: | ||
# The Datastore and Host metricsets support performance data collection using the vSphere performance API. | ||
# Since the performance API has usage restrictions based on data collection intervals, | ||
# users should ensure that the period is configured optimally to receive real-time data. | ||
# users can still collect summary metrics if performance metrics are not supported for the configured instance. | ||
# This configuration can be determined based on the Data Collection Intervals and Data Collection Levels. | ||
# Reference Links: | ||
# Data Collection Intervals: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.monitoring.doc/GUID-247646EA-A04B-411A-8DD4-62A3DCFCF49B.html | ||
# Data Collection Levels: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.monitoring.doc/GUID-25800DE4-68E5-41CC-82D9-8811E27924BC.html | ||
period: 20s | ||
hosts: ["https://localhost/sdk"] | ||
|
||
username: "user" | ||
password: "password" | ||
# If insecure is true, don't verify the server's certificate chain | ||
insecure: false | ||
# Get custom fields when using virtualmachine metric set. Default false. | ||
# Get custom fields when using virtualmachine metricset. Default false. | ||
# get_custom_fields: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,76 @@ | ||
The vSphere module uses the https://github.com/vmware/govmomi[Govmomi] library to collect metrics from any Vmware SDK URL (ESXi/VCenter). This library is built for and tested against ESXi and vCenter 5.5, 6.0 and 6.5. | ||
The vSphere module uses the https://github.com/vmware/govmomi[Govmomi] library to collect metrics from any VMware SDK URL (ESXi/VCenter). | ||
|
||
By default it enables the metricsets `cluster`, `datastore`, `datastorecluster`, `host`, `network`, `resourcepool` and `virtualmachine`. | ||
This module has been tested against ESXi and vCenter versions 5.5, 6.0, 6.5, and 7.0.3. | ||
|
||
By default, the vSphere module enables the following metricsets: | ||
|
||
1. cluster | ||
|
||
2. datastore | ||
|
||
3. datastorecluster | ||
|
||
4. host | ||
|
||
5. network | ||
|
||
6. resourcepool | ||
|
||
7. virtualmachine | ||
|
||
[float] | ||
=== Supported Periods: | ||
The Datastore and Host metricsets support performance data collection using the vSphere performance API. Given that the performance API imposes usage restrictions based on data collection intervals, users should configure the period optimally to ensure the receipt of real-time data. This configuration can be determined based on the https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.monitoring.doc/GUID-247646EA-A04B-411A-8DD4-62A3DCFCF49B.html[Data Collection Intervals] and https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.monitoring.doc/GUID-25800DE4-68E5-41CC-82D9-8811E27924BC.html[Data Collection Levels]. | ||
|
||
[IMPORTANT] | ||
|
||
Only host and datastore metricsets have limitation of system configured period from vSphere instance. Users can still collect summary metrics if performance metrics are not supported for the configured instance. | ||
|
||
[float] | ||
==== Real-time data collection default interval: | ||
- 20s | ||
|
||
[float] | ||
==== Historical data collection default intervals: | ||
- 300s | ||
- 1800s | ||
- 7200s | ||
- 86400s | ||
|
||
[float] | ||
=== Example: | ||
If you need to configure multiple metricsets with different periods, you can achieve this by setting up multiple vSphere modules with different metricsets as demonstrated below: | ||
|
||
[source,yaml] | ||
---- | ||
- module: vsphere | ||
metricsets: | ||
- cluster | ||
- datastorecluster | ||
- network | ||
- resourcepool | ||
- virtualmachine | ||
period: 10s | ||
hosts: ["https://localhost/sdk"] | ||
username: "user" | ||
password: "password" | ||
insecure: false | ||
|
||
- module: vsphere | ||
metricsets: | ||
- datastore | ||
- host | ||
period: 300s | ||
hosts: ["https://localhost/sdk"] | ||
username: "user" | ||
password: "password" | ||
insecure: false | ||
---- | ||
|
||
[float] | ||
=== Dashboard | ||
|
||
The vsphere module comes with a predefined dashboard. For example: | ||
The vSphere module includes a predefined dashboard. For example: | ||
|
||
image::./images/metricbeat_vsphere_dashboard.png[] | ||
image::./images/metricbeat_vsphere_vm_dashboard.png[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we also mention that this will not impact the metrics collection other than perf metrics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea. let me do that.