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][datastore] Add support for additional metrics #10911

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2004252
update event
lucian-ioan Aug 28, 2024
a2c2591
update fields.yml
lucian-ioan Aug 28, 2024
d81254b
add changelog entry
lucian-ioan Aug 28, 2024
e9147ab
update sample event
lucian-ioan Aug 28, 2024
2eb74a8
elastic-package build
lucian-ioan Aug 28, 2024
11a135b
fix sample event
lucian-ioan Aug 28, 2024
8ce790b
fix vsphere name and fstype
lucian-ioan Aug 28, 2024
321a5e2
follow changelog guidelines
lucian-ioan Sep 2, 2024
0cbd1bc
update fields
lucian-ioan Sep 2, 2024
0677108
better field descriptions
lucian-ioan Sep 2, 2024
3b98122
update sample event
lucian-ioan Sep 2, 2024
38b42aa
package build
lucian-ioan Sep 2, 2024
2cb93db
add metric types
lucian-ioan Sep 3, 2024
9f6b19f
revert dockerfile
lucian-ioan Sep 3, 2024
73366a7
add dockerfile newline
lucian-ioan Sep 3, 2024
6a47c43
add period
lucian-ioan Sep 18, 2024
57aad0b
add triggered alarms
lucian-ioan Sep 18, 2024
4c5186f
Merge branch 'main' into update_vsphere_datastore_integration
lucian-ioan Sep 18, 2024
4c457aa
add disk capacity fields
lucian-ioan Sep 18, 2024
7bb821b
add metric types
lucian-ioan Sep 18, 2024
7cad138
update tag
lucian-ioan Sep 18, 2024
5333a11
update version to 1.15.0-next
lucian-ioan Sep 19, 2024
73a1b47
update kibana version to 8.15.2
lucian-ioan Sep 19, 2024
4afc186
remove global period
lucian-ioan Sep 19, 2024
ac62604
remove latency and iops fields
lucian-ioan Sep 19, 2024
9c7ae05
update triggered alarms to group
lucian-ioan Sep 19, 2024
1bdac8d
add tags in stream.yml.hbs
lucian-ioan Sep 19, 2024
47317a7
add system tests
lucian-ioan Sep 19, 2024
0b87f5b
Merge remote-tracking branch 'origin' into update_vsphere_datastore_i…
lucian-ioan Sep 19, 2024
9c15224
update readme
lucian-ioan Sep 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/vsphere/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.14.0"
lucian-ioan marked this conversation as resolved.
Show resolved Hide resolved
changes:
- description: Add additional metrics for datastore datastream
type: enhancement
link: https://github.com/elastic/integrations/pull/10911
- version: "1.13.0"
changes:
- description: ECS version updated to 8.11.0. Update the kibana constraint to ^8.13.0. Modified the field definitions to remove ECS fields made redundant by the ecs@mappings component template.
Expand Down
64 changes: 58 additions & 6 deletions packages/vsphere/data_stream/datastore/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,85 @@
type: keyword
# Reason to add as a dimension field: to uniquely identify the datastore
dimension: true
description: Datastore name
description: Datastore name.
- name: fstype
type: keyword
# Reason to add as a dimension field: in case datastore name is duplicated across different type.
dimension: true
description: Filesystem type
description: Filesystem type.
- name: capacity.total.bytes
type: long
metric_type: gauge
unit: byte
description: Total bytes of the datastore
description: Total bytes of the datastore.
format: bytes
- name: capacity.free.bytes
type: long
metric_type: gauge
unit: byte
description: Free bytes of the datastore
description: Free bytes of the datastore.
format: bytes
- name: capacity.used.bytes
type: long
metric_type: gauge
unit: byte
description: Used bytes of the datastore
description: Used bytes of the datastore.
format: bytes
- name: capacity.used.pct
type: scaled_float
metric_type: gauge
unit: percent
description: Used percent of the datastore
description: Percentage of datastore capacity used.
format: percent
- name: host.count
type: long
description: >
Number of hosts.
lucian-ioan marked this conversation as resolved.
Show resolved Hide resolved

- name: host.names
agithomas marked this conversation as resolved.
Show resolved Hide resolved
type: keyword
description: >
List of all the host names.
lucian-ioan marked this conversation as resolved.
Show resolved Hide resolved

- name: iops
type: long
description: >
Storage I/O Control aggregated Input/Output Operations Per Second.

- name: read.bytes
type: long
description: >
Copy link
Contributor

Choose a reason for hiding this comment

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

metric_type to be added for new metrics.

Rate of reading data from the datastore.

format: bytes
- name: read.latency.total.ms
type: long
description: >
Average amount of time for a read operation from the datastore in milliseconds.

- name: status
type: keyword
description: >
Status of the datastore.

- name: vm.count
type: long
description: >
Number of VMs.
lucian-ioan marked this conversation as resolved.
Show resolved Hide resolved

- name: vm.names
type: keyword
description: >
List of all the VM names.
lucian-ioan marked this conversation as resolved.
Show resolved Hide resolved

- name: write.bytes
type: long
description: >
Rate of writing data to the datastore.

format: bytes
- name: write.latency.total.ms
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check the metricset of datastore. There is a change in the fields.
Lets get the latest fields in.

Copy link
Contributor

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 resolved still ?

type: long
description: >
Average amount of time for a write operation from the datastore in milliseconds.

