-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GCP] Add GCP Compute Metricset (#2301)
This commit has been changed to remove changes to README included in #2141 to allow documentation changes from #2842
- Loading branch information
1 parent
de741ef
commit 7ed83f9
Showing
23 changed files
with
1,521 additions
and
3 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Compute | ||
|
||
## Metrics | ||
|
||
This is the `compute` dataset. | ||
|
||
{{event "compute"}} | ||
|
||
{{fields "compute"}} |
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
16 changes: 16 additions & 0 deletions
16
packages/gcp/data_stream/compute/agent/stream/stream.yml.hbs
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
metricsets: ["compute"] | ||
period: {{period}} | ||
project_id: {{project_id}} | ||
{{#if credentials_file}} | ||
credentials_file_path: {{credentials_file}} | ||
{{/if}} | ||
{{#if credentials_json}} | ||
credentials_json: {{credentials_json}} | ||
{{/if}} | ||
{{#if region}} | ||
region: {{region}} | ||
{{/if}} | ||
{{#if zone}} | ||
zone: {{zone}} | ||
{{/if}} | ||
exclude_labels: {{exclude_labels}} |
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 |
---|---|---|
@@ -0,0 +1,198 @@ | ||
- name: cloud | ||
title: Cloud | ||
group: 2 | ||
description: Fields related to the cloud or infrastructure the events are coming from. | ||
footnote: 'Examples: If Metricbeat is running on an GCP Compute VM and fetches data from its host, the cloud info contains the data about this machine. If Metricbeat runs on a remote machine outside the cloud and fetches data from a service running in the cloud, the field contains cloud data from the machine the service is running on.' | ||
type: group | ||
fields: | ||
- name: account.id | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: 'The cloud account or organization id used to identify different entities in a multi-tenant environment. | ||
Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.' | ||
example: 666777888999 | ||
- name: availability_zone | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Availability zone in which this host is running. | ||
example: us-east-1c | ||
- name: instance.id | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Instance ID of the host machine. | ||
example: i-1234567890abcdef0 | ||
- name: instance.name | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Instance name of the host machine. | ||
- name: machine.type | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Machine type of the host machine. | ||
example: t2.medium | ||
- name: provider | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | ||
example: aws | ||
- name: region | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Region in which this host is running. | ||
example: us-east-1 | ||
- name: project.id | ||
type: keyword | ||
description: Name of the project in Google Cloud. | ||
- name: image.id | ||
type: keyword | ||
description: Image ID for the cloud instance. | ||
- name: container | ||
title: Container | ||
group: 2 | ||
description: 'Container fields are used for meta information about the specific container that is the source of information. | ||
These fields help correlate data based containers from any runtime.' | ||
type: group | ||
fields: | ||
- name: id | ||
level: core | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Unique container id. | ||
- name: image.name | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Name of the image the container was built on. | ||
- name: labels | ||
level: extended | ||
type: object | ||
object_type: keyword | ||
description: Image labels. | ||
- name: name | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Container name. | ||
- name: host | ||
title: Host | ||
group: 2 | ||
description: 'A host is defined as a general computing instance. | ||
ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.' | ||
type: group | ||
fields: | ||
- name: architecture | ||
level: core | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Operating system architecture. | ||
example: x86_64 | ||
- name: domain | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: 'Name of the domain of which the host is a member. | ||
For example, on Windows this could be the host''s Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host''s LDAP provider.' | ||
example: CONTOSO | ||
default_field: false | ||
- name: hostname | ||
level: core | ||
type: keyword | ||
ignore_above: 1024 | ||
description: 'Hostname of the host. | ||
It normally contains what the `hostname` command returns on the host machine.' | ||
- name: id | ||
level: core | ||
type: keyword | ||
ignore_above: 1024 | ||
description: 'Unique host id. | ||
As hostname is not always unique, use values that are meaningful in your environment. | ||
Example: The current usage of `beat.name`.' | ||
- name: ip | ||
level: core | ||
type: ip | ||
description: Host ip addresses. | ||
- name: mac | ||
level: core | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Host mac addresses. | ||
- name: name | ||
level: core | ||
type: keyword | ||
ignore_above: 1024 | ||
description: 'Name of the host. | ||
It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.' | ||
- name: os.family | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: OS family (such as redhat, debian, freebsd, windows). | ||
example: debian | ||
- name: os.kernel | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Operating system kernel version as a raw string. | ||
example: 4.4.0-112-generic | ||
- name: os.name | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
multi_fields: | ||
- name: text | ||
type: text | ||
norms: false | ||
default_field: false | ||
description: Operating system name, without the version. | ||
example: Mac OS X | ||
- name: os.platform | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Operating system platform (such centos, ubuntu, windows). | ||
example: darwin | ||
- name: os.version | ||
level: extended | ||
type: keyword | ||
ignore_above: 1024 | ||
description: Operating system version as a raw string. | ||
example: 10.14.1 | ||
- name: type | ||
level: core | ||
type: keyword | ||
ignore_above: 1024 | ||
description: 'Type of host. | ||
For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment.' | ||
- name: containerized | ||
type: boolean | ||
description: > | ||
If the host is a container. | ||
- name: os.build | ||
type: keyword | ||
example: "18D109" | ||
description: > | ||
OS build information. | ||
- name: os.codename | ||
type: keyword | ||
example: "stretch" | ||
description: > | ||
OS codename, if any. | ||
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- name: data_stream.type | ||
type: constant_keyword | ||
description: Data stream type. | ||
- name: data_stream.dataset | ||
type: constant_keyword | ||
description: Data stream dataset. | ||
- name: data_stream.namespace | ||
type: constant_keyword | ||
description: Data stream namespace. | ||
- name: '@timestamp' | ||
type: date | ||
description: Event timestamp. | ||
- name: event.module | ||
type: constant_keyword | ||
description: Event module | ||
value: gcp | ||
- name: event.dataset | ||
type: constant_keyword | ||
description: Event dataset | ||
value: gcp.compute |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
- external: ecs | ||
name: cloud | ||
- external: ecs | ||
name: cloud.account.id | ||
- external: ecs | ||
name: cloud.account.name | ||
- external: ecs | ||
name: cloud.availability_zone | ||
- external: ecs | ||
name: cloud.instance.id | ||
- external: ecs | ||
name: cloud.machine.type | ||
- external: ecs | ||
name: cloud.provider | ||
- external: ecs | ||
name: cloud.region | ||
- external: ecs | ||
name: ecs.version | ||
- external: ecs | ||
name: error | ||
- external: ecs | ||
name: error.message | ||
- external: ecs | ||
name: service.type |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
- name: gcp.compute | ||
description: Google Cloud Compute metrics | ||
type: group | ||
fields: | ||
- name: firewall.dropped.bytes | ||
type: long | ||
description: Incoming bytes dropped by the firewall | ||
- name: firewall.dropped_packets_count.value | ||
type: long | ||
description: Incoming packets dropped by the firewall | ||
- name: instance.cpu.reserved_cores.value | ||
type: double | ||
description: Number of cores reserved on the host of the instance | ||
- name: instance.cpu.usage_time.sec | ||
type: double | ||
description: Usage for all cores in seconds | ||
- name: instance.cpu.usage.pct | ||
type: double | ||
description: The fraction of the allocated CPU that is currently in use on the instance | ||
- name: instance.disk.read.bytes | ||
type: long | ||
description: Count of bytes read from disk | ||
- name: instance.disk.read_ops_count.value | ||
type: long | ||
description: Count of disk read IO operations | ||
- name: instance.disk.write.bytes | ||
type: long | ||
description: Count of bytes written to disk | ||
- name: instance.disk.write_ops_count.value | ||
type: long | ||
description: Count of disk write IO operations | ||
- name: instance.memory.balloon.ram_size.value | ||
type: long | ||
description: The total amount of memory in the VM. This metric is only available for VMs that belong to the e2 family. | ||
- name: instance.memory.balloon.ram_used.value | ||
type: long | ||
description: Memory currently used in the VM. This metric is only available for VMs that belong to the e2 family. | ||
- name: instance.memory.balloon.swap_in.bytes | ||
type: long | ||
description: The amount of memory read into the guest from its own swap space. This metric is only available for VMs that belong to the e2 family. | ||
- name: instance.memory.balloon.swap_out.bytes | ||
type: long | ||
description: The amount of memory written from the guest to its own swap space. This metric is only available for VMs that belong to the e2 family. | ||
- name: instance.network.ingress.bytes | ||
type: long | ||
description: Count of bytes received from the network | ||
- name: instance.network.ingress.packets.count | ||
type: long | ||
description: Count of packets received from the network | ||
- name: instance.network.egress.bytes | ||
type: long | ||
description: Count of bytes sent over the network | ||
- name: instance.network.egress.packets.count | ||
type: long | ||
description: Count of packets sent over the network | ||
- name: instance.uptime.sec | ||
type: long | ||
description: Number of seconds the VM has been running. | ||
- name: instance.uptime_total.sec | ||
type: long | ||
description: Elapsed time since the VM was started, in seconds. Sampled every 60 seconds. After sampling, data is not visible for up to 120 seconds. |
31 changes: 31 additions & 0 deletions
31
packages/gcp/data_stream/compute/fields/package-fields.yml
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
- name: gcp | ||
description: >- | ||
GCP module | ||
fields: | ||
- name: labels | ||
type: object | ||
description: >- | ||
GCP monitoring metrics labels | ||
fields: | ||
- name: user.* | ||
type: object | ||
object_type: keyword | ||
- name: metadata.* | ||
type: object | ||
object_type: keyword | ||
- name: metrics.* | ||
type: object | ||
object_type: keyword | ||
- name: system.* | ||
type: object | ||
object_type: keyword | ||
- name: resource.* | ||
type: object | ||
object_type: keyword | ||
- name: "metrics.*.*.*.*" | ||
type: object | ||
object_type: double | ||
object_type_mapping_type: "*" | ||
description: > | ||
Metrics that returned from Google Cloud API query. | ||
Oops, something went wrong.