Skip to content

[vSphere][network] Create network datastream - #10993

Merged
lucian-ioan merged 19 commits into
elastic:mainfrom
lucian-ioan:update_vsphere_network_integration
Sep 23, 2024
Merged

[vSphere][network] Create network datastream#10993
lucian-ioan merged 19 commits into
elastic:mainfrom
lucian-ioan:update_vsphere_network_integration

Conversation

@lucian-ioan

@lucian-ioan lucian-ioan commented Sep 3, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

Following beats code changes in elastic/beats#40559, the following metrics are added to the network datastream:

Metrics Type Metrics API Field Mappings
Network/DistributedVirtualPort Network.OverallStatus Summary status
  Network.Summary.Accessible Summary accessible
  Network.ConfigStatus Summary config.status
  Network.type Summary type
  Network.Vm ExtraApi vm.names
    ExtraApi vm.count
  Network.Host ExtraApi host.names
    ExtraApi host.count
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

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

  • 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

TSDB testing

Values being used:
        elasticsearch_host = https://localhost:9200
        elasticsearch_ca_path = /home/lucian/.elastic-package/profiles/default/certs/elasticsearch/ca-cert.pem
        elasticsearch_user = elastic
        elasticsearch_pwd = changeme
        data_stream = metrics-vsphere.network-default
        docs_index = First index of the data stream
        settings_mappings_index = Last index of the data stream
        max_docs = All documents
        get_overlapping_files = True
        directory_overlapping_files = overwritten-docs-metrics-vsphere.network-default
        display_docs = 10
        copy_docs_per_dimension = 2

You're testing with version 8.15.2-SNAPSHOT.

Testing data stream metrics-vsphere.network-default.
Index being used for the documents is .ds-metrics-vsphere.network-default-2024.09.23-000001.
Index being used for the settings and mappings is .ds-metrics-vsphere.network-default-2024.09.23-000001.

The time series fields for the TSDB index are: 
        - dimension (9 fields):
                - agent.id
                - cloud.account.id
                - cloud.availability_zone
                - cloud.instance.id
                - cloud.provider
                - cloud.region
                - container.id
                - host.name
                - service.address
        - gauge (2 fields):
                - vsphere.network.host.count
                - vsphere.network.vm.count
        - routing_path (9 fields):
                - agent.id
                - cloud.account.id
                - cloud.availability_zone
                - cloud.instance.id
                - cloud.provider
                - cloud.region
                - container.id
                - host.name
                - service.address

Index tsdb-index-enabled successfully created.

Copying documents from .ds-metrics-vsphere.network-default-2024.09.23-000001 to tsdb-index-enabled...
All 12 documents taken from index .ds-metrics-vsphere.network-default-2024.09.23-000001 were successfully placed to index tsdb-index-enabled.
@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 Sep 3, 2024
@lucian-ioan lucian-ioan self-assigned this Sep 3, 2024
@lucian-ioan
lucian-ioan marked this pull request as ready for review September 6, 2024 10:08
@lucian-ioan
lucian-ioan requested a review from a team as a code owner September 6, 2024 10:08
@ishleenk17

Copy link
Copy Markdown
Member
  1. README is missing.
  2. update kibana version
  3. Perios has not been taken care in this
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.

change version to 1.15.0-next

type: long
metric_type: gauge
description: >
Number of virtual machines connected to this network. No newline at end of file

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.

Missing the latest fields

streams:
- input: vsphere/metrics
title: vSphere network metrics
description: vSphere network metrics No newline at end of file

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.

please add period here, along with other configuration parameters.

username: {{username}}
password: {{password}}
# If insecure is true, don't verify the server's certificate chain
insecure: {{insecure}} No newline at end of file

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.

please add tags and processors.

@lucian-ioan
lucian-ioan force-pushed the update_vsphere_network_integration branch from c424ec3 to 8966518 Compare September 22, 2024 19:42
@lucian-ioan lucian-ioan reopened this Sep 22, 2024
@elastic elastic deleted a comment from mergify Bot Sep 22, 2024
Comment thread packages/vsphere/changelog.yml Outdated
changes:
- description: Add new network datastream.
type: enhancement
link: https://github.com/elastic/integrations/pull/11205

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.

Incorrect PR number

description: >
If the host is a container.

- name: os.build

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.

These are ecs fields w/o dimensions. Not required here.

@ishleenk17

Copy link
Copy Markdown
Member

@lucian-ioan : Pls share details of TSDB testing

@@ -1,10 +1,13 @@
# newer versions go on top
- version: "1.15.0-next"

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.

Suggested change
- version: "1.15.0-next"
- version: "1.15.0"

As this PR is the last one we need to remove next tag and update version in manifest to 1.15.0.

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.

I guess so, should we do it with this PR @ishleenk17?

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 keep the next label as of now.
We will raise a PR when we are ready to release it.

"type": "Network"
}
}

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.

Suggested change

Empty Line

Comment on lines +53 to +56
},
"metricset": {
"name": "network",
"period": 20000

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.

This formatting seems wrong, can you check once?

Suggested change
},
"metricset": {
"name": "network",
"period": 20000
},
"metricset": {
"name": "network",
"period": 20000

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.

Should work fine but re-formatted it just in case.

@kush-elastic kush-elastic left a comment

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.

Added few comments

- name: names
type: keyword
description: >
Names of the virtual machines connected to this network.

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.

Suggested change
Names of the virtual machines connected to this network.
List of all the virtual machines connected to this network.

minor nit. Please do it for other similar fields as well.

@kush-elastic kush-elastic left a comment

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.

LGTM!

| vsphere.network.vm.count | Number of virtual machines connected to this network. | long | gauge |
| vsphere.network.vm.names | List of all the virtual machines connected to this network. | keyword | |


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.

Suggested change

@lucian-ioan lucian-ioan Sep 23, 2024

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.

I don't think this is necessary, it's the default format for all data streams in docs.

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @lucian-ioan

@niraj-elastic

Copy link
Copy Markdown
Contributor

LGTM

@lucian-ioan
lucian-ioan merged commit 00ed51b into elastic:main Sep 23, 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_network_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