46 changes: 38 additions & 8 deletions packages/vsphere/data_stream/datastore/sample_event.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@timestamp": "2023-06-29T08:03:30.114Z",
"@timestamp": "2017-10-12T08:05:34.853Z",
"agent": {
"ephemeral_id": "8b019ff3-cbda-41fa-b1ff-974d482b9694",
"id": "5096d7cc-1e4b-4959-abea-7355be2913a7",
Expand Down Expand Up @@ -54,25 +54,55 @@
"period": 10000
},
"service": {
"address": "https://elastic-package-service_vsphere-metrics_1:8989/sdk",
"address": "127.0.0.1:33365",
"type": "vsphere"
},
"vsphere": {
"datastore": {
"iops": 0,
"host": {
"count": 1,
"names": [
"DC3_H0"
]
},
"status": "green",
"vm": {
"count": 6,
"names": [
"DC3_H0_VM0"
]
},
"capacity": {
"free": {
"bytes": 47869427712
"bytes": 37120094208
},
"total": {
"bytes": 62725623808
"bytes": 74686664704
},
"used": {
"bytes": 14856196096,
"pct": 0.237
"bytes": 37566570496,
"pct": 0.502988996026061
}
},
"read": {
"bytes": 0,
"latency": {
"total": {
"ms": 0
}
}
},
"write": {
"bytes": 337000,
"latency": {
"total": {
"ms": 0
}
}
},
"fstype": "OTHER",
"fstype": "local",
"name": "LocalDS_0"
}
}
}
}
67 changes: 54 additions & 13 deletions packages/vsphere/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ An example event for `datastore` looks as following:

```json
{
"@timestamp": "2023-06-29T08:03:30.114Z",
"@timestamp": "2017-10-12T08:05:34.853Z",
"agent": {
"ephemeral_id": "8b019ff3-cbda-41fa-b1ff-974d482b9694",
"id": "5096d7cc-1e4b-4959-abea-7355be2913a7",
Expand Down Expand Up @@ -354,28 +354,59 @@ An example event for `datastore` looks as following:
"period": 10000
},
"service": {
"address": "https://elastic-package-service_vsphere-metrics_1:8989/sdk",
"address": "127.0.0.1:33365",
"type": "vsphere"
},
"vsphere": {
"datastore": {
"iops": 0,
"host": {
"count": 1,
"names": [
"DC3_H0"
]
},
"status": "green",
"vm": {
"count": 6,
"names": [
"DC3_H0_VM0"
]
},
"capacity": {
"free": {
"bytes": 47869427712
"bytes": 37120094208
},
"total": {
"bytes": 62725623808
"bytes": 74686664704
},
"used": {
"bytes": 14856196096,
"pct": 0.237
"bytes": 37566570496,
"pct": 0.502988996026061
}
},
"fstype": "OTHER",
"read": {
"bytes": 0,
"latency": {
"total": {
"ms": 0
}
}
},
"write": {
"bytes": 337000,
"latency": {
"total": {
"ms": 0
}
}
},
"fstype": "local",
"name": "LocalDS_0"
}
}
}

```

**ECS Field Reference**
Expand Down Expand Up @@ -404,12 +435,22 @@ Please refer to the following [document](https://www.elastic.co/guide/en/ecs/cur
| host.os.build | OS build information. | keyword | | |
| host.os.codename | OS codename, if any. | keyword | | |
| service.address | Address where data about this service was collected from. This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). | keyword | | |
| vsphere.datastore.capacity.free.bytes | Free bytes of the datastore | long | byte | gauge |
| vsphere.datastore.capacity.total.bytes | Total bytes of the datastore | long | byte | gauge |
| vsphere.datastore.capacity.used.bytes | Used bytes of the datastore | long | byte | gauge |
| vsphere.datastore.capacity.used.pct | Used percent of the datastore | scaled_float | percent | gauge |
| vsphere.datastore.fstype | Filesystem type | keyword | | |
| vsphere.datastore.name | Datastore name | keyword | | |
| vsphere.datastore.capacity.free.bytes | Free bytes of the datastore. | long | byte | gauge |
| vsphere.datastore.capacity.total.bytes | Total bytes of the datastore. | long | byte | gauge |
| vsphere.datastore.capacity.used.bytes | Used bytes of the datastore. | long | byte | gauge |
| vsphere.datastore.capacity.used.pct | Percentage of datastore capacity used. | scaled_float | percent | gauge |
| vsphere.datastore.fstype | Filesystem type. | keyword | | |
| vsphere.datastore.host.count | Number of hosts. | long | | |
| vsphere.datastore.host.names | List of all the host names. | keyword | | |
| vsphere.datastore.iops | Storage I/O Control aggregated Input/Output Operations Per Second. | long | | |
| vsphere.datastore.name | Datastore name. | keyword | | |
| vsphere.datastore.read.bytes | Rate of reading data from the datastore. | long | | |
| vsphere.datastore.read.latency.total.ms | Average amount of time for a read operation from the datastore in milliseconds. | long | | |
| vsphere.datastore.status | Status of the datastore. | keyword | | |
| vsphere.datastore.vm.count | Number of VMs. | long | | |
| vsphere.datastore.vm.names | List of all the VM names. | keyword | | |
| vsphere.datastore.write.bytes | Rate of writing data to the datastore. | long | | |
| vsphere.datastore.write.latency.total.ms | Average amount of time for a write operation from the datastore in milliseconds. | long | | |


## Logs
Expand Down
2 changes: 1 addition & 1 deletion packages/vsphere/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: VMware vSphere
format_version: "3.0.2"
name: vsphere
version: "1.13.0"
version: "1.14.0"
lucian-ioan marked this conversation as resolved.
Show resolved Hide resolved
description: This Elastic integration collects metrics and logs from vSphere/vCenter servers
type: integration
categories:
Expand Down