From 7c53646eea2d9c7879cfb6b7a40f77579611372d Mon Sep 17 00:00:00 2001 From: Edoardo Tenani Date: Mon, 8 Nov 2021 18:00:00 +0100 Subject: [PATCH 01/28] gcp: stub logs and metrics doc files --- packages/gcp/_dev/build/docs/logs.md | 3 +++ packages/gcp/_dev/build/docs/metrics.md | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 packages/gcp/_dev/build/docs/logs.md create mode 100644 packages/gcp/_dev/build/docs/metrics.md diff --git a/packages/gcp/_dev/build/docs/logs.md b/packages/gcp/_dev/build/docs/logs.md new file mode 100644 index 00000000000..8260a2246b6 --- /dev/null +++ b/packages/gcp/_dev/build/docs/logs.md @@ -0,0 +1,3 @@ +# Google Cloud Platform Logs Integration + +The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. diff --git a/packages/gcp/_dev/build/docs/metrics.md b/packages/gcp/_dev/build/docs/metrics.md new file mode 100644 index 00000000000..61541fd6994 --- /dev/null +++ b/packages/gcp/_dev/build/docs/metrics.md @@ -0,0 +1,5 @@ +# Google Cloud Platform Metrics Integration + +The Google Cloud Platform Metrics integration collects and parses Google Cloud billing, compute, storage metrics. + + From 418224b756efe755f9083519441c6c641f56c69c Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Tue, 30 Nov 2021 08:25:49 -0600 Subject: [PATCH 02/28] [GCP] Add GCP Billing Metricset (#2141) --- packages/gcp/_dev/build/docs/logs.md | 29 +- packages/gcp/_dev/build/docs/metrics.md | 10 +- .../_dev/test/system/test-pubsub-config.yml | 1 + .../_dev/test/system/test-pubsub-config.yml | 1 + .../_dev/test/system/test-pubsub-config.yml | 1 + packages/gcp/docs/logs.md | 671 ++++++++++++++++++ packages/gcp/docs/metrics.md | 101 +++ 7 files changed, 812 insertions(+), 2 deletions(-) create mode 100644 packages/gcp/docs/logs.md create mode 100644 packages/gcp/docs/metrics.md diff --git a/packages/gcp/_dev/build/docs/logs.md b/packages/gcp/_dev/build/docs/logs.md index 8260a2246b6..ccdbbca29e6 100644 --- a/packages/gcp/_dev/build/docs/logs.md +++ b/packages/gcp/_dev/build/docs/logs.md @@ -1,3 +1,30 @@ # Google Cloud Platform Logs Integration -The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. +The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, +and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. + +## Logs + +### Audit + +This is the `audit` dataset. + +{{event "audit"}} + +{{fields "audit"}} + +### Firewall + +This is the `firewall` dataset. + +{{event "firewall"}} + +{{fields "firewall"}} + +### VPC Flow + +This is the `VPC Flow` dataset. + +{{event "vpcflow"}} + +{{fields "vpcflow"}} diff --git a/packages/gcp/_dev/build/docs/metrics.md b/packages/gcp/_dev/build/docs/metrics.md index 61541fd6994..8a5b78d3cef 100644 --- a/packages/gcp/_dev/build/docs/metrics.md +++ b/packages/gcp/_dev/build/docs/metrics.md @@ -1,5 +1,13 @@ # Google Cloud Platform Metrics Integration -The Google Cloud Platform Metrics integration collects and parses Google Cloud billing, compute, storage metrics. +The Google Cloud Platform Metrics integration collects and parses Google Cloud billing metrics. +## Metrics +### Billing + +This is the `billing` dataset. + +{{event "billing"}} + +{{fields "billing"}} \ No newline at end of file diff --git a/packages/gcp/data_stream/audit/_dev/test/system/test-pubsub-config.yml b/packages/gcp/data_stream/audit/_dev/test/system/test-pubsub-config.yml index 2cabbe0984c..c336127a2f1 100644 --- a/packages/gcp/data_stream/audit/_dev/test/system/test-pubsub-config.yml +++ b/packages/gcp/data_stream/audit/_dev/test/system/test-pubsub-config.yml @@ -20,3 +20,4 @@ data_stream: alternative_host: "{{Hostname}}:{{Port}}" subscription_name: subscription topic: topic + alternative_host: "{{Hostname}}:{{Port}}" diff --git a/packages/gcp/data_stream/firewall/_dev/test/system/test-pubsub-config.yml b/packages/gcp/data_stream/firewall/_dev/test/system/test-pubsub-config.yml index b171a4364ba..d62e2f42e91 100644 --- a/packages/gcp/data_stream/firewall/_dev/test/system/test-pubsub-config.yml +++ b/packages/gcp/data_stream/firewall/_dev/test/system/test-pubsub-config.yml @@ -10,3 +10,4 @@ data_stream: alternative_host: "{{Hostname}}:{{Port}}" subscription_name: subscription topic: topic + alternative_host: "{{Hostname}}:{{Port}}" diff --git a/packages/gcp/data_stream/vpcflow/_dev/test/system/test-pubsub-config.yml b/packages/gcp/data_stream/vpcflow/_dev/test/system/test-pubsub-config.yml index cff212ca960..449562b11b0 100644 --- a/packages/gcp/data_stream/vpcflow/_dev/test/system/test-pubsub-config.yml +++ b/packages/gcp/data_stream/vpcflow/_dev/test/system/test-pubsub-config.yml @@ -9,3 +9,4 @@ data_stream: alternative_host: "{{Hostname}}:{{Port}}" subscription_name: subscription topic: topic + alternative_host: "{{Hostname}}:{{Port}}" diff --git a/packages/gcp/docs/logs.md b/packages/gcp/docs/logs.md new file mode 100644 index 00000000000..7a58835a573 --- /dev/null +++ b/packages/gcp/docs/logs.md @@ -0,0 +1,671 @@ +# Google Cloud Platform Logs Integration + +The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, +and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. + +## Logs + +### Audit + +This is the `audit` dataset. + +An example event for `audit` looks as following: + +```json +{ + "log": { + "logger": "projects/foo/logs/cloudaudit.googleapis.com%2Factivity" + }, + "source": { + "geo": { + "continent_name": "Europe", + "region_iso_code": "RU-MOW", + "city_name": "Moscow", + "country_iso_code": "RU", + "country_name": "Russia", + "region_name": "Moscow", + "location": { + "lon": 37.6172, + "lat": 55.7527 + } + }, + "ip": "1.2.3.4" + }, + "cloud": { + "project": { + "id": "foo" + } + }, + "@timestamp": "2020-08-05T21:59:26.456Z", + "ecs": { + "version": "1.8.0" + }, + "gcp": { + "audit": { + "request": { + "name": "windows-server-2016-v20200805", + "proto_name": "type.googleapis.com/compute.images.insert" + }, + "authentication_info": { + "principal_email": "user@mycompany.com" + }, + "method_name": "v1.compute.images.insert", + "request_metadata": { + "caller_ip": "1.2.3.4", + "caller_supplied_user_agent": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)" + }, + "response": { + "proto_name": "type.googleapis.com/operation", + "status": { + "value": "RUNNING" + } + }, + "service_name": "compute.googleapis.com", + "type": "type.googleapis.com/google.cloud.audit.AuditLog", + "authorization_info": [ + { + "resource_attributes": { + "name": "projects/foo/global/images/windows-server-2016-v20200805", + "type": "compute.images", + "service": "compute" + }, + "permission": "compute.images.create", + "granted": true + } + ], + "resource_name": "projects/foo/global/images/windows-server-2016-v20200805", + "resource_location": { + "current_locations": [ + "eu" + ] + } + } + }, + "service": { + "name": "compute.googleapis.com" + }, + "event": { + "action": "v1.compute.images.insert", + "ingested": "2021-02-19T09:19:47.732239800Z", + "original": "{\"insertId\":\"v2spcwdzmc2\",\"logName\":\"projects/foo/logs/cloudaudit.googleapis.com%2Factivity\",\"operation\":{\"first\":true,\"id\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"producer\":\"compute.googleapis.com\"},\"protoPayload\":{\"@type\":\"type.googleapis.com/google.cloud.audit.AuditLog\",\"authenticationInfo\":{\"principalEmail\":\"user@mycompany.com\"},\"authorizationInfo\":[{\"granted\":true,\"permission\":\"compute.images.create\",\"resourceAttributes\":{\"name\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"service\":\"compute\",\"type\":\"compute.images\"}}],\"methodName\":\"v1.compute.images.insert\",\"request\":{\"@type\":\"type.googleapis.com/compute.images.insert\",\"family\":\"windows-server-2016\",\"guestOsFeatures\":[{\"type\":\"VIRTIO_SCSI_MULTIQUEUE\"},{\"type\":\"WINDOWS\"}],\"name\":\"windows-server-2016-v20200805\",\"rawDisk\":{\"source\":\"https://storage.googleapis.com/storage/v1/b/foo/o/windows-server-2016-v20200805.tar.gz\"},\"sourceType\":\"RAW\"},\"requestMetadata\":{\"callerIp\":\"1.2.3.4\",\"callerSuppliedUserAgent\":\"google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)\",\"destinationAttributes\":{},\"requestAttributes\":{\"auth\":{},\"time\":\"2020-08-05T21:59:27.515Z\"}},\"resourceLocation\":{\"currentLocations\":[\"eu\"]},\"resourceName\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"response\":{\"@type\":\"type.googleapis.com/operation\",\"id\":\"44919313\",\"insertTime\":\"2020-08-05T14:59:27.259-07:00\",\"name\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"operationType\":\"insert\",\"progress\":\"0\",\"selfLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"selfLinkWithId\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/4491931805423146320\",\"startTime\":\"2020-08-05T14:59:27.274-07:00\",\"status\":\"RUNNING\",\"targetId\":\"12345\",\"targetLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/images/windows-server-2016-v20200805\",\"user\":\"user@mycompany.com\"},\"serviceName\":\"compute.googleapis.com\"},\"receiveTimestamp\":\"2020-08-05T21:59:27.822546978Z\",\"resource\":{\"labels\":{\"image_id\":\"771879043\",\"project_id\":\"foo\"},\"type\":\"gce_image\"},\"severity\":\"NOTICE\",\"timestamp\":\"2020-08-05T21:59:26.456Z\"}", + "id": "v2spcwdzmc2", + "kind": "event", + "outcome": "success" + }, + "user": { + "email": "user@mycompany.com" + }, + "user_agent": { + "name": "Other", + "original": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)", + "os": { + "name": "Mac OS X", + "version": "19.6.0", + "full": "Mac OS X 19.6.0" + }, + "device": { + "name": "Mac" + } + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | 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. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.dataset | Event dataset | constant_keyword | +| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | +| event.module | Event module | constant_keyword | +| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | +| gcp.audit.authentication_info.authority_selector | The authority selector specified by the requestor, if any. It is not guaranteed that the principal was allowed to use this authority. | keyword | +| gcp.audit.authentication_info.principal_email | The email address of the authenticated user making the request. | keyword | +| gcp.audit.authorization_info.granted | Whether or not authorization for resource and permission was granted. | boolean | +| gcp.audit.authorization_info.permission | The required IAM permission. | keyword | +| gcp.audit.authorization_info.resource_attributes.name | The name of the resource. | keyword | +| gcp.audit.authorization_info.resource_attributes.service | The name of the service. | keyword | +| gcp.audit.authorization_info.resource_attributes.type | The type of the resource. | keyword | +| gcp.audit.method_name | The name of the service method or operation. For API calls, this should be the name of the API method. For example, 'google.datastore.v1.Datastore.RunQuery'. | keyword | +| gcp.audit.num_response_items | The number of items returned from a List or Query API method, if applicable. | long | +| gcp.audit.request.filter | Filter of the request. | keyword | +| gcp.audit.request.name | Name of the request. | keyword | +| gcp.audit.request.proto_name | Type property of the request. | keyword | +| gcp.audit.request.resource_name | Name of the request resource. | keyword | +| gcp.audit.request_metadata.caller_ip | The IP address of the caller. | ip | +| gcp.audit.request_metadata.caller_supplied_user_agent | The user agent of the caller. This information is not authenticated and should be treated accordingly. | keyword | +| gcp.audit.resource_location.current_locations | Current locations of the resource. | keyword | +| gcp.audit.resource_name | The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example, 'shelves/SHELF_ID/books'. | keyword | +| gcp.audit.response.details.group | The name of the group. | keyword | +| gcp.audit.response.details.kind | The kind of the response details. | keyword | +| gcp.audit.response.details.name | The name of the response details. | keyword | +| gcp.audit.response.details.uid | The uid of the response details. | keyword | +| gcp.audit.response.proto_name | Type property of the response. | keyword | +| gcp.audit.response.status.allowed | | boolean | +| gcp.audit.response.status.reason | | keyword | +| gcp.audit.response.status.value | | keyword | +| gcp.audit.service_name | The name of the API service performing the operation. For example, datastore.googleapis.com. | keyword | +| gcp.audit.status.code | The status code, which should be an enum value of google.rpc.Code. | integer | +| gcp.audit.status.message | A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. | keyword | +| gcp.audit.type | Type property. | keyword | +| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.instance.region | Region of the VM. | keyword | +| gcp.destination.instance.zone | Zone of the VM. | keyword | +| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.source.instance.region | Region of the VM. | keyword | +| gcp.source.instance.zone | Zone of the VM. | keyword | +| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| input.type | Input type | keyword | +| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | +| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| orchestrator.api_version | API version being used to carry out the action | keyword | +| orchestrator.cluster.name | Name of the cluster. | keyword | +| orchestrator.cluster.url | URL of the API used to manage the cluster. | keyword | +| orchestrator.cluster.version | The version of the cluster. | keyword | +| orchestrator.namespace | Namespace in which the action is taking place. | keyword | +| orchestrator.organization | Organization affected by the event (for multi-tenant orchestrator setups). | keyword | +| orchestrator.resource.name | Name of the resource being acted upon. | keyword | +| orchestrator.resource.type | Type of resource being acted upon. | keyword | +| orchestrator.type | Orchestrator cluster type (e.g. kubernetes, nomad or cloudfoundry). | keyword | +| service.name | Name of the service data is collected from. The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name. In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| tags | List of keywords used to tag each event. | keyword | +| user.email | User email address. | keyword | +| user_agent.device.name | Name of the device. | keyword | +| user_agent.name | Name of the user agent. | keyword | +| user_agent.original | Unparsed user_agent string. | keyword | +| user_agent.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| user_agent.os.full | Operating system name, including the version or code name. | keyword | +| user_agent.os.kernel | Operating system kernel version as a raw string. | keyword | +| user_agent.os.name | Operating system name, without the version. | keyword | +| user_agent.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| user_agent.os.version | Operating system version as a raw string. | keyword | +| user_agent.version | Version of the user agent. | keyword | + + +### Firewall + +This is the `firewall` dataset. + +An example event for `firewall` looks as following: + +```json +{ + "log": { + "logger": "projects/test-beats/logs/compute.googleapis.com%2Ffirewall" + }, + "destination": { + "geo": { + "continent_name": "North America", + "country_name": "United States", + "location": { + "lon": -97.822, + "lat": 37.751 + }, + "country_iso_code": "US" + }, + "as": { + "number": 15169, + "organization": { + "name": "Google LLC" + } + }, + "address": "8.8.8.8", + "port": 53, + "ip": "8.8.8.8" + }, + "rule": { + "name": "network:default/firewall:adrian-test-1" + }, + "source": { + "address": "10.128.0.16", + "port": 60094, + "domain": "adrian-test", + "ip": "10.128.0.16" + }, + "network": { + "name": "default", + "community_id": "1:iiDdIEXnxwSiz/hJbVnseQ4SZVE=", + "transport": "udp", + "type": "ipv4", + "iana_number": "17", + "direction": "outbound" + }, + "cloud": { + "region": "us-central1", + "availability_zone": "us-central1-a", + "project": { + "id": "test-beats" + } + }, + "@timestamp": "2019-11-12T12:35:17.214Z", + "ecs": { + "version": "1.8.0" + }, + "related": { + "ip": [ + "10.128.0.16", + "8.8.8.8" + ] + }, + "gcp": { + "firewall": { + "rule_details": { + "action": "DENY", + "target_tag": [ + "adrian-test" + ], + "priority": 1000, + "destination_range": [ + "8.8.8.0/24" + ], + "ip_port_info": [ + { + "ip_protocol": "ALL" + } + ], + "direction": "EGRESS" + } + }, + "source": { + "vpc": { + "project_id": "test-beats", + "subnetwork_name": "default", + "vpc_name": "default" + }, + "instance": { + "region": "us-central1", + "project_id": "test-beats", + "zone": "us-central1-a" + } + } + }, + "event": { + "ingested": "2021-02-19T09:19:48.040375200Z", + "original": "{\"insertId\":\"4zuj4nfn4llkb\",\"jsonPayload\":{\"connection\":{\"dest_ip\":\"8.8.8.8\",\"dest_port\":53,\"protocol\":17,\"src_ip\":\"10.128.0.16\",\"src_port\":60094},\"disposition\":\"DENIED\",\"instance\":{\"project_id\":\"test-beats\",\"region\":\"us-central1\",\"vm_name\":\"adrian-test\",\"zone\":\"us-central1-a\"},\"remote_location\":{\"continent\":\"America\",\"country\":\"usa\"},\"rule_details\":{\"action\":\"DENY\",\"destination_range\":[\"8.8.8.0/24\"],\"direction\":\"EGRESS\",\"ip_port_info\":[{\"ip_protocol\":\"ALL\"}],\"priority\":1000,\"reference\":\"network:default/firewall:adrian-test-1\",\"target_tag\":[\"adrian-test\"]},\"vpc\":{\"project_id\":\"test-beats\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"}},\"logName\":\"projects/test-beats/logs/compute.googleapis.com%2Ffirewall\",\"receiveTimestamp\":\"2019-11-12T12:35:24.466374097Z\",\"resource\":{\"labels\":{\"location\":\"us-central1-a\",\"project_id\":\"test-beats\",\"subnetwork_id\":\"1266623735137648253\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-11-12T12:35:17.214711274Z\"}", + "kind": "event", + "action": "firewall-rule", + "id": "4zuj4nfn4llkb", + "category": "network", + "type": "connection" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | 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. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| destination.as.organization.name | Organization name. | keyword | +| destination.domain | Destination domain. | keyword | +| destination.geo.city_name | City name. | keyword | +| destination.geo.continent_name | Name of the continent. | keyword | +| destination.geo.country_iso_code | Country ISO code. | keyword | +| destination.geo.country_name | Country name. | keyword | +| destination.geo.location | Longitude and latitude. | geo_point | +| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| destination.geo.region_iso_code | Region ISO code. | keyword | +| destination.geo.region_name | Region name. | keyword | +| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | +| destination.port | Port of the destination. | long | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.dataset | Event dataset | constant_keyword | +| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | +| event.module | Event module | constant_keyword | +| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | +| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.instance.region | Region of the VM. | keyword | +| gcp.destination.instance.zone | Zone of the VM. | keyword | +| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.firewall.rule_details.action | Action that the rule performs on match. | keyword | +| gcp.firewall.rule_details.destination_range | List of destination ranges that the firewall applies to. | keyword | +| gcp.firewall.rule_details.direction | Direction of traffic that matches this rule. | keyword | +| gcp.firewall.rule_details.ip_port_info | List of ip protocols and applicable port ranges for rules. | array | +| gcp.firewall.rule_details.priority | The priority for the firewall rule. | long | +| gcp.firewall.rule_details.reference | Reference to the firewall rule. | keyword | +| gcp.firewall.rule_details.source_range | List of source ranges that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.source_service_account | List of all the source service accounts that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.source_tag | List of all the source tags that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.target_service_account | List of all the target service accounts that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.target_tag | List of all the target tags that the firewall rule applies to. | keyword | +| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.source.instance.region | Region of the VM. | keyword | +| gcp.source.instance.zone | Zone of the VM. | keyword | +| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| input.type | Input type | keyword | +| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | +| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | +| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | +| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | +| network.name | Name given by operators to sections of their network. | keyword | +| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | +| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | +| related.ip | All of the IPs seen on your event. | ip | +| related.user | All the user names or other user identifiers seen on the event. | keyword | +| rule.name | The name of the rule or signature generating the event. | keyword | +| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.domain | Source domain. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| source.port | Port of the source. | long | +| tags | List of keywords used to tag each event. | keyword | + + +### VPC Flow + +This is the `VPC Flow` dataset. + +An example event for `vpcflow` looks as following: + +```json +{ + "log": { + "logger": "projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows" + }, + "destination": { + "address": "10.87.40.76", + "port": 33970, + "domain": "kibana", + "ip": "10.87.40.76" + }, + "source": { + "geo": { + "continent_name": "America", + "country_name": "usa" + }, + "as": { + "number": 15169 + }, + "address": "198.51.100.248", + "port": 9200, + "bytes": 173663, + "domain": "elasticsearch", + "ip": "198.51.100.248", + "packets": 68 + }, + "network": { + "community_id": "1:e5cZeUPf9fWSqRY+SUSG302spGE=", + "bytes": 173663, + "name": "default", + "transport": "tcp", + "type": "ipv4", + "iana_number": "6", + "packets": 68, + "direction": "internal" + }, + "cloud": { + "region": "us-east1", + "availability_zone": "us-east1-b", + "project": { + "id": "my-sample-project" + } + }, + "@timestamp": "2019-06-14T03:50:10.845Z", + "ecs": { + "version": "1.8.0" + }, + "related": { + "ip": [ + "198.51.100.248", + "10.87.40.76" + ] + }, + "gcp": { + "destination": { + "vpc": { + "project_id": "my-sample-project", + "subnetwork_name": "default", + "vpc_name": "default" + }, + "instance": { + "region": "us-east1", + "project_id": "my-sample-project", + "zone": "us-east1-b" + } + }, + "vpcflow": { + "reporter": "DEST", + "rtt": { + "ms": 1 + } + }, + "source": { + "vpc": { + "project_id": "my-sample-project", + "subnetwork_name": "default", + "vpc_name": "default" + }, + "instance": { + "region": "us-east1", + "project_id": "my-sample-project", + "zone": "us-east1-b" + } + } + }, + "event": { + "ingested": "2021-02-19T09:19:49.051077900Z", + "original": "{\"insertId\":\"ut8lbrffooxzb\",\"jsonPayload\":{\"bytes_sent\":\"173663\",\"connection\":{\"dest_ip\":\"10.87.40.76\",\"dest_port\":33970,\"protocol\":6,\"src_ip\":\"198.51.100.248\",\"src_port\":9200},\"dest_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"kibana\",\"zone\":\"us-east1-b\"},\"dest_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"end_time\":\"2019-06-14T03:49:51.821302149Z\",\"packets_sent\":\"68\",\"reporter\":\"DEST\",\"rtt_msec\":\"1\",\"src_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"elasticsearch\",\"zone\":\"us-east1-b\"},\"src_location\":{\"asn\":15169,\"continent\":\"America\",\"country\":\"usa\"},\"src_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"start_time\":\"2019-06-14T03:40:08.466657665Z\"},\"logName\":\"projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows\",\"receiveTimestamp\":\"2019-06-14T03:50:10.845445834Z\",\"resource\":{\"labels\":{\"location\":\"us-east1-b\",\"project_id\":\"my-sample-project\",\"subnetwork_id\":\"758019854043528829\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-06-14T03:50:10.845445834Z\"}", + "kind": "event", + "start": "2019-06-14T03:40:08.466657665Z", + "end": "2019-06-14T03:49:51.821302149Z", + "id": "ut8lbrffooxzb", + "category": "network", + "type": "connection" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | 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. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| destination.as.organization.name | Organization name. | keyword | +| destination.domain | Destination domain. | keyword | +| destination.geo.city_name | City name. | keyword | +| destination.geo.continent_name | Name of the continent. | keyword | +| destination.geo.country_iso_code | Country ISO code. | keyword | +| destination.geo.country_name | Country name. | keyword | +| destination.geo.location | Longitude and latitude. | geo_point | +| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| destination.geo.region_iso_code | Region ISO code. | keyword | +| destination.geo.region_name | Region name. | keyword | +| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | +| destination.port | Port of the destination. | long | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.dataset | Event dataset | constant_keyword | +| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | +| event.module | Event module | constant_keyword | +| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | +| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.instance.region | Region of the VM. | keyword | +| gcp.destination.instance.zone | Zone of the VM. | keyword | +| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.source.instance.region | Region of the VM. | keyword | +| gcp.source.instance.zone | Zone of the VM. | keyword | +| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.vpcflow.reporter | The side which reported the flow. Can be either 'SRC' or 'DEST'. | keyword | +| gcp.vpcflow.rtt.ms | Latency as measured (for TCP flows only) during the time interval. This is the time elapsed between sending a SEQ and receiving a corresponding ACK and it contains the network RTT as well as the application related delay. | long | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| input.type | Input type | keyword | +| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | +| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| network.bytes | Total bytes transferred in both directions. If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum. | long | +| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | +| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | +| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | +| network.name | Name given by operators to sections of their network. | keyword | +| network.packets | Total packets transferred in both directions. If `source.packets` and `destination.packets` are known, `network.packets` is their sum. | long | +| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | +| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | +| related.ip | All of the IPs seen on your event. | ip | +| related.user | All the user names or other user identifiers seen on the event. | keyword | +| rule.name | The name of the rule or signature generating the event. | keyword | +| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.bytes | Bytes sent from the source to the destination. | long | +| source.domain | Source domain. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| source.packets | Packets sent from the source to the destination. | long | +| source.port | Port of the source. | long | +| tags | List of keywords used to tag each event. | keyword | + diff --git a/packages/gcp/docs/metrics.md b/packages/gcp/docs/metrics.md new file mode 100644 index 00000000000..af398ae1c34 --- /dev/null +++ b/packages/gcp/docs/metrics.md @@ -0,0 +1,101 @@ +# Google Cloud Platform Metrics Integration + +The Google Cloud Platform Metrics integration collects and parses Google Cloud billing metrics. + +## Metrics + +### Billing + +This is the `billing` dataset. + +An example event for `billing` looks as following: + +```json +{ + "@timestamp": "2017-10-12T08:05:34.853Z", + "cloud": { + "account": { + "id": "01475F-5B1080-1137E7" + }, + "project": { + "id": "elastic-bi", + "name": "elastic-containerlib-prod" + }, + "provider": "gcp" + }, + "event": { + "dataset": "gcp.billing", + "duration": 115000, + "module": "gcp" + }, + "gcp": { + "billing": { + "billing_account_id": "01475F-5B1080-1137E7", + "cost_type": "regular", + "invoice_month": "202106", + "project_id": "containerlib-prod-12763", + "project_name": "elastic-containerlib-prod", + "total": 4717.170681 + } + }, + "metricset": { + "name": "billing", + "period": 10000 + }, + "service": { + "type": "gcp" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud | Fields related to the cloud or infrastructure the events are coming from. | group | +| cloud.account.id | 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. | keyword | +| cloud.account.name | The cloud account name or alias used to identify different entities in a multi-tenant environment. Examples: AWS account name, Google Cloud ORG display name. | keyword | +| cloud.availability_zone | Availability zone in which this host, resource, or service is located. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| error | These fields can represent errors of any kind. Use them for errors that happen while fetching events or in cases where the event itself contains an error. | group | +| error.message | Error message. | match_only_text | +| event.dataset | Event dataset | constant_keyword | +| event.module | Event module | constant_keyword | +| gcp.billing.billing_account_id | Project Billing Account ID. | keyword | +| gcp.billing.cost_type | Cost types include regular, tax, adjustment, and rounding_error. | keyword | +| gcp.billing.invoice_month | Billing report month. | keyword | +| gcp.billing.project_id | Project ID of the billing report belongs to. | keyword | +| gcp.billing.project_name | Project Name of the billing report belongs to. | keyword | +| gcp.billing.total | Total billing amount. | float | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| service.type | The type of the service data is collected from. The type can be used to group and correlate logs and metrics from one service type. Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. | keyword | From 6a2821ff28d054bfde262ae2bfa89c64899e6f36 Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Fri, 31 Dec 2021 10:11:30 -0600 Subject: [PATCH 03/28] [GCP] Add GCP Compute Metricset (#2301) --- packages/gcp/_dev/build/docs/audit.md | 12 + packages/gcp/_dev/build/docs/billing.md | 9 + packages/gcp/_dev/build/docs/firewall.md | 12 + packages/gcp/_dev/build/docs/logs.md | 30 - packages/gcp/_dev/build/docs/metrics.md | 13 - packages/gcp/_dev/build/docs/vpcflow.md | 13 + packages/gcp/docs/audit.md | 232 +++++++ packages/gcp/docs/{metrics.md => billing.md} | 6 +- packages/gcp/docs/firewall.md | 226 +++++++ packages/gcp/docs/logs.md | 671 ------------------- packages/gcp/docs/vpcflow.md | 217 ++++++ 11 files changed, 722 insertions(+), 719 deletions(-) create mode 100644 packages/gcp/_dev/build/docs/audit.md create mode 100644 packages/gcp/_dev/build/docs/billing.md create mode 100644 packages/gcp/_dev/build/docs/firewall.md delete mode 100644 packages/gcp/_dev/build/docs/logs.md delete mode 100644 packages/gcp/_dev/build/docs/metrics.md create mode 100644 packages/gcp/_dev/build/docs/vpcflow.md create mode 100644 packages/gcp/docs/audit.md rename packages/gcp/docs/{metrics.md => billing.md} (97%) create mode 100644 packages/gcp/docs/firewall.md delete mode 100644 packages/gcp/docs/logs.md create mode 100644 packages/gcp/docs/vpcflow.md diff --git a/packages/gcp/_dev/build/docs/audit.md b/packages/gcp/_dev/build/docs/audit.md new file mode 100644 index 00000000000..0b607aad4c3 --- /dev/null +++ b/packages/gcp/_dev/build/docs/audit.md @@ -0,0 +1,12 @@ +# Audit + +Google Cloud services write audit logs that record administrative activities and accesses within your Google Cloud resources. +More information on the type of data included in the audit logs can be found in the [documentation](https://cloud.google.com/logging/docs/audit) + +## Logs + +This is the `audit` dataset. + +{{event "audit"}} + +{{fields "audit"}} \ No newline at end of file diff --git a/packages/gcp/_dev/build/docs/billing.md b/packages/gcp/_dev/build/docs/billing.md new file mode 100644 index 00000000000..ce8b2204e76 --- /dev/null +++ b/packages/gcp/_dev/build/docs/billing.md @@ -0,0 +1,9 @@ +# Billing + +## Metrics + +This is the `billing` dataset. + +{{event "billing"}} + +{{fields "billing"}} \ No newline at end of file diff --git a/packages/gcp/_dev/build/docs/firewall.md b/packages/gcp/_dev/build/docs/firewall.md new file mode 100644 index 00000000000..0bef1c8bd45 --- /dev/null +++ b/packages/gcp/_dev/build/docs/firewall.md @@ -0,0 +1,12 @@ +# Firewall + +Firewall Rules Logging lets you audit, verify, and analyze the effects of your firewall rules. +More information on the type of data included in the firewall logs can be found in the [documentation](https://cloud.google.com/vpc/docs/firewall-rules-logging) + +## Logs + +This is the `firewall` dataset. + +{{event "firewall"}} + +{{fields "firewall"}} \ No newline at end of file diff --git a/packages/gcp/_dev/build/docs/logs.md b/packages/gcp/_dev/build/docs/logs.md deleted file mode 100644 index ccdbbca29e6..00000000000 --- a/packages/gcp/_dev/build/docs/logs.md +++ /dev/null @@ -1,30 +0,0 @@ -# Google Cloud Platform Logs Integration - -The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, -and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. - -## Logs - -### Audit - -This is the `audit` dataset. - -{{event "audit"}} - -{{fields "audit"}} - -### Firewall - -This is the `firewall` dataset. - -{{event "firewall"}} - -{{fields "firewall"}} - -### VPC Flow - -This is the `VPC Flow` dataset. - -{{event "vpcflow"}} - -{{fields "vpcflow"}} diff --git a/packages/gcp/_dev/build/docs/metrics.md b/packages/gcp/_dev/build/docs/metrics.md deleted file mode 100644 index 8a5b78d3cef..00000000000 --- a/packages/gcp/_dev/build/docs/metrics.md +++ /dev/null @@ -1,13 +0,0 @@ -# Google Cloud Platform Metrics Integration - -The Google Cloud Platform Metrics integration collects and parses Google Cloud billing metrics. - -## Metrics - -### Billing - -This is the `billing` dataset. - -{{event "billing"}} - -{{fields "billing"}} \ No newline at end of file diff --git a/packages/gcp/_dev/build/docs/vpcflow.md b/packages/gcp/_dev/build/docs/vpcflow.md new file mode 100644 index 00000000000..b51a3511522 --- /dev/null +++ b/packages/gcp/_dev/build/docs/vpcflow.md @@ -0,0 +1,13 @@ +# VPC Flow + +VPC Flow Logs records a sample of network flows sent from and received by VM instances, including instances used as GKE nodes. +These logs can be used for network monitoring, forensics, real-time security analysis, and expense optimization. +More information on the type of data included in the firewall logs can be found in the [documentation](https://cloud.google.com/vpc/docs/using-flow-logs) + +## Logs + +This is the `vpcflow` dataset. + +{{event "vpcflow"}} + +{{fields "vpcflow"}} \ No newline at end of file diff --git a/packages/gcp/docs/audit.md b/packages/gcp/docs/audit.md new file mode 100644 index 00000000000..1584aee2406 --- /dev/null +++ b/packages/gcp/docs/audit.md @@ -0,0 +1,232 @@ +# Audit + +Google Cloud services write audit logs that record administrative activities and accesses within your Google Cloud resources. +More information on the type of data included in the audit logs can be found in the [documentation](https://cloud.google.com/logging/docs/audit) + +## Logs + +This is the `audit` dataset. + +An example event for `audit` looks as following: + +```json +{ + "log": { + "logger": "projects/foo/logs/cloudaudit.googleapis.com%2Factivity" + }, + "source": { + "geo": { + "continent_name": "Europe", + "region_iso_code": "RU-MOW", + "city_name": "Moscow", + "country_iso_code": "RU", + "country_name": "Russia", + "region_name": "Moscow", + "location": { + "lon": 37.6172, + "lat": 55.7527 + } + }, + "ip": "1.2.3.4" + }, + "cloud": { + "project": { + "id": "foo" + } + }, + "@timestamp": "2020-08-05T21:59:26.456Z", + "ecs": { + "version": "1.8.0" + }, + "gcp": { + "audit": { + "request": { + "name": "windows-server-2016-v20200805", + "proto_name": "type.googleapis.com/compute.images.insert" + }, + "authentication_info": { + "principal_email": "user@mycompany.com" + }, + "method_name": "v1.compute.images.insert", + "request_metadata": { + "caller_ip": "1.2.3.4", + "caller_supplied_user_agent": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)" + }, + "response": { + "proto_name": "type.googleapis.com/operation", + "status": { + "value": "RUNNING" + } + }, + "service_name": "compute.googleapis.com", + "type": "type.googleapis.com/google.cloud.audit.AuditLog", + "authorization_info": [ + { + "resource_attributes": { + "name": "projects/foo/global/images/windows-server-2016-v20200805", + "type": "compute.images", + "service": "compute" + }, + "permission": "compute.images.create", + "granted": true + } + ], + "resource_name": "projects/foo/global/images/windows-server-2016-v20200805", + "resource_location": { + "current_locations": [ + "eu" + ] + } + } + }, + "service": { + "name": "compute.googleapis.com" + }, + "event": { + "action": "v1.compute.images.insert", + "ingested": "2021-02-19T09:19:47.732239800Z", + "original": "{\"insertId\":\"v2spcwdzmc2\",\"logName\":\"projects/foo/logs/cloudaudit.googleapis.com%2Factivity\",\"operation\":{\"first\":true,\"id\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"producer\":\"compute.googleapis.com\"},\"protoPayload\":{\"@type\":\"type.googleapis.com/google.cloud.audit.AuditLog\",\"authenticationInfo\":{\"principalEmail\":\"user@mycompany.com\"},\"authorizationInfo\":[{\"granted\":true,\"permission\":\"compute.images.create\",\"resourceAttributes\":{\"name\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"service\":\"compute\",\"type\":\"compute.images\"}}],\"methodName\":\"v1.compute.images.insert\",\"request\":{\"@type\":\"type.googleapis.com/compute.images.insert\",\"family\":\"windows-server-2016\",\"guestOsFeatures\":[{\"type\":\"VIRTIO_SCSI_MULTIQUEUE\"},{\"type\":\"WINDOWS\"}],\"name\":\"windows-server-2016-v20200805\",\"rawDisk\":{\"source\":\"https://storage.googleapis.com/storage/v1/b/foo/o/windows-server-2016-v20200805.tar.gz\"},\"sourceType\":\"RAW\"},\"requestMetadata\":{\"callerIp\":\"1.2.3.4\",\"callerSuppliedUserAgent\":\"google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)\",\"destinationAttributes\":{},\"requestAttributes\":{\"auth\":{},\"time\":\"2020-08-05T21:59:27.515Z\"}},\"resourceLocation\":{\"currentLocations\":[\"eu\"]},\"resourceName\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"response\":{\"@type\":\"type.googleapis.com/operation\",\"id\":\"44919313\",\"insertTime\":\"2020-08-05T14:59:27.259-07:00\",\"name\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"operationType\":\"insert\",\"progress\":\"0\",\"selfLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"selfLinkWithId\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/4491931805423146320\",\"startTime\":\"2020-08-05T14:59:27.274-07:00\",\"status\":\"RUNNING\",\"targetId\":\"12345\",\"targetLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/images/windows-server-2016-v20200805\",\"user\":\"user@mycompany.com\"},\"serviceName\":\"compute.googleapis.com\"},\"receiveTimestamp\":\"2020-08-05T21:59:27.822546978Z\",\"resource\":{\"labels\":{\"image_id\":\"771879043\",\"project_id\":\"foo\"},\"type\":\"gce_image\"},\"severity\":\"NOTICE\",\"timestamp\":\"2020-08-05T21:59:26.456Z\"}", + "id": "v2spcwdzmc2", + "kind": "event", + "outcome": "success" + }, + "user": { + "email": "user@mycompany.com" + }, + "user_agent": { + "name": "Other", + "original": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)", + "os": { + "name": "Mac OS X", + "version": "19.6.0", + "full": "Mac OS X 19.6.0" + }, + "device": { + "name": "Mac" + } + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | 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. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.dataset | Event dataset | constant_keyword | +| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | +| event.module | Event module | constant_keyword | +| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | +| gcp.audit.authentication_info.authority_selector | The authority selector specified by the requestor, if any. It is not guaranteed that the principal was allowed to use this authority. | keyword | +| gcp.audit.authentication_info.principal_email | The email address of the authenticated user making the request. | keyword | +| gcp.audit.authorization_info.granted | Whether or not authorization for resource and permission was granted. | boolean | +| gcp.audit.authorization_info.permission | The required IAM permission. | keyword | +| gcp.audit.authorization_info.resource_attributes.name | The name of the resource. | keyword | +| gcp.audit.authorization_info.resource_attributes.service | The name of the service. | keyword | +| gcp.audit.authorization_info.resource_attributes.type | The type of the resource. | keyword | +| gcp.audit.method_name | The name of the service method or operation. For API calls, this should be the name of the API method. For example, 'google.datastore.v1.Datastore.RunQuery'. | keyword | +| gcp.audit.num_response_items | The number of items returned from a List or Query API method, if applicable. | long | +| gcp.audit.request.filter | Filter of the request. | keyword | +| gcp.audit.request.name | Name of the request. | keyword | +| gcp.audit.request.proto_name | Type property of the request. | keyword | +| gcp.audit.request.resource_name | Name of the request resource. | keyword | +| gcp.audit.request_metadata.caller_ip | The IP address of the caller. | ip | +| gcp.audit.request_metadata.caller_supplied_user_agent | The user agent of the caller. This information is not authenticated and should be treated accordingly. | keyword | +| gcp.audit.resource_location.current_locations | Current locations of the resource. | keyword | +| gcp.audit.resource_name | The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example, 'shelves/SHELF_ID/books'. | keyword | +| gcp.audit.response.details.group | The name of the group. | keyword | +| gcp.audit.response.details.kind | The kind of the response details. | keyword | +| gcp.audit.response.details.name | The name of the response details. | keyword | +| gcp.audit.response.details.uid | The uid of the response details. | keyword | +| gcp.audit.response.proto_name | Type property of the response. | keyword | +| gcp.audit.response.status.allowed | | boolean | +| gcp.audit.response.status.reason | | keyword | +| gcp.audit.response.status.value | | keyword | +| gcp.audit.service_name | The name of the API service performing the operation. For example, datastore.googleapis.com. | keyword | +| gcp.audit.status.code | The status code, which should be an enum value of google.rpc.Code. | integer | +| gcp.audit.status.message | A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. | keyword | +| gcp.audit.type | Type property. | keyword | +| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.instance.region | Region of the VM. | keyword | +| gcp.destination.instance.zone | Zone of the VM. | keyword | +| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.source.instance.region | Region of the VM. | keyword | +| gcp.source.instance.zone | Zone of the VM. | keyword | +| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| input.type | Input type | keyword | +| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | +| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| orchestrator.api_version | API version being used to carry out the action | keyword | +| orchestrator.cluster.name | Name of the cluster. | keyword | +| orchestrator.cluster.url | URL of the API used to manage the cluster. | keyword | +| orchestrator.cluster.version | The version of the cluster. | keyword | +| orchestrator.namespace | Namespace in which the action is taking place. | keyword | +| orchestrator.organization | Organization affected by the event (for multi-tenant orchestrator setups). | keyword | +| orchestrator.resource.name | Name of the resource being acted upon. | keyword | +| orchestrator.resource.type | Type of resource being acted upon. | keyword | +| orchestrator.type | Orchestrator cluster type (e.g. kubernetes, nomad or cloudfoundry). | keyword | +| service.name | Name of the service data is collected from. The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name. In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| tags | List of keywords used to tag each event. | keyword | +| user.email | User email address. | keyword | +| user_agent.device.name | Name of the device. | keyword | +| user_agent.name | Name of the user agent. | keyword | +| user_agent.original | Unparsed user_agent string. | keyword | +| user_agent.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| user_agent.os.full | Operating system name, including the version or code name. | keyword | +| user_agent.os.kernel | Operating system kernel version as a raw string. | keyword | +| user_agent.os.name | Operating system name, without the version. | keyword | +| user_agent.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| user_agent.os.version | Operating system version as a raw string. | keyword | +| user_agent.version | Version of the user agent. | keyword | diff --git a/packages/gcp/docs/metrics.md b/packages/gcp/docs/billing.md similarity index 97% rename from packages/gcp/docs/metrics.md rename to packages/gcp/docs/billing.md index af398ae1c34..e373aa7040e 100644 --- a/packages/gcp/docs/metrics.md +++ b/packages/gcp/docs/billing.md @@ -1,11 +1,7 @@ -# Google Cloud Platform Metrics Integration - -The Google Cloud Platform Metrics integration collects and parses Google Cloud billing metrics. +# Billing ## Metrics -### Billing - This is the `billing` dataset. An example event for `billing` looks as following: diff --git a/packages/gcp/docs/firewall.md b/packages/gcp/docs/firewall.md new file mode 100644 index 00000000000..71f97bd2d37 --- /dev/null +++ b/packages/gcp/docs/firewall.md @@ -0,0 +1,226 @@ +# Firewall + +Firewall Rules Logging lets you audit, verify, and analyze the effects of your firewall rules. +More information on the type of data included in the firewall logs can be found in the [documentation](https://cloud.google.com/vpc/docs/firewall-rules-logging) + +## Logs + +This is the `firewall` dataset. + +An example event for `firewall` looks as following: + +```json +{ + "log": { + "logger": "projects/test-beats/logs/compute.googleapis.com%2Ffirewall" + }, + "destination": { + "geo": { + "continent_name": "North America", + "country_name": "United States", + "location": { + "lon": -97.822, + "lat": 37.751 + }, + "country_iso_code": "US" + }, + "as": { + "number": 15169, + "organization": { + "name": "Google LLC" + } + }, + "address": "8.8.8.8", + "port": 53, + "ip": "8.8.8.8" + }, + "rule": { + "name": "network:default/firewall:adrian-test-1" + }, + "source": { + "address": "10.128.0.16", + "port": 60094, + "domain": "adrian-test", + "ip": "10.128.0.16" + }, + "network": { + "name": "default", + "community_id": "1:iiDdIEXnxwSiz/hJbVnseQ4SZVE=", + "transport": "udp", + "type": "ipv4", + "iana_number": "17", + "direction": "outbound" + }, + "cloud": { + "region": "us-central1", + "availability_zone": "us-central1-a", + "project": { + "id": "test-beats" + } + }, + "@timestamp": "2019-11-12T12:35:17.214Z", + "ecs": { + "version": "1.8.0" + }, + "related": { + "ip": [ + "10.128.0.16", + "8.8.8.8" + ] + }, + "gcp": { + "firewall": { + "rule_details": { + "action": "DENY", + "target_tag": [ + "adrian-test" + ], + "priority": 1000, + "destination_range": [ + "8.8.8.0/24" + ], + "ip_port_info": [ + { + "ip_protocol": "ALL" + } + ], + "direction": "EGRESS" + } + }, + "source": { + "vpc": { + "project_id": "test-beats", + "subnetwork_name": "default", + "vpc_name": "default" + }, + "instance": { + "region": "us-central1", + "project_id": "test-beats", + "zone": "us-central1-a" + } + } + }, + "event": { + "ingested": "2021-02-19T09:19:48.040375200Z", + "original": "{\"insertId\":\"4zuj4nfn4llkb\",\"jsonPayload\":{\"connection\":{\"dest_ip\":\"8.8.8.8\",\"dest_port\":53,\"protocol\":17,\"src_ip\":\"10.128.0.16\",\"src_port\":60094},\"disposition\":\"DENIED\",\"instance\":{\"project_id\":\"test-beats\",\"region\":\"us-central1\",\"vm_name\":\"adrian-test\",\"zone\":\"us-central1-a\"},\"remote_location\":{\"continent\":\"America\",\"country\":\"usa\"},\"rule_details\":{\"action\":\"DENY\",\"destination_range\":[\"8.8.8.0/24\"],\"direction\":\"EGRESS\",\"ip_port_info\":[{\"ip_protocol\":\"ALL\"}],\"priority\":1000,\"reference\":\"network:default/firewall:adrian-test-1\",\"target_tag\":[\"adrian-test\"]},\"vpc\":{\"project_id\":\"test-beats\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"}},\"logName\":\"projects/test-beats/logs/compute.googleapis.com%2Ffirewall\",\"receiveTimestamp\":\"2019-11-12T12:35:24.466374097Z\",\"resource\":{\"labels\":{\"location\":\"us-central1-a\",\"project_id\":\"test-beats\",\"subnetwork_id\":\"1266623735137648253\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-11-12T12:35:17.214711274Z\"}", + "kind": "event", + "action": "firewall-rule", + "id": "4zuj4nfn4llkb", + "category": "network", + "type": "connection" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | 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. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| destination.as.organization.name | Organization name. | keyword | +| destination.domain | Destination domain. | keyword | +| destination.geo.city_name | City name. | keyword | +| destination.geo.continent_name | Name of the continent. | keyword | +| destination.geo.country_iso_code | Country ISO code. | keyword | +| destination.geo.country_name | Country name. | keyword | +| destination.geo.location | Longitude and latitude. | geo_point | +| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| destination.geo.region_iso_code | Region ISO code. | keyword | +| destination.geo.region_name | Region name. | keyword | +| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | +| destination.port | Port of the destination. | long | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.dataset | Event dataset | constant_keyword | +| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | +| event.module | Event module | constant_keyword | +| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | +| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.instance.region | Region of the VM. | keyword | +| gcp.destination.instance.zone | Zone of the VM. | keyword | +| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.firewall.rule_details.action | Action that the rule performs on match. | keyword | +| gcp.firewall.rule_details.destination_range | List of destination ranges that the firewall applies to. | keyword | +| gcp.firewall.rule_details.direction | Direction of traffic that matches this rule. | keyword | +| gcp.firewall.rule_details.ip_port_info | List of ip protocols and applicable port ranges for rules. | array | +| gcp.firewall.rule_details.priority | The priority for the firewall rule. | long | +| gcp.firewall.rule_details.reference | Reference to the firewall rule. | keyword | +| gcp.firewall.rule_details.source_range | List of source ranges that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.source_service_account | List of all the source service accounts that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.source_tag | List of all the source tags that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.target_service_account | List of all the target service accounts that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.target_tag | List of all the target tags that the firewall rule applies to. | keyword | +| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.source.instance.region | Region of the VM. | keyword | +| gcp.source.instance.zone | Zone of the VM. | keyword | +| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| input.type | Input type | keyword | +| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | +| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | +| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | +| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | +| network.name | Name given by operators to sections of their network. | keyword | +| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | +| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | +| related.ip | All of the IPs seen on your event. | ip | +| related.user | All the user names or other user identifiers seen on the event. | keyword | +| rule.name | The name of the rule or signature generating the event. | keyword | +| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.domain | Source domain. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| source.port | Port of the source. | long | +| tags | List of keywords used to tag each event. | keyword | diff --git a/packages/gcp/docs/logs.md b/packages/gcp/docs/logs.md deleted file mode 100644 index 7a58835a573..00000000000 --- a/packages/gcp/docs/logs.md +++ /dev/null @@ -1,671 +0,0 @@ -# Google Cloud Platform Logs Integration - -The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, -and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. - -## Logs - -### Audit - -This is the `audit` dataset. - -An example event for `audit` looks as following: - -```json -{ - "log": { - "logger": "projects/foo/logs/cloudaudit.googleapis.com%2Factivity" - }, - "source": { - "geo": { - "continent_name": "Europe", - "region_iso_code": "RU-MOW", - "city_name": "Moscow", - "country_iso_code": "RU", - "country_name": "Russia", - "region_name": "Moscow", - "location": { - "lon": 37.6172, - "lat": 55.7527 - } - }, - "ip": "1.2.3.4" - }, - "cloud": { - "project": { - "id": "foo" - } - }, - "@timestamp": "2020-08-05T21:59:26.456Z", - "ecs": { - "version": "1.8.0" - }, - "gcp": { - "audit": { - "request": { - "name": "windows-server-2016-v20200805", - "proto_name": "type.googleapis.com/compute.images.insert" - }, - "authentication_info": { - "principal_email": "user@mycompany.com" - }, - "method_name": "v1.compute.images.insert", - "request_metadata": { - "caller_ip": "1.2.3.4", - "caller_supplied_user_agent": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)" - }, - "response": { - "proto_name": "type.googleapis.com/operation", - "status": { - "value": "RUNNING" - } - }, - "service_name": "compute.googleapis.com", - "type": "type.googleapis.com/google.cloud.audit.AuditLog", - "authorization_info": [ - { - "resource_attributes": { - "name": "projects/foo/global/images/windows-server-2016-v20200805", - "type": "compute.images", - "service": "compute" - }, - "permission": "compute.images.create", - "granted": true - } - ], - "resource_name": "projects/foo/global/images/windows-server-2016-v20200805", - "resource_location": { - "current_locations": [ - "eu" - ] - } - } - }, - "service": { - "name": "compute.googleapis.com" - }, - "event": { - "action": "v1.compute.images.insert", - "ingested": "2021-02-19T09:19:47.732239800Z", - "original": "{\"insertId\":\"v2spcwdzmc2\",\"logName\":\"projects/foo/logs/cloudaudit.googleapis.com%2Factivity\",\"operation\":{\"first\":true,\"id\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"producer\":\"compute.googleapis.com\"},\"protoPayload\":{\"@type\":\"type.googleapis.com/google.cloud.audit.AuditLog\",\"authenticationInfo\":{\"principalEmail\":\"user@mycompany.com\"},\"authorizationInfo\":[{\"granted\":true,\"permission\":\"compute.images.create\",\"resourceAttributes\":{\"name\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"service\":\"compute\",\"type\":\"compute.images\"}}],\"methodName\":\"v1.compute.images.insert\",\"request\":{\"@type\":\"type.googleapis.com/compute.images.insert\",\"family\":\"windows-server-2016\",\"guestOsFeatures\":[{\"type\":\"VIRTIO_SCSI_MULTIQUEUE\"},{\"type\":\"WINDOWS\"}],\"name\":\"windows-server-2016-v20200805\",\"rawDisk\":{\"source\":\"https://storage.googleapis.com/storage/v1/b/foo/o/windows-server-2016-v20200805.tar.gz\"},\"sourceType\":\"RAW\"},\"requestMetadata\":{\"callerIp\":\"1.2.3.4\",\"callerSuppliedUserAgent\":\"google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)\",\"destinationAttributes\":{},\"requestAttributes\":{\"auth\":{},\"time\":\"2020-08-05T21:59:27.515Z\"}},\"resourceLocation\":{\"currentLocations\":[\"eu\"]},\"resourceName\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"response\":{\"@type\":\"type.googleapis.com/operation\",\"id\":\"44919313\",\"insertTime\":\"2020-08-05T14:59:27.259-07:00\",\"name\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"operationType\":\"insert\",\"progress\":\"0\",\"selfLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"selfLinkWithId\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/4491931805423146320\",\"startTime\":\"2020-08-05T14:59:27.274-07:00\",\"status\":\"RUNNING\",\"targetId\":\"12345\",\"targetLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/images/windows-server-2016-v20200805\",\"user\":\"user@mycompany.com\"},\"serviceName\":\"compute.googleapis.com\"},\"receiveTimestamp\":\"2020-08-05T21:59:27.822546978Z\",\"resource\":{\"labels\":{\"image_id\":\"771879043\",\"project_id\":\"foo\"},\"type\":\"gce_image\"},\"severity\":\"NOTICE\",\"timestamp\":\"2020-08-05T21:59:26.456Z\"}", - "id": "v2spcwdzmc2", - "kind": "event", - "outcome": "success" - }, - "user": { - "email": "user@mycompany.com" - }, - "user_agent": { - "name": "Other", - "original": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)", - "os": { - "name": "Mac OS X", - "version": "19.6.0", - "full": "Mac OS X 19.6.0" - }, - "device": { - "name": "Mac" - } - } -} -``` - -**Exported fields** - -| Field | Description | Type | -|---|---|---| -| @timestamp | Event timestamp. | date | -| cloud.account.id | 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. | keyword | -| cloud.availability_zone | Availability zone in which this host is running. | keyword | -| cloud.image.id | Image ID for the cloud instance. | keyword | -| cloud.instance.id | Instance ID of the host machine. | keyword | -| cloud.instance.name | Instance name of the host machine. | keyword | -| cloud.machine.type | Machine type of the host machine. | keyword | -| cloud.project.id | Name of the project in Google Cloud. | keyword | -| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | -| cloud.region | Region in which this host is running. | keyword | -| container.id | Unique container id. | keyword | -| container.image.name | Name of the image the container was built on. | keyword | -| container.labels | Image labels. | object | -| container.name | Container name. | keyword | -| container.runtime | Runtime managing this container. | keyword | -| data_stream.dataset | Data stream dataset. | constant_keyword | -| data_stream.namespace | Data stream namespace. | constant_keyword | -| data_stream.type | Data stream type. | constant_keyword | -| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | -| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | -| event.dataset | Event dataset | constant_keyword | -| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | -| event.module | Event module | constant_keyword | -| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | -| gcp.audit.authentication_info.authority_selector | The authority selector specified by the requestor, if any. It is not guaranteed that the principal was allowed to use this authority. | keyword | -| gcp.audit.authentication_info.principal_email | The email address of the authenticated user making the request. | keyword | -| gcp.audit.authorization_info.granted | Whether or not authorization for resource and permission was granted. | boolean | -| gcp.audit.authorization_info.permission | The required IAM permission. | keyword | -| gcp.audit.authorization_info.resource_attributes.name | The name of the resource. | keyword | -| gcp.audit.authorization_info.resource_attributes.service | The name of the service. | keyword | -| gcp.audit.authorization_info.resource_attributes.type | The type of the resource. | keyword | -| gcp.audit.method_name | The name of the service method or operation. For API calls, this should be the name of the API method. For example, 'google.datastore.v1.Datastore.RunQuery'. | keyword | -| gcp.audit.num_response_items | The number of items returned from a List or Query API method, if applicable. | long | -| gcp.audit.request.filter | Filter of the request. | keyword | -| gcp.audit.request.name | Name of the request. | keyword | -| gcp.audit.request.proto_name | Type property of the request. | keyword | -| gcp.audit.request.resource_name | Name of the request resource. | keyword | -| gcp.audit.request_metadata.caller_ip | The IP address of the caller. | ip | -| gcp.audit.request_metadata.caller_supplied_user_agent | The user agent of the caller. This information is not authenticated and should be treated accordingly. | keyword | -| gcp.audit.resource_location.current_locations | Current locations of the resource. | keyword | -| gcp.audit.resource_name | The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example, 'shelves/SHELF_ID/books'. | keyword | -| gcp.audit.response.details.group | The name of the group. | keyword | -| gcp.audit.response.details.kind | The kind of the response details. | keyword | -| gcp.audit.response.details.name | The name of the response details. | keyword | -| gcp.audit.response.details.uid | The uid of the response details. | keyword | -| gcp.audit.response.proto_name | Type property of the response. | keyword | -| gcp.audit.response.status.allowed | | boolean | -| gcp.audit.response.status.reason | | keyword | -| gcp.audit.response.status.value | | keyword | -| gcp.audit.service_name | The name of the API service performing the operation. For example, datastore.googleapis.com. | keyword | -| gcp.audit.status.code | The status code, which should be an enum value of google.rpc.Code. | integer | -| gcp.audit.status.message | A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. | keyword | -| gcp.audit.type | Type property. | keyword | -| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.instance.region | Region of the VM. | keyword | -| gcp.destination.instance.zone | Zone of the VM. | keyword | -| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.source.instance.region | Region of the VM. | keyword | -| gcp.source.instance.zone | Zone of the VM. | keyword | -| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| host.architecture | Operating system architecture. | keyword | -| host.containerized | If the host is a container. | boolean | -| host.domain | 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. | keyword | -| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | -| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | -| host.ip | Host ip addresses. | ip | -| host.mac | Host mac addresses. | keyword | -| host.name | 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. | keyword | -| host.os.build | OS build information. | keyword | -| host.os.codename | OS codename, if any. | keyword | -| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | -| host.os.kernel | Operating system kernel version as a raw string. | keyword | -| host.os.name | Operating system name, without the version. | keyword | -| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | -| host.os.version | Operating system version as a raw string. | keyword | -| host.type | 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. | keyword | -| input.type | Input type | keyword | -| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | -| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | -| log.offset | Log offset | long | -| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | -| orchestrator.api_version | API version being used to carry out the action | keyword | -| orchestrator.cluster.name | Name of the cluster. | keyword | -| orchestrator.cluster.url | URL of the API used to manage the cluster. | keyword | -| orchestrator.cluster.version | The version of the cluster. | keyword | -| orchestrator.namespace | Namespace in which the action is taking place. | keyword | -| orchestrator.organization | Organization affected by the event (for multi-tenant orchestrator setups). | keyword | -| orchestrator.resource.name | Name of the resource being acted upon. | keyword | -| orchestrator.resource.type | Type of resource being acted upon. | keyword | -| orchestrator.type | Orchestrator cluster type (e.g. kubernetes, nomad or cloudfoundry). | keyword | -| service.name | Name of the service data is collected from. The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name. In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified. | keyword | -| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| source.as.organization.name | Organization name. | keyword | -| source.geo.city_name | City name. | keyword | -| source.geo.continent_name | Name of the continent. | keyword | -| source.geo.country_iso_code | Country ISO code. | keyword | -| source.geo.country_name | Country name. | keyword | -| source.geo.location | Longitude and latitude. | geo_point | -| source.geo.region_iso_code | Region ISO code. | keyword | -| source.geo.region_name | Region name. | keyword | -| source.ip | IP address of the source (IPv4 or IPv6). | ip | -| tags | List of keywords used to tag each event. | keyword | -| user.email | User email address. | keyword | -| user_agent.device.name | Name of the device. | keyword | -| user_agent.name | Name of the user agent. | keyword | -| user_agent.original | Unparsed user_agent string. | keyword | -| user_agent.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | -| user_agent.os.full | Operating system name, including the version or code name. | keyword | -| user_agent.os.kernel | Operating system kernel version as a raw string. | keyword | -| user_agent.os.name | Operating system name, without the version. | keyword | -| user_agent.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | -| user_agent.os.version | Operating system version as a raw string. | keyword | -| user_agent.version | Version of the user agent. | keyword | - - -### Firewall - -This is the `firewall` dataset. - -An example event for `firewall` looks as following: - -```json -{ - "log": { - "logger": "projects/test-beats/logs/compute.googleapis.com%2Ffirewall" - }, - "destination": { - "geo": { - "continent_name": "North America", - "country_name": "United States", - "location": { - "lon": -97.822, - "lat": 37.751 - }, - "country_iso_code": "US" - }, - "as": { - "number": 15169, - "organization": { - "name": "Google LLC" - } - }, - "address": "8.8.8.8", - "port": 53, - "ip": "8.8.8.8" - }, - "rule": { - "name": "network:default/firewall:adrian-test-1" - }, - "source": { - "address": "10.128.0.16", - "port": 60094, - "domain": "adrian-test", - "ip": "10.128.0.16" - }, - "network": { - "name": "default", - "community_id": "1:iiDdIEXnxwSiz/hJbVnseQ4SZVE=", - "transport": "udp", - "type": "ipv4", - "iana_number": "17", - "direction": "outbound" - }, - "cloud": { - "region": "us-central1", - "availability_zone": "us-central1-a", - "project": { - "id": "test-beats" - } - }, - "@timestamp": "2019-11-12T12:35:17.214Z", - "ecs": { - "version": "1.8.0" - }, - "related": { - "ip": [ - "10.128.0.16", - "8.8.8.8" - ] - }, - "gcp": { - "firewall": { - "rule_details": { - "action": "DENY", - "target_tag": [ - "adrian-test" - ], - "priority": 1000, - "destination_range": [ - "8.8.8.0/24" - ], - "ip_port_info": [ - { - "ip_protocol": "ALL" - } - ], - "direction": "EGRESS" - } - }, - "source": { - "vpc": { - "project_id": "test-beats", - "subnetwork_name": "default", - "vpc_name": "default" - }, - "instance": { - "region": "us-central1", - "project_id": "test-beats", - "zone": "us-central1-a" - } - } - }, - "event": { - "ingested": "2021-02-19T09:19:48.040375200Z", - "original": "{\"insertId\":\"4zuj4nfn4llkb\",\"jsonPayload\":{\"connection\":{\"dest_ip\":\"8.8.8.8\",\"dest_port\":53,\"protocol\":17,\"src_ip\":\"10.128.0.16\",\"src_port\":60094},\"disposition\":\"DENIED\",\"instance\":{\"project_id\":\"test-beats\",\"region\":\"us-central1\",\"vm_name\":\"adrian-test\",\"zone\":\"us-central1-a\"},\"remote_location\":{\"continent\":\"America\",\"country\":\"usa\"},\"rule_details\":{\"action\":\"DENY\",\"destination_range\":[\"8.8.8.0/24\"],\"direction\":\"EGRESS\",\"ip_port_info\":[{\"ip_protocol\":\"ALL\"}],\"priority\":1000,\"reference\":\"network:default/firewall:adrian-test-1\",\"target_tag\":[\"adrian-test\"]},\"vpc\":{\"project_id\":\"test-beats\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"}},\"logName\":\"projects/test-beats/logs/compute.googleapis.com%2Ffirewall\",\"receiveTimestamp\":\"2019-11-12T12:35:24.466374097Z\",\"resource\":{\"labels\":{\"location\":\"us-central1-a\",\"project_id\":\"test-beats\",\"subnetwork_id\":\"1266623735137648253\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-11-12T12:35:17.214711274Z\"}", - "kind": "event", - "action": "firewall-rule", - "id": "4zuj4nfn4llkb", - "category": "network", - "type": "connection" - } -} -``` - -**Exported fields** - -| Field | Description | Type | -|---|---|---| -| @timestamp | Event timestamp. | date | -| cloud.account.id | 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. | keyword | -| cloud.availability_zone | Availability zone in which this host is running. | keyword | -| cloud.image.id | Image ID for the cloud instance. | keyword | -| cloud.instance.id | Instance ID of the host machine. | keyword | -| cloud.instance.name | Instance name of the host machine. | keyword | -| cloud.machine.type | Machine type of the host machine. | keyword | -| cloud.project.id | Name of the project in Google Cloud. | keyword | -| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | -| cloud.region | Region in which this host is running. | keyword | -| container.id | Unique container id. | keyword | -| container.image.name | Name of the image the container was built on. | keyword | -| container.labels | Image labels. | object | -| container.name | Container name. | keyword | -| container.runtime | Runtime managing this container. | keyword | -| data_stream.dataset | Data stream dataset. | constant_keyword | -| data_stream.namespace | Data stream namespace. | constant_keyword | -| data_stream.type | Data stream type. | constant_keyword | -| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | -| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| destination.as.organization.name | Organization name. | keyword | -| destination.domain | Destination domain. | keyword | -| destination.geo.city_name | City name. | keyword | -| destination.geo.continent_name | Name of the continent. | keyword | -| destination.geo.country_iso_code | Country ISO code. | keyword | -| destination.geo.country_name | Country name. | keyword | -| destination.geo.location | Longitude and latitude. | geo_point | -| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | -| destination.geo.region_iso_code | Region ISO code. | keyword | -| destination.geo.region_name | Region name. | keyword | -| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | -| destination.port | Port of the destination. | long | -| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | -| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | -| event.dataset | Event dataset | constant_keyword | -| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | -| event.module | Event module | constant_keyword | -| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | -| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.instance.region | Region of the VM. | keyword | -| gcp.destination.instance.zone | Zone of the VM. | keyword | -| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| gcp.firewall.rule_details.action | Action that the rule performs on match. | keyword | -| gcp.firewall.rule_details.destination_range | List of destination ranges that the firewall applies to. | keyword | -| gcp.firewall.rule_details.direction | Direction of traffic that matches this rule. | keyword | -| gcp.firewall.rule_details.ip_port_info | List of ip protocols and applicable port ranges for rules. | array | -| gcp.firewall.rule_details.priority | The priority for the firewall rule. | long | -| gcp.firewall.rule_details.reference | Reference to the firewall rule. | keyword | -| gcp.firewall.rule_details.source_range | List of source ranges that the firewall rule applies to. | keyword | -| gcp.firewall.rule_details.source_service_account | List of all the source service accounts that the firewall rule applies to. | keyword | -| gcp.firewall.rule_details.source_tag | List of all the source tags that the firewall rule applies to. | keyword | -| gcp.firewall.rule_details.target_service_account | List of all the target service accounts that the firewall rule applies to. | keyword | -| gcp.firewall.rule_details.target_tag | List of all the target tags that the firewall rule applies to. | keyword | -| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.source.instance.region | Region of the VM. | keyword | -| gcp.source.instance.zone | Zone of the VM. | keyword | -| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| host.architecture | Operating system architecture. | keyword | -| host.containerized | If the host is a container. | boolean | -| host.domain | 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. | keyword | -| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | -| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | -| host.ip | Host ip addresses. | ip | -| host.mac | Host mac addresses. | keyword | -| host.name | 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. | keyword | -| host.os.build | OS build information. | keyword | -| host.os.codename | OS codename, if any. | keyword | -| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | -| host.os.kernel | Operating system kernel version as a raw string. | keyword | -| host.os.name | Operating system name, without the version. | keyword | -| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | -| host.os.version | Operating system version as a raw string. | keyword | -| host.type | 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. | keyword | -| input.type | Input type | keyword | -| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | -| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | -| log.offset | Log offset | long | -| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | -| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | -| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | -| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | -| network.name | Name given by operators to sections of their network. | keyword | -| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | -| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | -| related.ip | All of the IPs seen on your event. | ip | -| related.user | All the user names or other user identifiers seen on the event. | keyword | -| rule.name | The name of the rule or signature generating the event. | keyword | -| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | -| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| source.as.organization.name | Organization name. | keyword | -| source.domain | Source domain. | keyword | -| source.geo.city_name | City name. | keyword | -| source.geo.continent_name | Name of the continent. | keyword | -| source.geo.country_iso_code | Country ISO code. | keyword | -| source.geo.country_name | Country name. | keyword | -| source.geo.location | Longitude and latitude. | geo_point | -| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | -| source.geo.region_iso_code | Region ISO code. | keyword | -| source.geo.region_name | Region name. | keyword | -| source.ip | IP address of the source (IPv4 or IPv6). | ip | -| source.port | Port of the source. | long | -| tags | List of keywords used to tag each event. | keyword | - - -### VPC Flow - -This is the `VPC Flow` dataset. - -An example event for `vpcflow` looks as following: - -```json -{ - "log": { - "logger": "projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows" - }, - "destination": { - "address": "10.87.40.76", - "port": 33970, - "domain": "kibana", - "ip": "10.87.40.76" - }, - "source": { - "geo": { - "continent_name": "America", - "country_name": "usa" - }, - "as": { - "number": 15169 - }, - "address": "198.51.100.248", - "port": 9200, - "bytes": 173663, - "domain": "elasticsearch", - "ip": "198.51.100.248", - "packets": 68 - }, - "network": { - "community_id": "1:e5cZeUPf9fWSqRY+SUSG302spGE=", - "bytes": 173663, - "name": "default", - "transport": "tcp", - "type": "ipv4", - "iana_number": "6", - "packets": 68, - "direction": "internal" - }, - "cloud": { - "region": "us-east1", - "availability_zone": "us-east1-b", - "project": { - "id": "my-sample-project" - } - }, - "@timestamp": "2019-06-14T03:50:10.845Z", - "ecs": { - "version": "1.8.0" - }, - "related": { - "ip": [ - "198.51.100.248", - "10.87.40.76" - ] - }, - "gcp": { - "destination": { - "vpc": { - "project_id": "my-sample-project", - "subnetwork_name": "default", - "vpc_name": "default" - }, - "instance": { - "region": "us-east1", - "project_id": "my-sample-project", - "zone": "us-east1-b" - } - }, - "vpcflow": { - "reporter": "DEST", - "rtt": { - "ms": 1 - } - }, - "source": { - "vpc": { - "project_id": "my-sample-project", - "subnetwork_name": "default", - "vpc_name": "default" - }, - "instance": { - "region": "us-east1", - "project_id": "my-sample-project", - "zone": "us-east1-b" - } - } - }, - "event": { - "ingested": "2021-02-19T09:19:49.051077900Z", - "original": "{\"insertId\":\"ut8lbrffooxzb\",\"jsonPayload\":{\"bytes_sent\":\"173663\",\"connection\":{\"dest_ip\":\"10.87.40.76\",\"dest_port\":33970,\"protocol\":6,\"src_ip\":\"198.51.100.248\",\"src_port\":9200},\"dest_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"kibana\",\"zone\":\"us-east1-b\"},\"dest_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"end_time\":\"2019-06-14T03:49:51.821302149Z\",\"packets_sent\":\"68\",\"reporter\":\"DEST\",\"rtt_msec\":\"1\",\"src_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"elasticsearch\",\"zone\":\"us-east1-b\"},\"src_location\":{\"asn\":15169,\"continent\":\"America\",\"country\":\"usa\"},\"src_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"start_time\":\"2019-06-14T03:40:08.466657665Z\"},\"logName\":\"projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows\",\"receiveTimestamp\":\"2019-06-14T03:50:10.845445834Z\",\"resource\":{\"labels\":{\"location\":\"us-east1-b\",\"project_id\":\"my-sample-project\",\"subnetwork_id\":\"758019854043528829\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-06-14T03:50:10.845445834Z\"}", - "kind": "event", - "start": "2019-06-14T03:40:08.466657665Z", - "end": "2019-06-14T03:49:51.821302149Z", - "id": "ut8lbrffooxzb", - "category": "network", - "type": "connection" - } -} -``` - -**Exported fields** - -| Field | Description | Type | -|---|---|---| -| @timestamp | Event timestamp. | date | -| cloud.account.id | 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. | keyword | -| cloud.availability_zone | Availability zone in which this host is running. | keyword | -| cloud.image.id | Image ID for the cloud instance. | keyword | -| cloud.instance.id | Instance ID of the host machine. | keyword | -| cloud.instance.name | Instance name of the host machine. | keyword | -| cloud.machine.type | Machine type of the host machine. | keyword | -| cloud.project.id | Name of the project in Google Cloud. | keyword | -| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | -| cloud.region | Region in which this host is running. | keyword | -| container.id | Unique container id. | keyword | -| container.image.name | Name of the image the container was built on. | keyword | -| container.labels | Image labels. | object | -| container.name | Container name. | keyword | -| container.runtime | Runtime managing this container. | keyword | -| data_stream.dataset | Data stream dataset. | constant_keyword | -| data_stream.namespace | Data stream namespace. | constant_keyword | -| data_stream.type | Data stream type. | constant_keyword | -| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | -| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| destination.as.organization.name | Organization name. | keyword | -| destination.domain | Destination domain. | keyword | -| destination.geo.city_name | City name. | keyword | -| destination.geo.continent_name | Name of the continent. | keyword | -| destination.geo.country_iso_code | Country ISO code. | keyword | -| destination.geo.country_name | Country name. | keyword | -| destination.geo.location | Longitude and latitude. | geo_point | -| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | -| destination.geo.region_iso_code | Region ISO code. | keyword | -| destination.geo.region_name | Region name. | keyword | -| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | -| destination.port | Port of the destination. | long | -| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | -| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | -| event.dataset | Event dataset | constant_keyword | -| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | -| event.module | Event module | constant_keyword | -| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | -| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.instance.region | Region of the VM. | keyword | -| gcp.destination.instance.zone | Zone of the VM. | keyword | -| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.source.instance.region | Region of the VM. | keyword | -| gcp.source.instance.zone | Zone of the VM. | keyword | -| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| gcp.vpcflow.reporter | The side which reported the flow. Can be either 'SRC' or 'DEST'. | keyword | -| gcp.vpcflow.rtt.ms | Latency as measured (for TCP flows only) during the time interval. This is the time elapsed between sending a SEQ and receiving a corresponding ACK and it contains the network RTT as well as the application related delay. | long | -| host.architecture | Operating system architecture. | keyword | -| host.containerized | If the host is a container. | boolean | -| host.domain | 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. | keyword | -| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | -| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | -| host.ip | Host ip addresses. | ip | -| host.mac | Host mac addresses. | keyword | -| host.name | 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. | keyword | -| host.os.build | OS build information. | keyword | -| host.os.codename | OS codename, if any. | keyword | -| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | -| host.os.kernel | Operating system kernel version as a raw string. | keyword | -| host.os.name | Operating system name, without the version. | keyword | -| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | -| host.os.version | Operating system version as a raw string. | keyword | -| host.type | 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. | keyword | -| input.type | Input type | keyword | -| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | -| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | -| log.offset | Log offset | long | -| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | -| network.bytes | Total bytes transferred in both directions. If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum. | long | -| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | -| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | -| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | -| network.name | Name given by operators to sections of their network. | keyword | -| network.packets | Total packets transferred in both directions. If `source.packets` and `destination.packets` are known, `network.packets` is their sum. | long | -| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | -| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | -| related.ip | All of the IPs seen on your event. | ip | -| related.user | All the user names or other user identifiers seen on the event. | keyword | -| rule.name | The name of the rule or signature generating the event. | keyword | -| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | -| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| source.as.organization.name | Organization name. | keyword | -| source.bytes | Bytes sent from the source to the destination. | long | -| source.domain | Source domain. | keyword | -| source.geo.city_name | City name. | keyword | -| source.geo.continent_name | Name of the continent. | keyword | -| source.geo.country_iso_code | Country ISO code. | keyword | -| source.geo.country_name | Country name. | keyword | -| source.geo.location | Longitude and latitude. | geo_point | -| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | -| source.geo.region_iso_code | Region ISO code. | keyword | -| source.geo.region_name | Region name. | keyword | -| source.ip | IP address of the source (IPv4 or IPv6). | ip | -| source.packets | Packets sent from the source to the destination. | long | -| source.port | Port of the source. | long | -| tags | List of keywords used to tag each event. | keyword | - diff --git a/packages/gcp/docs/vpcflow.md b/packages/gcp/docs/vpcflow.md new file mode 100644 index 00000000000..debb8d38ade --- /dev/null +++ b/packages/gcp/docs/vpcflow.md @@ -0,0 +1,217 @@ +# VPC Flow + +VPC Flow Logs records a sample of network flows sent from and received by VM instances, including instances used as GKE nodes. +These logs can be used for network monitoring, forensics, real-time security analysis, and expense optimization. +More information on the type of data included in the firewall logs can be found in the [documentation](https://cloud.google.com/vpc/docs/using-flow-logs) + +## Logs + +This is the `vpcflow` dataset. + +An example event for `vpcflow` looks as following: + +```json +{ + "log": { + "logger": "projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows" + }, + "destination": { + "address": "10.87.40.76", + "port": 33970, + "domain": "kibana", + "ip": "10.87.40.76" + }, + "source": { + "geo": { + "continent_name": "America", + "country_name": "usa" + }, + "as": { + "number": 15169 + }, + "address": "198.51.100.248", + "port": 9200, + "bytes": 173663, + "domain": "elasticsearch", + "ip": "198.51.100.248", + "packets": 68 + }, + "network": { + "community_id": "1:e5cZeUPf9fWSqRY+SUSG302spGE=", + "bytes": 173663, + "name": "default", + "transport": "tcp", + "type": "ipv4", + "iana_number": "6", + "packets": 68, + "direction": "internal" + }, + "cloud": { + "region": "us-east1", + "availability_zone": "us-east1-b", + "project": { + "id": "my-sample-project" + } + }, + "@timestamp": "2019-06-14T03:50:10.845Z", + "ecs": { + "version": "1.8.0" + }, + "related": { + "ip": [ + "198.51.100.248", + "10.87.40.76" + ] + }, + "gcp": { + "destination": { + "vpc": { + "project_id": "my-sample-project", + "subnetwork_name": "default", + "vpc_name": "default" + }, + "instance": { + "region": "us-east1", + "project_id": "my-sample-project", + "zone": "us-east1-b" + } + }, + "vpcflow": { + "reporter": "DEST", + "rtt": { + "ms": 1 + } + }, + "source": { + "vpc": { + "project_id": "my-sample-project", + "subnetwork_name": "default", + "vpc_name": "default" + }, + "instance": { + "region": "us-east1", + "project_id": "my-sample-project", + "zone": "us-east1-b" + } + } + }, + "event": { + "ingested": "2021-02-19T09:19:49.051077900Z", + "original": "{\"insertId\":\"ut8lbrffooxzb\",\"jsonPayload\":{\"bytes_sent\":\"173663\",\"connection\":{\"dest_ip\":\"10.87.40.76\",\"dest_port\":33970,\"protocol\":6,\"src_ip\":\"198.51.100.248\",\"src_port\":9200},\"dest_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"kibana\",\"zone\":\"us-east1-b\"},\"dest_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"end_time\":\"2019-06-14T03:49:51.821302149Z\",\"packets_sent\":\"68\",\"reporter\":\"DEST\",\"rtt_msec\":\"1\",\"src_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"elasticsearch\",\"zone\":\"us-east1-b\"},\"src_location\":{\"asn\":15169,\"continent\":\"America\",\"country\":\"usa\"},\"src_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"start_time\":\"2019-06-14T03:40:08.466657665Z\"},\"logName\":\"projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows\",\"receiveTimestamp\":\"2019-06-14T03:50:10.845445834Z\",\"resource\":{\"labels\":{\"location\":\"us-east1-b\",\"project_id\":\"my-sample-project\",\"subnetwork_id\":\"758019854043528829\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-06-14T03:50:10.845445834Z\"}", + "kind": "event", + "start": "2019-06-14T03:40:08.466657665Z", + "end": "2019-06-14T03:49:51.821302149Z", + "id": "ut8lbrffooxzb", + "category": "network", + "type": "connection" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | 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. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| destination.as.organization.name | Organization name. | keyword | +| destination.domain | Destination domain. | keyword | +| destination.geo.city_name | City name. | keyword | +| destination.geo.continent_name | Name of the continent. | keyword | +| destination.geo.country_iso_code | Country ISO code. | keyword | +| destination.geo.country_name | Country name. | keyword | +| destination.geo.location | Longitude and latitude. | geo_point | +| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| destination.geo.region_iso_code | Region ISO code. | keyword | +| destination.geo.region_name | Region name. | keyword | +| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | +| destination.port | Port of the destination. | long | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.dataset | Event dataset | constant_keyword | +| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | +| event.module | Event module | constant_keyword | +| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | +| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.instance.region | Region of the VM. | keyword | +| gcp.destination.instance.zone | Zone of the VM. | keyword | +| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.source.instance.region | Region of the VM. | keyword | +| gcp.source.instance.zone | Zone of the VM. | keyword | +| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.vpcflow.reporter | The side which reported the flow. Can be either 'SRC' or 'DEST'. | keyword | +| gcp.vpcflow.rtt.ms | Latency as measured (for TCP flows only) during the time interval. This is the time elapsed between sending a SEQ and receiving a corresponding ACK and it contains the network RTT as well as the application related delay. | long | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| input.type | Input type | keyword | +| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | +| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| network.bytes | Total bytes transferred in both directions. If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum. | long | +| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | +| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | +| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | +| network.name | Name given by operators to sections of their network. | keyword | +| network.packets | Total packets transferred in both directions. If `source.packets` and `destination.packets` are known, `network.packets` is their sum. | long | +| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | +| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | +| related.ip | All of the IPs seen on your event. | ip | +| related.user | All the user names or other user identifiers seen on the event. | keyword | +| rule.name | The name of the rule or signature generating the event. | keyword | +| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.bytes | Bytes sent from the source to the destination. | long | +| source.domain | Source domain. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| source.packets | Packets sent from the source to the destination. | long | +| source.port | Port of the source. | long | +| tags | List of keywords used to tag each event. | keyword | From e3cfa71f85ae4d6cfaf8740ef50efaa316795571 Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Tue, 30 Nov 2021 08:25:49 -0600 Subject: [PATCH 04/28] [GCP] Add GCP Billing Metricset (#2141) --- packages/gcp/_dev/build/docs/logs.md | 30 ++ packages/gcp/_dev/build/docs/metrics.md | 13 + packages/gcp/docs/logs.md | 671 ++++++++++++++++++++++++ packages/gcp/docs/metrics.md | 101 ++++ 4 files changed, 815 insertions(+) create mode 100644 packages/gcp/_dev/build/docs/logs.md create mode 100644 packages/gcp/_dev/build/docs/metrics.md create mode 100644 packages/gcp/docs/logs.md create mode 100644 packages/gcp/docs/metrics.md diff --git a/packages/gcp/_dev/build/docs/logs.md b/packages/gcp/_dev/build/docs/logs.md new file mode 100644 index 00000000000..ccdbbca29e6 --- /dev/null +++ b/packages/gcp/_dev/build/docs/logs.md @@ -0,0 +1,30 @@ +# Google Cloud Platform Logs Integration + +The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, +and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. + +## Logs + +### Audit + +This is the `audit` dataset. + +{{event "audit"}} + +{{fields "audit"}} + +### Firewall + +This is the `firewall` dataset. + +{{event "firewall"}} + +{{fields "firewall"}} + +### VPC Flow + +This is the `VPC Flow` dataset. + +{{event "vpcflow"}} + +{{fields "vpcflow"}} diff --git a/packages/gcp/_dev/build/docs/metrics.md b/packages/gcp/_dev/build/docs/metrics.md new file mode 100644 index 00000000000..8a5b78d3cef --- /dev/null +++ b/packages/gcp/_dev/build/docs/metrics.md @@ -0,0 +1,13 @@ +# Google Cloud Platform Metrics Integration + +The Google Cloud Platform Metrics integration collects and parses Google Cloud billing metrics. + +## Metrics + +### Billing + +This is the `billing` dataset. + +{{event "billing"}} + +{{fields "billing"}} \ No newline at end of file diff --git a/packages/gcp/docs/logs.md b/packages/gcp/docs/logs.md new file mode 100644 index 00000000000..7a58835a573 --- /dev/null +++ b/packages/gcp/docs/logs.md @@ -0,0 +1,671 @@ +# Google Cloud Platform Logs Integration + +The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, +and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. + +## Logs + +### Audit + +This is the `audit` dataset. + +An example event for `audit` looks as following: + +```json +{ + "log": { + "logger": "projects/foo/logs/cloudaudit.googleapis.com%2Factivity" + }, + "source": { + "geo": { + "continent_name": "Europe", + "region_iso_code": "RU-MOW", + "city_name": "Moscow", + "country_iso_code": "RU", + "country_name": "Russia", + "region_name": "Moscow", + "location": { + "lon": 37.6172, + "lat": 55.7527 + } + }, + "ip": "1.2.3.4" + }, + "cloud": { + "project": { + "id": "foo" + } + }, + "@timestamp": "2020-08-05T21:59:26.456Z", + "ecs": { + "version": "1.8.0" + }, + "gcp": { + "audit": { + "request": { + "name": "windows-server-2016-v20200805", + "proto_name": "type.googleapis.com/compute.images.insert" + }, + "authentication_info": { + "principal_email": "user@mycompany.com" + }, + "method_name": "v1.compute.images.insert", + "request_metadata": { + "caller_ip": "1.2.3.4", + "caller_supplied_user_agent": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)" + }, + "response": { + "proto_name": "type.googleapis.com/operation", + "status": { + "value": "RUNNING" + } + }, + "service_name": "compute.googleapis.com", + "type": "type.googleapis.com/google.cloud.audit.AuditLog", + "authorization_info": [ + { + "resource_attributes": { + "name": "projects/foo/global/images/windows-server-2016-v20200805", + "type": "compute.images", + "service": "compute" + }, + "permission": "compute.images.create", + "granted": true + } + ], + "resource_name": "projects/foo/global/images/windows-server-2016-v20200805", + "resource_location": { + "current_locations": [ + "eu" + ] + } + } + }, + "service": { + "name": "compute.googleapis.com" + }, + "event": { + "action": "v1.compute.images.insert", + "ingested": "2021-02-19T09:19:47.732239800Z", + "original": "{\"insertId\":\"v2spcwdzmc2\",\"logName\":\"projects/foo/logs/cloudaudit.googleapis.com%2Factivity\",\"operation\":{\"first\":true,\"id\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"producer\":\"compute.googleapis.com\"},\"protoPayload\":{\"@type\":\"type.googleapis.com/google.cloud.audit.AuditLog\",\"authenticationInfo\":{\"principalEmail\":\"user@mycompany.com\"},\"authorizationInfo\":[{\"granted\":true,\"permission\":\"compute.images.create\",\"resourceAttributes\":{\"name\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"service\":\"compute\",\"type\":\"compute.images\"}}],\"methodName\":\"v1.compute.images.insert\",\"request\":{\"@type\":\"type.googleapis.com/compute.images.insert\",\"family\":\"windows-server-2016\",\"guestOsFeatures\":[{\"type\":\"VIRTIO_SCSI_MULTIQUEUE\"},{\"type\":\"WINDOWS\"}],\"name\":\"windows-server-2016-v20200805\",\"rawDisk\":{\"source\":\"https://storage.googleapis.com/storage/v1/b/foo/o/windows-server-2016-v20200805.tar.gz\"},\"sourceType\":\"RAW\"},\"requestMetadata\":{\"callerIp\":\"1.2.3.4\",\"callerSuppliedUserAgent\":\"google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)\",\"destinationAttributes\":{},\"requestAttributes\":{\"auth\":{},\"time\":\"2020-08-05T21:59:27.515Z\"}},\"resourceLocation\":{\"currentLocations\":[\"eu\"]},\"resourceName\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"response\":{\"@type\":\"type.googleapis.com/operation\",\"id\":\"44919313\",\"insertTime\":\"2020-08-05T14:59:27.259-07:00\",\"name\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"operationType\":\"insert\",\"progress\":\"0\",\"selfLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"selfLinkWithId\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/4491931805423146320\",\"startTime\":\"2020-08-05T14:59:27.274-07:00\",\"status\":\"RUNNING\",\"targetId\":\"12345\",\"targetLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/images/windows-server-2016-v20200805\",\"user\":\"user@mycompany.com\"},\"serviceName\":\"compute.googleapis.com\"},\"receiveTimestamp\":\"2020-08-05T21:59:27.822546978Z\",\"resource\":{\"labels\":{\"image_id\":\"771879043\",\"project_id\":\"foo\"},\"type\":\"gce_image\"},\"severity\":\"NOTICE\",\"timestamp\":\"2020-08-05T21:59:26.456Z\"}", + "id": "v2spcwdzmc2", + "kind": "event", + "outcome": "success" + }, + "user": { + "email": "user@mycompany.com" + }, + "user_agent": { + "name": "Other", + "original": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)", + "os": { + "name": "Mac OS X", + "version": "19.6.0", + "full": "Mac OS X 19.6.0" + }, + "device": { + "name": "Mac" + } + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | 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. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.dataset | Event dataset | constant_keyword | +| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | +| event.module | Event module | constant_keyword | +| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | +| gcp.audit.authentication_info.authority_selector | The authority selector specified by the requestor, if any. It is not guaranteed that the principal was allowed to use this authority. | keyword | +| gcp.audit.authentication_info.principal_email | The email address of the authenticated user making the request. | keyword | +| gcp.audit.authorization_info.granted | Whether or not authorization for resource and permission was granted. | boolean | +| gcp.audit.authorization_info.permission | The required IAM permission. | keyword | +| gcp.audit.authorization_info.resource_attributes.name | The name of the resource. | keyword | +| gcp.audit.authorization_info.resource_attributes.service | The name of the service. | keyword | +| gcp.audit.authorization_info.resource_attributes.type | The type of the resource. | keyword | +| gcp.audit.method_name | The name of the service method or operation. For API calls, this should be the name of the API method. For example, 'google.datastore.v1.Datastore.RunQuery'. | keyword | +| gcp.audit.num_response_items | The number of items returned from a List or Query API method, if applicable. | long | +| gcp.audit.request.filter | Filter of the request. | keyword | +| gcp.audit.request.name | Name of the request. | keyword | +| gcp.audit.request.proto_name | Type property of the request. | keyword | +| gcp.audit.request.resource_name | Name of the request resource. | keyword | +| gcp.audit.request_metadata.caller_ip | The IP address of the caller. | ip | +| gcp.audit.request_metadata.caller_supplied_user_agent | The user agent of the caller. This information is not authenticated and should be treated accordingly. | keyword | +| gcp.audit.resource_location.current_locations | Current locations of the resource. | keyword | +| gcp.audit.resource_name | The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example, 'shelves/SHELF_ID/books'. | keyword | +| gcp.audit.response.details.group | The name of the group. | keyword | +| gcp.audit.response.details.kind | The kind of the response details. | keyword | +| gcp.audit.response.details.name | The name of the response details. | keyword | +| gcp.audit.response.details.uid | The uid of the response details. | keyword | +| gcp.audit.response.proto_name | Type property of the response. | keyword | +| gcp.audit.response.status.allowed | | boolean | +| gcp.audit.response.status.reason | | keyword | +| gcp.audit.response.status.value | | keyword | +| gcp.audit.service_name | The name of the API service performing the operation. For example, datastore.googleapis.com. | keyword | +| gcp.audit.status.code | The status code, which should be an enum value of google.rpc.Code. | integer | +| gcp.audit.status.message | A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. | keyword | +| gcp.audit.type | Type property. | keyword | +| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.instance.region | Region of the VM. | keyword | +| gcp.destination.instance.zone | Zone of the VM. | keyword | +| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.source.instance.region | Region of the VM. | keyword | +| gcp.source.instance.zone | Zone of the VM. | keyword | +| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| input.type | Input type | keyword | +| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | +| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| orchestrator.api_version | API version being used to carry out the action | keyword | +| orchestrator.cluster.name | Name of the cluster. | keyword | +| orchestrator.cluster.url | URL of the API used to manage the cluster. | keyword | +| orchestrator.cluster.version | The version of the cluster. | keyword | +| orchestrator.namespace | Namespace in which the action is taking place. | keyword | +| orchestrator.organization | Organization affected by the event (for multi-tenant orchestrator setups). | keyword | +| orchestrator.resource.name | Name of the resource being acted upon. | keyword | +| orchestrator.resource.type | Type of resource being acted upon. | keyword | +| orchestrator.type | Orchestrator cluster type (e.g. kubernetes, nomad or cloudfoundry). | keyword | +| service.name | Name of the service data is collected from. The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name. In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| tags | List of keywords used to tag each event. | keyword | +| user.email | User email address. | keyword | +| user_agent.device.name | Name of the device. | keyword | +| user_agent.name | Name of the user agent. | keyword | +| user_agent.original | Unparsed user_agent string. | keyword | +| user_agent.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| user_agent.os.full | Operating system name, including the version or code name. | keyword | +| user_agent.os.kernel | Operating system kernel version as a raw string. | keyword | +| user_agent.os.name | Operating system name, without the version. | keyword | +| user_agent.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| user_agent.os.version | Operating system version as a raw string. | keyword | +| user_agent.version | Version of the user agent. | keyword | + + +### Firewall + +This is the `firewall` dataset. + +An example event for `firewall` looks as following: + +```json +{ + "log": { + "logger": "projects/test-beats/logs/compute.googleapis.com%2Ffirewall" + }, + "destination": { + "geo": { + "continent_name": "North America", + "country_name": "United States", + "location": { + "lon": -97.822, + "lat": 37.751 + }, + "country_iso_code": "US" + }, + "as": { + "number": 15169, + "organization": { + "name": "Google LLC" + } + }, + "address": "8.8.8.8", + "port": 53, + "ip": "8.8.8.8" + }, + "rule": { + "name": "network:default/firewall:adrian-test-1" + }, + "source": { + "address": "10.128.0.16", + "port": 60094, + "domain": "adrian-test", + "ip": "10.128.0.16" + }, + "network": { + "name": "default", + "community_id": "1:iiDdIEXnxwSiz/hJbVnseQ4SZVE=", + "transport": "udp", + "type": "ipv4", + "iana_number": "17", + "direction": "outbound" + }, + "cloud": { + "region": "us-central1", + "availability_zone": "us-central1-a", + "project": { + "id": "test-beats" + } + }, + "@timestamp": "2019-11-12T12:35:17.214Z", + "ecs": { + "version": "1.8.0" + }, + "related": { + "ip": [ + "10.128.0.16", + "8.8.8.8" + ] + }, + "gcp": { + "firewall": { + "rule_details": { + "action": "DENY", + "target_tag": [ + "adrian-test" + ], + "priority": 1000, + "destination_range": [ + "8.8.8.0/24" + ], + "ip_port_info": [ + { + "ip_protocol": "ALL" + } + ], + "direction": "EGRESS" + } + }, + "source": { + "vpc": { + "project_id": "test-beats", + "subnetwork_name": "default", + "vpc_name": "default" + }, + "instance": { + "region": "us-central1", + "project_id": "test-beats", + "zone": "us-central1-a" + } + } + }, + "event": { + "ingested": "2021-02-19T09:19:48.040375200Z", + "original": "{\"insertId\":\"4zuj4nfn4llkb\",\"jsonPayload\":{\"connection\":{\"dest_ip\":\"8.8.8.8\",\"dest_port\":53,\"protocol\":17,\"src_ip\":\"10.128.0.16\",\"src_port\":60094},\"disposition\":\"DENIED\",\"instance\":{\"project_id\":\"test-beats\",\"region\":\"us-central1\",\"vm_name\":\"adrian-test\",\"zone\":\"us-central1-a\"},\"remote_location\":{\"continent\":\"America\",\"country\":\"usa\"},\"rule_details\":{\"action\":\"DENY\",\"destination_range\":[\"8.8.8.0/24\"],\"direction\":\"EGRESS\",\"ip_port_info\":[{\"ip_protocol\":\"ALL\"}],\"priority\":1000,\"reference\":\"network:default/firewall:adrian-test-1\",\"target_tag\":[\"adrian-test\"]},\"vpc\":{\"project_id\":\"test-beats\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"}},\"logName\":\"projects/test-beats/logs/compute.googleapis.com%2Ffirewall\",\"receiveTimestamp\":\"2019-11-12T12:35:24.466374097Z\",\"resource\":{\"labels\":{\"location\":\"us-central1-a\",\"project_id\":\"test-beats\",\"subnetwork_id\":\"1266623735137648253\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-11-12T12:35:17.214711274Z\"}", + "kind": "event", + "action": "firewall-rule", + "id": "4zuj4nfn4llkb", + "category": "network", + "type": "connection" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | 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. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| destination.as.organization.name | Organization name. | keyword | +| destination.domain | Destination domain. | keyword | +| destination.geo.city_name | City name. | keyword | +| destination.geo.continent_name | Name of the continent. | keyword | +| destination.geo.country_iso_code | Country ISO code. | keyword | +| destination.geo.country_name | Country name. | keyword | +| destination.geo.location | Longitude and latitude. | geo_point | +| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| destination.geo.region_iso_code | Region ISO code. | keyword | +| destination.geo.region_name | Region name. | keyword | +| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | +| destination.port | Port of the destination. | long | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.dataset | Event dataset | constant_keyword | +| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | +| event.module | Event module | constant_keyword | +| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | +| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.instance.region | Region of the VM. | keyword | +| gcp.destination.instance.zone | Zone of the VM. | keyword | +| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.firewall.rule_details.action | Action that the rule performs on match. | keyword | +| gcp.firewall.rule_details.destination_range | List of destination ranges that the firewall applies to. | keyword | +| gcp.firewall.rule_details.direction | Direction of traffic that matches this rule. | keyword | +| gcp.firewall.rule_details.ip_port_info | List of ip protocols and applicable port ranges for rules. | array | +| gcp.firewall.rule_details.priority | The priority for the firewall rule. | long | +| gcp.firewall.rule_details.reference | Reference to the firewall rule. | keyword | +| gcp.firewall.rule_details.source_range | List of source ranges that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.source_service_account | List of all the source service accounts that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.source_tag | List of all the source tags that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.target_service_account | List of all the target service accounts that the firewall rule applies to. | keyword | +| gcp.firewall.rule_details.target_tag | List of all the target tags that the firewall rule applies to. | keyword | +| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.source.instance.region | Region of the VM. | keyword | +| gcp.source.instance.zone | Zone of the VM. | keyword | +| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| input.type | Input type | keyword | +| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | +| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | +| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | +| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | +| network.name | Name given by operators to sections of their network. | keyword | +| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | +| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | +| related.ip | All of the IPs seen on your event. | ip | +| related.user | All the user names or other user identifiers seen on the event. | keyword | +| rule.name | The name of the rule or signature generating the event. | keyword | +| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.domain | Source domain. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| source.port | Port of the source. | long | +| tags | List of keywords used to tag each event. | keyword | + + +### VPC Flow + +This is the `VPC Flow` dataset. + +An example event for `vpcflow` looks as following: + +```json +{ + "log": { + "logger": "projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows" + }, + "destination": { + "address": "10.87.40.76", + "port": 33970, + "domain": "kibana", + "ip": "10.87.40.76" + }, + "source": { + "geo": { + "continent_name": "America", + "country_name": "usa" + }, + "as": { + "number": 15169 + }, + "address": "198.51.100.248", + "port": 9200, + "bytes": 173663, + "domain": "elasticsearch", + "ip": "198.51.100.248", + "packets": 68 + }, + "network": { + "community_id": "1:e5cZeUPf9fWSqRY+SUSG302spGE=", + "bytes": 173663, + "name": "default", + "transport": "tcp", + "type": "ipv4", + "iana_number": "6", + "packets": 68, + "direction": "internal" + }, + "cloud": { + "region": "us-east1", + "availability_zone": "us-east1-b", + "project": { + "id": "my-sample-project" + } + }, + "@timestamp": "2019-06-14T03:50:10.845Z", + "ecs": { + "version": "1.8.0" + }, + "related": { + "ip": [ + "198.51.100.248", + "10.87.40.76" + ] + }, + "gcp": { + "destination": { + "vpc": { + "project_id": "my-sample-project", + "subnetwork_name": "default", + "vpc_name": "default" + }, + "instance": { + "region": "us-east1", + "project_id": "my-sample-project", + "zone": "us-east1-b" + } + }, + "vpcflow": { + "reporter": "DEST", + "rtt": { + "ms": 1 + } + }, + "source": { + "vpc": { + "project_id": "my-sample-project", + "subnetwork_name": "default", + "vpc_name": "default" + }, + "instance": { + "region": "us-east1", + "project_id": "my-sample-project", + "zone": "us-east1-b" + } + } + }, + "event": { + "ingested": "2021-02-19T09:19:49.051077900Z", + "original": "{\"insertId\":\"ut8lbrffooxzb\",\"jsonPayload\":{\"bytes_sent\":\"173663\",\"connection\":{\"dest_ip\":\"10.87.40.76\",\"dest_port\":33970,\"protocol\":6,\"src_ip\":\"198.51.100.248\",\"src_port\":9200},\"dest_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"kibana\",\"zone\":\"us-east1-b\"},\"dest_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"end_time\":\"2019-06-14T03:49:51.821302149Z\",\"packets_sent\":\"68\",\"reporter\":\"DEST\",\"rtt_msec\":\"1\",\"src_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"elasticsearch\",\"zone\":\"us-east1-b\"},\"src_location\":{\"asn\":15169,\"continent\":\"America\",\"country\":\"usa\"},\"src_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"start_time\":\"2019-06-14T03:40:08.466657665Z\"},\"logName\":\"projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows\",\"receiveTimestamp\":\"2019-06-14T03:50:10.845445834Z\",\"resource\":{\"labels\":{\"location\":\"us-east1-b\",\"project_id\":\"my-sample-project\",\"subnetwork_id\":\"758019854043528829\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-06-14T03:50:10.845445834Z\"}", + "kind": "event", + "start": "2019-06-14T03:40:08.466657665Z", + "end": "2019-06-14T03:49:51.821302149Z", + "id": "ut8lbrffooxzb", + "category": "network", + "type": "connection" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | 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. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| destination.as.organization.name | Organization name. | keyword | +| destination.domain | Destination domain. | keyword | +| destination.geo.city_name | City name. | keyword | +| destination.geo.continent_name | Name of the continent. | keyword | +| destination.geo.country_iso_code | Country ISO code. | keyword | +| destination.geo.country_name | Country name. | keyword | +| destination.geo.location | Longitude and latitude. | geo_point | +| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| destination.geo.region_iso_code | Region ISO code. | keyword | +| destination.geo.region_name | Region name. | keyword | +| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | +| destination.port | Port of the destination. | long | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.dataset | Event dataset | constant_keyword | +| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | +| event.module | Event module | constant_keyword | +| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | +| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.instance.region | Region of the VM. | keyword | +| gcp.destination.instance.zone | Zone of the VM. | keyword | +| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | +| gcp.source.instance.region | Region of the VM. | keyword | +| gcp.source.instance.zone | Zone of the VM. | keyword | +| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | +| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | +| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | +| gcp.vpcflow.reporter | The side which reported the flow. Can be either 'SRC' or 'DEST'. | keyword | +| gcp.vpcflow.rtt.ms | Latency as measured (for TCP flows only) during the time interval. This is the time elapsed between sending a SEQ and receiving a corresponding ACK and it contains the network RTT as well as the application related delay. | long | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| input.type | Input type | keyword | +| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | +| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| network.bytes | Total bytes transferred in both directions. If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum. | long | +| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | +| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | +| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | +| network.name | Name given by operators to sections of their network. | keyword | +| network.packets | Total packets transferred in both directions. If `source.packets` and `destination.packets` are known, `network.packets` is their sum. | long | +| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | +| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | +| related.ip | All of the IPs seen on your event. | ip | +| related.user | All the user names or other user identifiers seen on the event. | keyword | +| rule.name | The name of the rule or signature generating the event. | keyword | +| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.bytes | Bytes sent from the source to the destination. | long | +| source.domain | Source domain. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| source.packets | Packets sent from the source to the destination. | long | +| source.port | Port of the source. | long | +| tags | List of keywords used to tag each event. | keyword | + diff --git a/packages/gcp/docs/metrics.md b/packages/gcp/docs/metrics.md new file mode 100644 index 00000000000..af398ae1c34 --- /dev/null +++ b/packages/gcp/docs/metrics.md @@ -0,0 +1,101 @@ +# Google Cloud Platform Metrics Integration + +The Google Cloud Platform Metrics integration collects and parses Google Cloud billing metrics. + +## Metrics + +### Billing + +This is the `billing` dataset. + +An example event for `billing` looks as following: + +```json +{ + "@timestamp": "2017-10-12T08:05:34.853Z", + "cloud": { + "account": { + "id": "01475F-5B1080-1137E7" + }, + "project": { + "id": "elastic-bi", + "name": "elastic-containerlib-prod" + }, + "provider": "gcp" + }, + "event": { + "dataset": "gcp.billing", + "duration": 115000, + "module": "gcp" + }, + "gcp": { + "billing": { + "billing_account_id": "01475F-5B1080-1137E7", + "cost_type": "regular", + "invoice_month": "202106", + "project_id": "containerlib-prod-12763", + "project_name": "elastic-containerlib-prod", + "total": 4717.170681 + } + }, + "metricset": { + "name": "billing", + "period": 10000 + }, + "service": { + "type": "gcp" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud | Fields related to the cloud or infrastructure the events are coming from. | group | +| cloud.account.id | 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. | keyword | +| cloud.account.name | The cloud account name or alias used to identify different entities in a multi-tenant environment. Examples: AWS account name, Google Cloud ORG display name. | keyword | +| cloud.availability_zone | Availability zone in which this host, resource, or service is located. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| error | These fields can represent errors of any kind. Use them for errors that happen while fetching events or in cases where the event itself contains an error. | group | +| error.message | Error message. | match_only_text | +| event.dataset | Event dataset | constant_keyword | +| event.module | Event module | constant_keyword | +| gcp.billing.billing_account_id | Project Billing Account ID. | keyword | +| gcp.billing.cost_type | Cost types include regular, tax, adjustment, and rounding_error. | keyword | +| gcp.billing.invoice_month | Billing report month. | keyword | +| gcp.billing.project_id | Project ID of the billing report belongs to. | keyword | +| gcp.billing.project_name | Project Name of the billing report belongs to. | keyword | +| gcp.billing.total | Total billing amount. | float | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| service.type | The type of the service data is collected from. The type can be used to group and correlate logs and metrics from one service type. Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. | keyword | From 3e4354e6d17340c496ae81a5ac86da1e5524680d Mon Sep 17 00:00:00 2001 From: Alex Resnick Date: Fri, 31 Dec 2021 10:11:30 -0600 Subject: [PATCH 05/28] [GCP] Add GCP Compute Metricset (#2301) --- packages/gcp/_dev/build/docs/logs.md | 30 -- packages/gcp/_dev/build/docs/metrics.md | 13 - packages/gcp/docs/logs.md | 671 ------------------------ packages/gcp/docs/metrics.md | 101 ---- 4 files changed, 815 deletions(-) delete mode 100644 packages/gcp/_dev/build/docs/logs.md delete mode 100644 packages/gcp/_dev/build/docs/metrics.md delete mode 100644 packages/gcp/docs/logs.md delete mode 100644 packages/gcp/docs/metrics.md diff --git a/packages/gcp/_dev/build/docs/logs.md b/packages/gcp/_dev/build/docs/logs.md deleted file mode 100644 index ccdbbca29e6..00000000000 --- a/packages/gcp/_dev/build/docs/logs.md +++ /dev/null @@ -1,30 +0,0 @@ -# Google Cloud Platform Logs Integration - -The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, -and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. - -## Logs - -### Audit - -This is the `audit` dataset. - -{{event "audit"}} - -{{fields "audit"}} - -### Firewall - -This is the `firewall` dataset. - -{{event "firewall"}} - -{{fields "firewall"}} - -### VPC Flow - -This is the `VPC Flow` dataset. - -{{event "vpcflow"}} - -{{fields "vpcflow"}} diff --git a/packages/gcp/_dev/build/docs/metrics.md b/packages/gcp/_dev/build/docs/metrics.md deleted file mode 100644 index 8a5b78d3cef..00000000000 --- a/packages/gcp/_dev/build/docs/metrics.md +++ /dev/null @@ -1,13 +0,0 @@ -# Google Cloud Platform Metrics Integration - -The Google Cloud Platform Metrics integration collects and parses Google Cloud billing metrics. - -## Metrics - -### Billing - -This is the `billing` dataset. - -{{event "billing"}} - -{{fields "billing"}} \ No newline at end of file diff --git a/packages/gcp/docs/logs.md b/packages/gcp/docs/logs.md deleted file mode 100644 index 7a58835a573..00000000000 --- a/packages/gcp/docs/logs.md +++ /dev/null @@ -1,671 +0,0 @@ -# Google Cloud Platform Logs Integration - -The Google Cloud Platform Logs integration collects and parses Google Cloud audit, VPC flow, -and firewall logs that have been exported from Stackdriver to a Google Pub/Sub topic sink. - -## Logs - -### Audit - -This is the `audit` dataset. - -An example event for `audit` looks as following: - -```json -{ - "log": { - "logger": "projects/foo/logs/cloudaudit.googleapis.com%2Factivity" - }, - "source": { - "geo": { - "continent_name": "Europe", - "region_iso_code": "RU-MOW", - "city_name": "Moscow", - "country_iso_code": "RU", - "country_name": "Russia", - "region_name": "Moscow", - "location": { - "lon": 37.6172, - "lat": 55.7527 - } - }, - "ip": "1.2.3.4" - }, - "cloud": { - "project": { - "id": "foo" - } - }, - "@timestamp": "2020-08-05T21:59:26.456Z", - "ecs": { - "version": "1.8.0" - }, - "gcp": { - "audit": { - "request": { - "name": "windows-server-2016-v20200805", - "proto_name": "type.googleapis.com/compute.images.insert" - }, - "authentication_info": { - "principal_email": "user@mycompany.com" - }, - "method_name": "v1.compute.images.insert", - "request_metadata": { - "caller_ip": "1.2.3.4", - "caller_supplied_user_agent": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)" - }, - "response": { - "proto_name": "type.googleapis.com/operation", - "status": { - "value": "RUNNING" - } - }, - "service_name": "compute.googleapis.com", - "type": "type.googleapis.com/google.cloud.audit.AuditLog", - "authorization_info": [ - { - "resource_attributes": { - "name": "projects/foo/global/images/windows-server-2016-v20200805", - "type": "compute.images", - "service": "compute" - }, - "permission": "compute.images.create", - "granted": true - } - ], - "resource_name": "projects/foo/global/images/windows-server-2016-v20200805", - "resource_location": { - "current_locations": [ - "eu" - ] - } - } - }, - "service": { - "name": "compute.googleapis.com" - }, - "event": { - "action": "v1.compute.images.insert", - "ingested": "2021-02-19T09:19:47.732239800Z", - "original": "{\"insertId\":\"v2spcwdzmc2\",\"logName\":\"projects/foo/logs/cloudaudit.googleapis.com%2Factivity\",\"operation\":{\"first\":true,\"id\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"producer\":\"compute.googleapis.com\"},\"protoPayload\":{\"@type\":\"type.googleapis.com/google.cloud.audit.AuditLog\",\"authenticationInfo\":{\"principalEmail\":\"user@mycompany.com\"},\"authorizationInfo\":[{\"granted\":true,\"permission\":\"compute.images.create\",\"resourceAttributes\":{\"name\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"service\":\"compute\",\"type\":\"compute.images\"}}],\"methodName\":\"v1.compute.images.insert\",\"request\":{\"@type\":\"type.googleapis.com/compute.images.insert\",\"family\":\"windows-server-2016\",\"guestOsFeatures\":[{\"type\":\"VIRTIO_SCSI_MULTIQUEUE\"},{\"type\":\"WINDOWS\"}],\"name\":\"windows-server-2016-v20200805\",\"rawDisk\":{\"source\":\"https://storage.googleapis.com/storage/v1/b/foo/o/windows-server-2016-v20200805.tar.gz\"},\"sourceType\":\"RAW\"},\"requestMetadata\":{\"callerIp\":\"1.2.3.4\",\"callerSuppliedUserAgent\":\"google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)\",\"destinationAttributes\":{},\"requestAttributes\":{\"auth\":{},\"time\":\"2020-08-05T21:59:27.515Z\"}},\"resourceLocation\":{\"currentLocations\":[\"eu\"]},\"resourceName\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"response\":{\"@type\":\"type.googleapis.com/operation\",\"id\":\"44919313\",\"insertTime\":\"2020-08-05T14:59:27.259-07:00\",\"name\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"operationType\":\"insert\",\"progress\":\"0\",\"selfLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"selfLinkWithId\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/4491931805423146320\",\"startTime\":\"2020-08-05T14:59:27.274-07:00\",\"status\":\"RUNNING\",\"targetId\":\"12345\",\"targetLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/images/windows-server-2016-v20200805\",\"user\":\"user@mycompany.com\"},\"serviceName\":\"compute.googleapis.com\"},\"receiveTimestamp\":\"2020-08-05T21:59:27.822546978Z\",\"resource\":{\"labels\":{\"image_id\":\"771879043\",\"project_id\":\"foo\"},\"type\":\"gce_image\"},\"severity\":\"NOTICE\",\"timestamp\":\"2020-08-05T21:59:26.456Z\"}", - "id": "v2spcwdzmc2", - "kind": "event", - "outcome": "success" - }, - "user": { - "email": "user@mycompany.com" - }, - "user_agent": { - "name": "Other", - "original": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)", - "os": { - "name": "Mac OS X", - "version": "19.6.0", - "full": "Mac OS X 19.6.0" - }, - "device": { - "name": "Mac" - } - } -} -``` - -**Exported fields** - -| Field | Description | Type | -|---|---|---| -| @timestamp | Event timestamp. | date | -| cloud.account.id | 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. | keyword | -| cloud.availability_zone | Availability zone in which this host is running. | keyword | -| cloud.image.id | Image ID for the cloud instance. | keyword | -| cloud.instance.id | Instance ID of the host machine. | keyword | -| cloud.instance.name | Instance name of the host machine. | keyword | -| cloud.machine.type | Machine type of the host machine. | keyword | -| cloud.project.id | Name of the project in Google Cloud. | keyword | -| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | -| cloud.region | Region in which this host is running. | keyword | -| container.id | Unique container id. | keyword | -| container.image.name | Name of the image the container was built on. | keyword | -| container.labels | Image labels. | object | -| container.name | Container name. | keyword | -| container.runtime | Runtime managing this container. | keyword | -| data_stream.dataset | Data stream dataset. | constant_keyword | -| data_stream.namespace | Data stream namespace. | constant_keyword | -| data_stream.type | Data stream type. | constant_keyword | -| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | -| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | -| event.dataset | Event dataset | constant_keyword | -| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | -| event.module | Event module | constant_keyword | -| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | -| gcp.audit.authentication_info.authority_selector | The authority selector specified by the requestor, if any. It is not guaranteed that the principal was allowed to use this authority. | keyword | -| gcp.audit.authentication_info.principal_email | The email address of the authenticated user making the request. | keyword | -| gcp.audit.authorization_info.granted | Whether or not authorization for resource and permission was granted. | boolean | -| gcp.audit.authorization_info.permission | The required IAM permission. | keyword | -| gcp.audit.authorization_info.resource_attributes.name | The name of the resource. | keyword | -| gcp.audit.authorization_info.resource_attributes.service | The name of the service. | keyword | -| gcp.audit.authorization_info.resource_attributes.type | The type of the resource. | keyword | -| gcp.audit.method_name | The name of the service method or operation. For API calls, this should be the name of the API method. For example, 'google.datastore.v1.Datastore.RunQuery'. | keyword | -| gcp.audit.num_response_items | The number of items returned from a List or Query API method, if applicable. | long | -| gcp.audit.request.filter | Filter of the request. | keyword | -| gcp.audit.request.name | Name of the request. | keyword | -| gcp.audit.request.proto_name | Type property of the request. | keyword | -| gcp.audit.request.resource_name | Name of the request resource. | keyword | -| gcp.audit.request_metadata.caller_ip | The IP address of the caller. | ip | -| gcp.audit.request_metadata.caller_supplied_user_agent | The user agent of the caller. This information is not authenticated and should be treated accordingly. | keyword | -| gcp.audit.resource_location.current_locations | Current locations of the resource. | keyword | -| gcp.audit.resource_name | The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example, 'shelves/SHELF_ID/books'. | keyword | -| gcp.audit.response.details.group | The name of the group. | keyword | -| gcp.audit.response.details.kind | The kind of the response details. | keyword | -| gcp.audit.response.details.name | The name of the response details. | keyword | -| gcp.audit.response.details.uid | The uid of the response details. | keyword | -| gcp.audit.response.proto_name | Type property of the response. | keyword | -| gcp.audit.response.status.allowed | | boolean | -| gcp.audit.response.status.reason | | keyword | -| gcp.audit.response.status.value | | keyword | -| gcp.audit.service_name | The name of the API service performing the operation. For example, datastore.googleapis.com. | keyword | -| gcp.audit.status.code | The status code, which should be an enum value of google.rpc.Code. | integer | -| gcp.audit.status.message | A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. | keyword | -| gcp.audit.type | Type property. | keyword | -| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.instance.region | Region of the VM. | keyword | -| gcp.destination.instance.zone | Zone of the VM. | keyword | -| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.source.instance.region | Region of the VM. | keyword | -| gcp.source.instance.zone | Zone of the VM. | keyword | -| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| host.architecture | Operating system architecture. | keyword | -| host.containerized | If the host is a container. | boolean | -| host.domain | 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. | keyword | -| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | -| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | -| host.ip | Host ip addresses. | ip | -| host.mac | Host mac addresses. | keyword | -| host.name | 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. | keyword | -| host.os.build | OS build information. | keyword | -| host.os.codename | OS codename, if any. | keyword | -| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | -| host.os.kernel | Operating system kernel version as a raw string. | keyword | -| host.os.name | Operating system name, without the version. | keyword | -| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | -| host.os.version | Operating system version as a raw string. | keyword | -| host.type | 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. | keyword | -| input.type | Input type | keyword | -| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | -| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | -| log.offset | Log offset | long | -| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | -| orchestrator.api_version | API version being used to carry out the action | keyword | -| orchestrator.cluster.name | Name of the cluster. | keyword | -| orchestrator.cluster.url | URL of the API used to manage the cluster. | keyword | -| orchestrator.cluster.version | The version of the cluster. | keyword | -| orchestrator.namespace | Namespace in which the action is taking place. | keyword | -| orchestrator.organization | Organization affected by the event (for multi-tenant orchestrator setups). | keyword | -| orchestrator.resource.name | Name of the resource being acted upon. | keyword | -| orchestrator.resource.type | Type of resource being acted upon. | keyword | -| orchestrator.type | Orchestrator cluster type (e.g. kubernetes, nomad or cloudfoundry). | keyword | -| service.name | Name of the service data is collected from. The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name. In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified. | keyword | -| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| source.as.organization.name | Organization name. | keyword | -| source.geo.city_name | City name. | keyword | -| source.geo.continent_name | Name of the continent. | keyword | -| source.geo.country_iso_code | Country ISO code. | keyword | -| source.geo.country_name | Country name. | keyword | -| source.geo.location | Longitude and latitude. | geo_point | -| source.geo.region_iso_code | Region ISO code. | keyword | -| source.geo.region_name | Region name. | keyword | -| source.ip | IP address of the source (IPv4 or IPv6). | ip | -| tags | List of keywords used to tag each event. | keyword | -| user.email | User email address. | keyword | -| user_agent.device.name | Name of the device. | keyword | -| user_agent.name | Name of the user agent. | keyword | -| user_agent.original | Unparsed user_agent string. | keyword | -| user_agent.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | -| user_agent.os.full | Operating system name, including the version or code name. | keyword | -| user_agent.os.kernel | Operating system kernel version as a raw string. | keyword | -| user_agent.os.name | Operating system name, without the version. | keyword | -| user_agent.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | -| user_agent.os.version | Operating system version as a raw string. | keyword | -| user_agent.version | Version of the user agent. | keyword | - - -### Firewall - -This is the `firewall` dataset. - -An example event for `firewall` looks as following: - -```json -{ - "log": { - "logger": "projects/test-beats/logs/compute.googleapis.com%2Ffirewall" - }, - "destination": { - "geo": { - "continent_name": "North America", - "country_name": "United States", - "location": { - "lon": -97.822, - "lat": 37.751 - }, - "country_iso_code": "US" - }, - "as": { - "number": 15169, - "organization": { - "name": "Google LLC" - } - }, - "address": "8.8.8.8", - "port": 53, - "ip": "8.8.8.8" - }, - "rule": { - "name": "network:default/firewall:adrian-test-1" - }, - "source": { - "address": "10.128.0.16", - "port": 60094, - "domain": "adrian-test", - "ip": "10.128.0.16" - }, - "network": { - "name": "default", - "community_id": "1:iiDdIEXnxwSiz/hJbVnseQ4SZVE=", - "transport": "udp", - "type": "ipv4", - "iana_number": "17", - "direction": "outbound" - }, - "cloud": { - "region": "us-central1", - "availability_zone": "us-central1-a", - "project": { - "id": "test-beats" - } - }, - "@timestamp": "2019-11-12T12:35:17.214Z", - "ecs": { - "version": "1.8.0" - }, - "related": { - "ip": [ - "10.128.0.16", - "8.8.8.8" - ] - }, - "gcp": { - "firewall": { - "rule_details": { - "action": "DENY", - "target_tag": [ - "adrian-test" - ], - "priority": 1000, - "destination_range": [ - "8.8.8.0/24" - ], - "ip_port_info": [ - { - "ip_protocol": "ALL" - } - ], - "direction": "EGRESS" - } - }, - "source": { - "vpc": { - "project_id": "test-beats", - "subnetwork_name": "default", - "vpc_name": "default" - }, - "instance": { - "region": "us-central1", - "project_id": "test-beats", - "zone": "us-central1-a" - } - } - }, - "event": { - "ingested": "2021-02-19T09:19:48.040375200Z", - "original": "{\"insertId\":\"4zuj4nfn4llkb\",\"jsonPayload\":{\"connection\":{\"dest_ip\":\"8.8.8.8\",\"dest_port\":53,\"protocol\":17,\"src_ip\":\"10.128.0.16\",\"src_port\":60094},\"disposition\":\"DENIED\",\"instance\":{\"project_id\":\"test-beats\",\"region\":\"us-central1\",\"vm_name\":\"adrian-test\",\"zone\":\"us-central1-a\"},\"remote_location\":{\"continent\":\"America\",\"country\":\"usa\"},\"rule_details\":{\"action\":\"DENY\",\"destination_range\":[\"8.8.8.0/24\"],\"direction\":\"EGRESS\",\"ip_port_info\":[{\"ip_protocol\":\"ALL\"}],\"priority\":1000,\"reference\":\"network:default/firewall:adrian-test-1\",\"target_tag\":[\"adrian-test\"]},\"vpc\":{\"project_id\":\"test-beats\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"}},\"logName\":\"projects/test-beats/logs/compute.googleapis.com%2Ffirewall\",\"receiveTimestamp\":\"2019-11-12T12:35:24.466374097Z\",\"resource\":{\"labels\":{\"location\":\"us-central1-a\",\"project_id\":\"test-beats\",\"subnetwork_id\":\"1266623735137648253\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-11-12T12:35:17.214711274Z\"}", - "kind": "event", - "action": "firewall-rule", - "id": "4zuj4nfn4llkb", - "category": "network", - "type": "connection" - } -} -``` - -**Exported fields** - -| Field | Description | Type | -|---|---|---| -| @timestamp | Event timestamp. | date | -| cloud.account.id | 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. | keyword | -| cloud.availability_zone | Availability zone in which this host is running. | keyword | -| cloud.image.id | Image ID for the cloud instance. | keyword | -| cloud.instance.id | Instance ID of the host machine. | keyword | -| cloud.instance.name | Instance name of the host machine. | keyword | -| cloud.machine.type | Machine type of the host machine. | keyword | -| cloud.project.id | Name of the project in Google Cloud. | keyword | -| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | -| cloud.region | Region in which this host is running. | keyword | -| container.id | Unique container id. | keyword | -| container.image.name | Name of the image the container was built on. | keyword | -| container.labels | Image labels. | object | -| container.name | Container name. | keyword | -| container.runtime | Runtime managing this container. | keyword | -| data_stream.dataset | Data stream dataset. | constant_keyword | -| data_stream.namespace | Data stream namespace. | constant_keyword | -| data_stream.type | Data stream type. | constant_keyword | -| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | -| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| destination.as.organization.name | Organization name. | keyword | -| destination.domain | Destination domain. | keyword | -| destination.geo.city_name | City name. | keyword | -| destination.geo.continent_name | Name of the continent. | keyword | -| destination.geo.country_iso_code | Country ISO code. | keyword | -| destination.geo.country_name | Country name. | keyword | -| destination.geo.location | Longitude and latitude. | geo_point | -| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | -| destination.geo.region_iso_code | Region ISO code. | keyword | -| destination.geo.region_name | Region name. | keyword | -| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | -| destination.port | Port of the destination. | long | -| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | -| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | -| event.dataset | Event dataset | constant_keyword | -| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | -| event.module | Event module | constant_keyword | -| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | -| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.instance.region | Region of the VM. | keyword | -| gcp.destination.instance.zone | Zone of the VM. | keyword | -| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| gcp.firewall.rule_details.action | Action that the rule performs on match. | keyword | -| gcp.firewall.rule_details.destination_range | List of destination ranges that the firewall applies to. | keyword | -| gcp.firewall.rule_details.direction | Direction of traffic that matches this rule. | keyword | -| gcp.firewall.rule_details.ip_port_info | List of ip protocols and applicable port ranges for rules. | array | -| gcp.firewall.rule_details.priority | The priority for the firewall rule. | long | -| gcp.firewall.rule_details.reference | Reference to the firewall rule. | keyword | -| gcp.firewall.rule_details.source_range | List of source ranges that the firewall rule applies to. | keyword | -| gcp.firewall.rule_details.source_service_account | List of all the source service accounts that the firewall rule applies to. | keyword | -| gcp.firewall.rule_details.source_tag | List of all the source tags that the firewall rule applies to. | keyword | -| gcp.firewall.rule_details.target_service_account | List of all the target service accounts that the firewall rule applies to. | keyword | -| gcp.firewall.rule_details.target_tag | List of all the target tags that the firewall rule applies to. | keyword | -| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.source.instance.region | Region of the VM. | keyword | -| gcp.source.instance.zone | Zone of the VM. | keyword | -| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| host.architecture | Operating system architecture. | keyword | -| host.containerized | If the host is a container. | boolean | -| host.domain | 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. | keyword | -| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | -| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | -| host.ip | Host ip addresses. | ip | -| host.mac | Host mac addresses. | keyword | -| host.name | 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. | keyword | -| host.os.build | OS build information. | keyword | -| host.os.codename | OS codename, if any. | keyword | -| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | -| host.os.kernel | Operating system kernel version as a raw string. | keyword | -| host.os.name | Operating system name, without the version. | keyword | -| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | -| host.os.version | Operating system version as a raw string. | keyword | -| host.type | 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. | keyword | -| input.type | Input type | keyword | -| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | -| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | -| log.offset | Log offset | long | -| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | -| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | -| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | -| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | -| network.name | Name given by operators to sections of their network. | keyword | -| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | -| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | -| related.ip | All of the IPs seen on your event. | ip | -| related.user | All the user names or other user identifiers seen on the event. | keyword | -| rule.name | The name of the rule or signature generating the event. | keyword | -| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | -| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| source.as.organization.name | Organization name. | keyword | -| source.domain | Source domain. | keyword | -| source.geo.city_name | City name. | keyword | -| source.geo.continent_name | Name of the continent. | keyword | -| source.geo.country_iso_code | Country ISO code. | keyword | -| source.geo.country_name | Country name. | keyword | -| source.geo.location | Longitude and latitude. | geo_point | -| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | -| source.geo.region_iso_code | Region ISO code. | keyword | -| source.geo.region_name | Region name. | keyword | -| source.ip | IP address of the source (IPv4 or IPv6). | ip | -| source.port | Port of the source. | long | -| tags | List of keywords used to tag each event. | keyword | - - -### VPC Flow - -This is the `VPC Flow` dataset. - -An example event for `vpcflow` looks as following: - -```json -{ - "log": { - "logger": "projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows" - }, - "destination": { - "address": "10.87.40.76", - "port": 33970, - "domain": "kibana", - "ip": "10.87.40.76" - }, - "source": { - "geo": { - "continent_name": "America", - "country_name": "usa" - }, - "as": { - "number": 15169 - }, - "address": "198.51.100.248", - "port": 9200, - "bytes": 173663, - "domain": "elasticsearch", - "ip": "198.51.100.248", - "packets": 68 - }, - "network": { - "community_id": "1:e5cZeUPf9fWSqRY+SUSG302spGE=", - "bytes": 173663, - "name": "default", - "transport": "tcp", - "type": "ipv4", - "iana_number": "6", - "packets": 68, - "direction": "internal" - }, - "cloud": { - "region": "us-east1", - "availability_zone": "us-east1-b", - "project": { - "id": "my-sample-project" - } - }, - "@timestamp": "2019-06-14T03:50:10.845Z", - "ecs": { - "version": "1.8.0" - }, - "related": { - "ip": [ - "198.51.100.248", - "10.87.40.76" - ] - }, - "gcp": { - "destination": { - "vpc": { - "project_id": "my-sample-project", - "subnetwork_name": "default", - "vpc_name": "default" - }, - "instance": { - "region": "us-east1", - "project_id": "my-sample-project", - "zone": "us-east1-b" - } - }, - "vpcflow": { - "reporter": "DEST", - "rtt": { - "ms": 1 - } - }, - "source": { - "vpc": { - "project_id": "my-sample-project", - "subnetwork_name": "default", - "vpc_name": "default" - }, - "instance": { - "region": "us-east1", - "project_id": "my-sample-project", - "zone": "us-east1-b" - } - } - }, - "event": { - "ingested": "2021-02-19T09:19:49.051077900Z", - "original": "{\"insertId\":\"ut8lbrffooxzb\",\"jsonPayload\":{\"bytes_sent\":\"173663\",\"connection\":{\"dest_ip\":\"10.87.40.76\",\"dest_port\":33970,\"protocol\":6,\"src_ip\":\"198.51.100.248\",\"src_port\":9200},\"dest_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"kibana\",\"zone\":\"us-east1-b\"},\"dest_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"end_time\":\"2019-06-14T03:49:51.821302149Z\",\"packets_sent\":\"68\",\"reporter\":\"DEST\",\"rtt_msec\":\"1\",\"src_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"elasticsearch\",\"zone\":\"us-east1-b\"},\"src_location\":{\"asn\":15169,\"continent\":\"America\",\"country\":\"usa\"},\"src_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"start_time\":\"2019-06-14T03:40:08.466657665Z\"},\"logName\":\"projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows\",\"receiveTimestamp\":\"2019-06-14T03:50:10.845445834Z\",\"resource\":{\"labels\":{\"location\":\"us-east1-b\",\"project_id\":\"my-sample-project\",\"subnetwork_id\":\"758019854043528829\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-06-14T03:50:10.845445834Z\"}", - "kind": "event", - "start": "2019-06-14T03:40:08.466657665Z", - "end": "2019-06-14T03:49:51.821302149Z", - "id": "ut8lbrffooxzb", - "category": "network", - "type": "connection" - } -} -``` - -**Exported fields** - -| Field | Description | Type | -|---|---|---| -| @timestamp | Event timestamp. | date | -| cloud.account.id | 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. | keyword | -| cloud.availability_zone | Availability zone in which this host is running. | keyword | -| cloud.image.id | Image ID for the cloud instance. | keyword | -| cloud.instance.id | Instance ID of the host machine. | keyword | -| cloud.instance.name | Instance name of the host machine. | keyword | -| cloud.machine.type | Machine type of the host machine. | keyword | -| cloud.project.id | Name of the project in Google Cloud. | keyword | -| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | -| cloud.region | Region in which this host is running. | keyword | -| container.id | Unique container id. | keyword | -| container.image.name | Name of the image the container was built on. | keyword | -| container.labels | Image labels. | object | -| container.name | Container name. | keyword | -| container.runtime | Runtime managing this container. | keyword | -| data_stream.dataset | Data stream dataset. | constant_keyword | -| data_stream.namespace | Data stream namespace. | constant_keyword | -| data_stream.type | Data stream type. | constant_keyword | -| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | -| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| destination.as.organization.name | Organization name. | keyword | -| destination.domain | Destination domain. | keyword | -| destination.geo.city_name | City name. | keyword | -| destination.geo.continent_name | Name of the continent. | keyword | -| destination.geo.country_iso_code | Country ISO code. | keyword | -| destination.geo.country_name | Country name. | keyword | -| destination.geo.location | Longitude and latitude. | geo_point | -| destination.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | -| destination.geo.region_iso_code | Region ISO code. | keyword | -| destination.geo.region_name | Region name. | keyword | -| destination.ip | IP address of the destination (IPv4 or IPv6). | ip | -| destination.port | Port of the destination. | long | -| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | -| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | -| event.dataset | Event dataset | constant_keyword | -| event.ingested | Timestamp when an event arrived in the central data store. This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` \< `event.created` \< `event.ingested`. | date | -| event.module | Event module | constant_keyword | -| event.outcome | This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. | keyword | -| gcp.destination.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.instance.region | Region of the VM. | keyword | -| gcp.destination.instance.zone | Zone of the VM. | keyword | -| gcp.destination.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.destination.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.destination.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| gcp.source.instance.project_id | ID of the project containing the VM. | keyword | -| gcp.source.instance.region | Region of the VM. | keyword | -| gcp.source.instance.zone | Zone of the VM. | keyword | -| gcp.source.vpc.project_id | ID of the project containing the VM. | keyword | -| gcp.source.vpc.subnetwork_name | Subnetwork on which the VM is operating. | keyword | -| gcp.source.vpc.vpc_name | VPC on which the VM is operating. | keyword | -| gcp.vpcflow.reporter | The side which reported the flow. Can be either 'SRC' or 'DEST'. | keyword | -| gcp.vpcflow.rtt.ms | Latency as measured (for TCP flows only) during the time interval. This is the time elapsed between sending a SEQ and receiving a corresponding ACK and it contains the network RTT as well as the application related delay. | long | -| host.architecture | Operating system architecture. | keyword | -| host.containerized | If the host is a container. | boolean | -| host.domain | 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. | keyword | -| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | -| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | -| host.ip | Host ip addresses. | ip | -| host.mac | Host mac addresses. | keyword | -| host.name | 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. | keyword | -| host.os.build | OS build information. | keyword | -| host.os.codename | OS codename, if any. | keyword | -| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | -| host.os.kernel | Operating system kernel version as a raw string. | keyword | -| host.os.name | Operating system name, without the version. | keyword | -| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | -| host.os.version | Operating system version as a raw string. | keyword | -| host.type | 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. | keyword | -| input.type | Input type | keyword | -| log.file.path | Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. If the event wasn't read from a log file, do not populate this field. | keyword | -| log.logger | The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. | keyword | -| log.offset | Log offset | long | -| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | -| network.bytes | Total bytes transferred in both directions. If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum. | long | -| network.community_id | A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. Learn more at https://github.com/corelight/community-id-spec. | keyword | -| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | -| network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | -| network.name | Name given by operators to sections of their network. | keyword | -| network.packets | Total packets transferred in both directions. If `source.packets` and `destination.packets` are known, `network.packets` is their sum. | long | -| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | -| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | -| related.ip | All of the IPs seen on your event. | ip | -| related.user | All the user names or other user identifiers seen on the event. | keyword | -| rule.name | The name of the rule or signature generating the event. | keyword | -| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | -| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | -| source.as.organization.name | Organization name. | keyword | -| source.bytes | Bytes sent from the source to the destination. | long | -| source.domain | Source domain. | keyword | -| source.geo.city_name | City name. | keyword | -| source.geo.continent_name | Name of the continent. | keyword | -| source.geo.country_iso_code | Country ISO code. | keyword | -| source.geo.country_name | Country name. | keyword | -| source.geo.location | Longitude and latitude. | geo_point | -| source.geo.name | User-defined description of a location, at the level of granularity they care about. Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. Not typically used in automated geolocation. | keyword | -| source.geo.region_iso_code | Region ISO code. | keyword | -| source.geo.region_name | Region name. | keyword | -| source.ip | IP address of the source (IPv4 or IPv6). | ip | -| source.packets | Packets sent from the source to the destination. | long | -| source.port | Port of the source. | long | -| tags | List of keywords used to tag each event. | keyword | - diff --git a/packages/gcp/docs/metrics.md b/packages/gcp/docs/metrics.md deleted file mode 100644 index af398ae1c34..00000000000 --- a/packages/gcp/docs/metrics.md +++ /dev/null @@ -1,101 +0,0 @@ -# Google Cloud Platform Metrics Integration - -The Google Cloud Platform Metrics integration collects and parses Google Cloud billing metrics. - -## Metrics - -### Billing - -This is the `billing` dataset. - -An example event for `billing` looks as following: - -```json -{ - "@timestamp": "2017-10-12T08:05:34.853Z", - "cloud": { - "account": { - "id": "01475F-5B1080-1137E7" - }, - "project": { - "id": "elastic-bi", - "name": "elastic-containerlib-prod" - }, - "provider": "gcp" - }, - "event": { - "dataset": "gcp.billing", - "duration": 115000, - "module": "gcp" - }, - "gcp": { - "billing": { - "billing_account_id": "01475F-5B1080-1137E7", - "cost_type": "regular", - "invoice_month": "202106", - "project_id": "containerlib-prod-12763", - "project_name": "elastic-containerlib-prod", - "total": 4717.170681 - } - }, - "metricset": { - "name": "billing", - "period": 10000 - }, - "service": { - "type": "gcp" - } -} -``` - -**Exported fields** - -| Field | Description | Type | -|---|---|---| -| @timestamp | Event timestamp. | date | -| cloud | Fields related to the cloud or infrastructure the events are coming from. | group | -| cloud.account.id | 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. | keyword | -| cloud.account.name | The cloud account name or alias used to identify different entities in a multi-tenant environment. Examples: AWS account name, Google Cloud ORG display name. | keyword | -| cloud.availability_zone | Availability zone in which this host, resource, or service is located. | keyword | -| cloud.image.id | Image ID for the cloud instance. | keyword | -| cloud.instance.id | Instance ID of the host machine. | keyword | -| cloud.instance.name | Instance name of the host machine. | keyword | -| cloud.machine.type | Machine type of the host machine. | keyword | -| cloud.project.id | Name of the project in Google Cloud. | keyword | -| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | -| cloud.region | Region in which this host is running. | keyword | -| container.id | Unique container id. | keyword | -| container.image.name | Name of the image the container was built on. | keyword | -| container.labels | Image labels. | object | -| container.name | Container name. | keyword | -| data_stream.dataset | Data stream dataset. | constant_keyword | -| data_stream.namespace | Data stream namespace. | constant_keyword | -| data_stream.type | Data stream type. | constant_keyword | -| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | -| error | These fields can represent errors of any kind. Use them for errors that happen while fetching events or in cases where the event itself contains an error. | group | -| error.message | Error message. | match_only_text | -| event.dataset | Event dataset | constant_keyword | -| event.module | Event module | constant_keyword | -| gcp.billing.billing_account_id | Project Billing Account ID. | keyword | -| gcp.billing.cost_type | Cost types include regular, tax, adjustment, and rounding_error. | keyword | -| gcp.billing.invoice_month | Billing report month. | keyword | -| gcp.billing.project_id | Project ID of the billing report belongs to. | keyword | -| gcp.billing.project_name | Project Name of the billing report belongs to. | keyword | -| gcp.billing.total | Total billing amount. | float | -| host.architecture | Operating system architecture. | keyword | -| host.containerized | If the host is a container. | boolean | -| host.domain | 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. | keyword | -| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | -| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | -| host.ip | Host ip addresses. | ip | -| host.mac | Host mac addresses. | keyword | -| host.name | 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. | keyword | -| host.os.build | OS build information. | keyword | -| host.os.codename | OS codename, if any. | keyword | -| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | -| host.os.kernel | Operating system kernel version as a raw string. | keyword | -| host.os.name | Operating system name, without the version. | keyword | -| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | -| host.os.version | Operating system version as a raw string. | keyword | -| host.type | 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. | keyword | -| service.type | The type of the service data is collected from. The type can be used to group and correlate logs and metrics from one service type. Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. | keyword | From ad4e9b9acb604636de007b9f7604460e7e4d4870 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 16 Feb 2022 13:16:58 +0200 Subject: [PATCH 06/28] Add firestore data_stream --- packages/gcp/_dev/build/docs/firestore.md | 9 + packages/gcp/changelog.yml | 5 + .../firestore/_dev/deploy/tf/env.yml | 7 + .../firestore/_dev/deploy/tf/main.tf | 38 ++++ .../_dev/test/system/test-default-config.yml | 10 + .../firestore/agent/stream/stream.yml.hbs | 16 ++ .../data_stream/firestore/fields/agent.yml | 198 ++++++++++++++++++ .../firestore/fields/base-fields.yml | 20 ++ .../gcp/data_stream/firestore/fields/ecs.yml | 24 +++ .../data_stream/firestore/fields/fields.yml | 13 ++ .../firestore/fields/package-fields.yml | 31 +++ .../gcp/data_stream/firestore/manifest.yml | 31 +++ .../data_stream/firestore/sample_event.json | 55 +++++ packages/gcp/docs/firestore.md | 120 +++++++++++ packages/gcp/manifest.yml | 12 +- 15 files changed, 588 insertions(+), 1 deletion(-) create mode 100644 packages/gcp/_dev/build/docs/firestore.md create mode 100644 packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml create mode 100644 packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf create mode 100644 packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml create mode 100644 packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs create mode 100644 packages/gcp/data_stream/firestore/fields/agent.yml create mode 100644 packages/gcp/data_stream/firestore/fields/base-fields.yml create mode 100644 packages/gcp/data_stream/firestore/fields/ecs.yml create mode 100644 packages/gcp/data_stream/firestore/fields/fields.yml create mode 100644 packages/gcp/data_stream/firestore/fields/package-fields.yml create mode 100644 packages/gcp/data_stream/firestore/manifest.yml create mode 100644 packages/gcp/data_stream/firestore/sample_event.json create mode 100644 packages/gcp/docs/firestore.md diff --git a/packages/gcp/_dev/build/docs/firestore.md b/packages/gcp/_dev/build/docs/firestore.md new file mode 100644 index 00000000000..665776d3f4f --- /dev/null +++ b/packages/gcp/_dev/build/docs/firestore.md @@ -0,0 +1,9 @@ +# Firestore + +## Metrics + +This is the `firestore` dataset. + +{{event "firestore"}} + +{{fields "firestore"}} \ No newline at end of file diff --git a/packages/gcp/changelog.yml b/packages/gcp/changelog.yml index a8082b60b77..61aa574fbb5 100644 --- a/packages/gcp/changelog.yml +++ b/packages/gcp/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "1.4.3" + changes: + - description: Add GCP Firestore metricset + type: enhancement + link: https://github.com/elastic/integrations/pull/2704 - version: "1.4.2" changes: - description: Remove emtpy values, names with only dots, and invalid client IPs. diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml b/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml new file mode 100644 index 00000000000..bbaf454ad9f --- /dev/null +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml @@ -0,0 +1,7 @@ +version: '2.3' +services: + terraform: + environment: + - GCP_PROJECT_ID=${GCP_PROJECT_ID:-elastic-observability} + - GOOGLE_CREDENTIALS=${GOOGLE_CREDENTIALS} + \ No newline at end of file diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf new file mode 100644 index 00000000000..b4a6f2356ce --- /dev/null +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf @@ -0,0 +1,38 @@ +variable "TEST_RUN_ID" { + default = "detached" +} + +variable "project_id" { + type = string + default = "elastic-obs-integrations-dev" +} + +variable "collection_name" { + type = string + default = "collection1" +} + +variable "document_id" { + type = string + default = "document1" +} + +variable "zone" { + type = string + // NOTE: if you change this value you **must** change it also for test + // configuration, otherwise the tests will not be able to find metrics in + // the specified region + default = "us-central1-a" + # https://cloud.google.com/compute/docs/regions-zones#available +} + +provider "google" { + project = var.project_id +} + +resource "google_firestore_document" "mydoc" { + project = var.project_id + collection = var.collection_name + document_id = var.document_id + fields = "{\"something\":{\"mapValue\":{\"fields\":{\"akey\":{\"stringValue\":\"avalue\"}}}}}" +} diff --git a/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml b/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml new file mode 100644 index 00000000000..05e0f924d7c --- /dev/null +++ b/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml @@ -0,0 +1,10 @@ +service: gcppubsub-emulator +input: gcp-pubsub +vars: + credentials_json: '{\"fake\":\"creds\"}' + project_id: compute +data_stream: + vars: + subscription_name: subscription + topic: topic + alternative_host: "{{Hostname}}:{{Port}}" diff --git a/packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs b/packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs new file mode 100644 index 00000000000..ee209aef4be --- /dev/null +++ b/packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs @@ -0,0 +1,16 @@ +metricsets: ["firestore"] +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}} diff --git a/packages/gcp/data_stream/firestore/fields/agent.yml b/packages/gcp/data_stream/firestore/fields/agent.yml new file mode 100644 index 00000000000..2a31d79f494 --- /dev/null +++ b/packages/gcp/data_stream/firestore/fields/agent.yml @@ -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. + diff --git a/packages/gcp/data_stream/firestore/fields/base-fields.yml b/packages/gcp/data_stream/firestore/fields/base-fields.yml new file mode 100644 index 00000000000..7d9cfc69efd --- /dev/null +++ b/packages/gcp/data_stream/firestore/fields/base-fields.yml @@ -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.firestore diff --git a/packages/gcp/data_stream/firestore/fields/ecs.yml b/packages/gcp/data_stream/firestore/fields/ecs.yml new file mode 100644 index 00000000000..83e3f6f1225 --- /dev/null +++ b/packages/gcp/data_stream/firestore/fields/ecs.yml @@ -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 diff --git a/packages/gcp/data_stream/firestore/fields/fields.yml b/packages/gcp/data_stream/firestore/fields/fields.yml new file mode 100644 index 00000000000..e470f84b87a --- /dev/null +++ b/packages/gcp/data_stream/firestore/fields/fields.yml @@ -0,0 +1,13 @@ +- name: gcp.firestore + description: Google Cloud Firestore metrics + type: group + fields: + - name: document.delete.count + type: long + description: The number of successful document deletes. + - name: document.read.count + type: long + description: The number of successful document reads from queries or lookups. + - name: document.write.count + type: long + description: The number of successful document writes. diff --git a/packages/gcp/data_stream/firestore/fields/package-fields.yml b/packages/gcp/data_stream/firestore/fields/package-fields.yml new file mode 100644 index 00000000000..d8ccb93f502 --- /dev/null +++ b/packages/gcp/data_stream/firestore/fields/package-fields.yml @@ -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. + diff --git a/packages/gcp/data_stream/firestore/manifest.yml b/packages/gcp/data_stream/firestore/manifest.yml new file mode 100644 index 00000000000..17b11ee8404 --- /dev/null +++ b/packages/gcp/data_stream/firestore/manifest.yml @@ -0,0 +1,31 @@ +title: "GCP Firestore Metrics" +type: metrics +streams: + - input: gcp/metrics + title: GCP Firestore Metrics + description: Collect GCP Firestore Metrics + vars: + - name: zone + type: text + title: GCP Zone + multi: false + required: false + show_user: true + - name: region + type: text + title: GCP Region + multi: false + required: false + show_user: true + - name: period + type: text + title: Period + default: 10s + required: true + - name: exclude_labels + type: bool + title: Exclude Labels + description: Exclude additional labels from metrics + multi: false + required: false + show_user: true diff --git a/packages/gcp/data_stream/firestore/sample_event.json b/packages/gcp/data_stream/firestore/sample_event.json new file mode 100644 index 00000000000..0189602e658 --- /dev/null +++ b/packages/gcp/data_stream/firestore/sample_event.json @@ -0,0 +1,55 @@ +{ + "@timestamp": "2017-10-12T08:05:34.853Z", + "cloud": { + "account": { + "id": "elastic-obs-integrations-dev", + "name": "elastic-obs-integrations-dev" + }, + "instance": { + "id": "4751091017865185079", + "name": "gke-cluster-1-default-pool-6617a8aa-5clh" + }, + "machine": { + "type": "e2-medium" + }, + "provider": "gcp", + "availability_zone": "us-central1-c", + "region": "us-central1" + }, + "event": { + "dataset": "gcp.firestore", + "duration": 115000, + "module": "gcp" + }, + "gcp": { + "firestore": { + "document": { + "delete": { + "count": 3 + }, + "read": { + "count": 10 + }, + "write": { + "count": 1 + } + } + }, + "labels": { + "user": { + "goog-gke-node": "" + } + } + }, + "host": { + "id": "4751091017865185079", + "name": "gke-cluster-1-default-pool-6617a8aa-5clh" + }, + "metricset": { + "name": "firestore", + "period": 10000 + }, + "service": { + "type": "gcp" + } +} diff --git a/packages/gcp/docs/firestore.md b/packages/gcp/docs/firestore.md new file mode 100644 index 00000000000..86503f0f654 --- /dev/null +++ b/packages/gcp/docs/firestore.md @@ -0,0 +1,120 @@ +# Firestore + +## Metrics + +This is the `firestore` dataset. + +An example event for `firestore` looks as following: + +```json +{ + "@timestamp": "2017-10-12T08:05:34.853Z", + "cloud": { + "account": { + "id": "elastic-obs-integrations-dev", + "name": "elastic-obs-integrations-dev" + }, + "instance": { + "id": "4751091017865185079", + "name": "gke-cluster-1-default-pool-6617a8aa-5clh" + }, + "machine": { + "type": "e2-medium" + }, + "provider": "gcp", + "availability_zone": "us-central1-c", + "region": "us-central1" + }, + "event": { + "dataset": "gcp.firestore", + "duration": 115000, + "module": "gcp" + }, + "gcp": { + "firestore": { + "document": { + "delete": { + "count": 3 + }, + "read": { + "count": 10 + }, + "write": { + "count": 1 + } + } + }, + "labels": { + "user": { + "goog-gke-node": "" + } + } + }, + "host": { + "id": "4751091017865185079", + "name": "gke-cluster-1-default-pool-6617a8aa-5clh" + }, + "metricset": { + "name": "firestore", + "period": 10000 + }, + "service": { + "type": "gcp" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud | Fields related to the cloud or infrastructure the events are coming from. | group | +| cloud.account.id | 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. | keyword | +| cloud.account.name | The cloud account name or alias used to identify different entities in a multi-tenant environment. Examples: AWS account name, Google Cloud ORG display name. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host, resource, or service is located. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| error | These fields can represent errors of any kind. Use them for errors that happen while fetching events or in cases where the event itself contains an error. | group | +| error.message | Error message. | match_only_text | +| event.dataset | Event dataset | constant_keyword | +| event.module | Event module | constant_keyword | +| gcp.firestore.document.delete.count | The number of successful document deletes. | long | +| gcp.firestore.document.read.count | The number of successful document reads from queries or lookups. | long | +| gcp.firestore.document.write.count | The number of successful document writes. | long | +| gcp.labels.metadata.\* | | object | +| gcp.labels.metrics.\* | | object | +| gcp.labels.resource.\* | | object | +| gcp.labels.system.\* | | object | +| gcp.labels.user.\* | | object | +| gcp.metrics.\*.\*.\*.\* | Metrics that returned from Google Cloud API query. | object | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | 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. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | 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. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | 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. | keyword | +| service.type | The type of the service data is collected from. The type can be used to group and correlate logs and metrics from one service type. Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. | keyword | diff --git a/packages/gcp/manifest.yml b/packages/gcp/manifest.yml index 4f5f3b6a86c..12d52e18448 100644 --- a/packages/gcp/manifest.yml +++ b/packages/gcp/manifest.yml @@ -1,6 +1,6 @@ name: gcp title: Google Cloud Platform -version: 1.4.2 +version: 1.4.3 release: ga description: Collect logs from Google Cloud Platform with Elastic Agent. type: integration @@ -123,5 +123,15 @@ policy_templates: title: GCP Compute Metrics Dashboard size: 2000x2021 type: image/png + - name: firestore + title: Google Cloud Platform (GCP) Firestore metrics + description: Collect firestore metrics from Google Cloud Platform (GCP) with Elastic Agent + data_streams: + - firestore + inputs: + - type: gcp/metrics + title: Collect GCP Firestore Metrics + description: Collect GCP Firestore Metrics + input_group: metrics owner: github: elastic/security-external-integrations From 417bfbeb1536d967b21affa52a45ec7578bbde56 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 16 Feb 2022 13:43:49 +0200 Subject: [PATCH 07/28] Fix formatting issue --- packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml | 1 - packages/gcp/data_stream/firestore/sample_event.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml b/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml index bbaf454ad9f..8f6cfa55d5d 100644 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml @@ -4,4 +4,3 @@ services: environment: - GCP_PROJECT_ID=${GCP_PROJECT_ID:-elastic-observability} - GOOGLE_CREDENTIALS=${GOOGLE_CREDENTIALS} - \ No newline at end of file diff --git a/packages/gcp/data_stream/firestore/sample_event.json b/packages/gcp/data_stream/firestore/sample_event.json index 0189602e658..ddfe07c3a27 100644 --- a/packages/gcp/data_stream/firestore/sample_event.json +++ b/packages/gcp/data_stream/firestore/sample_event.json @@ -52,4 +52,4 @@ "service": { "type": "gcp" } -} +} \ No newline at end of file From ceea735c0a8f8885834ebcf9be94d679e1d4ba89 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 16 Mar 2022 19:21:05 +0200 Subject: [PATCH 08/28] Add gcp tests env vars in Jenkinsfile --- .ci/Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 87dd8060cf6..fbd83c8582a 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -17,6 +17,8 @@ pipeline { JOB_GCS_BUCKET_INTERNAL = 'beats-ci-temp-internal' JOB_GCS_CREDENTIALS = 'beats-ci-gcs-plugin' JOB_GCS_EXT_CREDENTIALS = 'beats-ci-gcs-plugin-file-credentials' + ELASTIC_PACKAGE_GCP_SECRET = 'secret/observability-team/ci/service-account/elastic-package-gcp' + ELASTIC_OBSERVABILITY_PROJECT_ID = 'elastic-observability' STACK_VERSION = "${params.stackVersion}" } options { @@ -257,6 +259,11 @@ def withCloudTestEnv(Closure body) { [var: "AWS_ACCESS_KEY_ID", password: aws.access_key], [var: "AWS_SECRET_ACCESS_KEY", password: aws.secret_key], ]) + // GCP + withGCPEnv(secret: env.ELASTIC_PACKAGE_GCP_SECRET) { + maskedVars.add([var: 'GOOGLE_CREDENTIALS', password: readFile(file: env.GOOGLE_APPLICATION_CREDENTIALS)]); + maskedVars.add([var: 'GCP_PROJECT_ID', password: env.ELASTIC_OBSERVABILITY_PROJECT_ID]) + } withEnvMask(vars: maskedVars) { body() } From a0a8e1e09d1a597f67d0ed41bacad61b18038873 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 16 Mar 2022 19:29:59 +0200 Subject: [PATCH 09/28] Add missing env fields --- packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml b/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml index 8f6cfa55d5d..8578dea83f2 100644 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml @@ -3,4 +3,8 @@ services: terraform: environment: - GCP_PROJECT_ID=${GCP_PROJECT_ID:-elastic-observability} + - GCP_ZONE=${GCP_ZONE:-us-central1-a} - GOOGLE_CREDENTIALS=${GOOGLE_CREDENTIALS} + # pass project id to Terraform (NOTE: they are not passed to system test) + - TF_VAR_gcp_project_id=${GCP_PROJECT_ID} + - TF_VAR_zone=${GCP_ZONE:-us-central1-a} From 1b1db81d06dfc83a98e7c680b99141ee410556bd Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 16 Mar 2022 19:30:11 +0200 Subject: [PATCH 10/28] Update terraform deployer --- .../gcp/data_stream/firestore/_dev/deploy/tf/main.tf | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf index b4a6f2356ce..0fe67522bd5 100644 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf @@ -9,12 +9,7 @@ variable "project_id" { variable "collection_name" { type = string - default = "collection1" -} - -variable "document_id" { - type = string - default = "document1" + default = "elastic-collection1" } variable "zone" { @@ -33,6 +28,6 @@ provider "google" { resource "google_firestore_document" "mydoc" { project = var.project_id collection = var.collection_name - document_id = var.document_id + document_id = "elastic-document-${var.TEST_RUN_ID}" fields = "{\"something\":{\"mapValue\":{\"fields\":{\"akey\":{\"stringValue\":\"avalue\"}}}}}" } From 62cb4d6133c85cfaf3ef2ee2965781a3be080b83 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 16 Mar 2022 19:30:25 +0200 Subject: [PATCH 11/28] Update system test --- .../_dev/test/system/test-default-config.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml b/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml index 05e0f924d7c..d343813965d 100644 --- a/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml +++ b/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml @@ -1,10 +1,7 @@ -service: gcppubsub-emulator -input: gcp-pubsub +# wait_for_data_timeout: 10m vars: - credentials_json: '{\"fake\":\"creds\"}' - project_id: compute -data_stream: - vars: - subscription_name: subscription - topic: topic - alternative_host: "{{Hostname}}:{{Port}}" + project_id: "{{GCP_PROJECT_ID}}" + zone: "{{GCP_ZONE}}" + credentials_json: '{{{GOOGLE_CREDENTIALS}}}' +data_streams: + vars: ~ \ No newline at end of file From a07b31622e70556892e50d1dfcc8082305f2237e Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 16 Mar 2022 19:30:42 +0200 Subject: [PATCH 12/28] Fix credentials json field --- packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs b/packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs index ee209aef4be..97f3875279c 100644 --- a/packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs +++ b/packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs @@ -5,7 +5,7 @@ project_id: {{project_id}} credentials_file_path: {{credentials_file}} {{/if}} {{#if credentials_json}} -credentials_json: {{credentials_json}} +credentials_json: '{{credentials_json}}' {{/if}} {{#if region}} region: {{region}} From d1d3ac7e9788261f5c78cd2af5589213880795b5 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 16 Mar 2022 21:06:47 +0200 Subject: [PATCH 13/28] Format & add period --- .../firestore/_dev/test/system/test-default-config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml b/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml index d343813965d..d5f88f5b89a 100644 --- a/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml +++ b/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml @@ -3,5 +3,6 @@ vars: project_id: "{{GCP_PROJECT_ID}}" zone: "{{GCP_ZONE}}" credentials_json: '{{{GOOGLE_CREDENTIALS}}}' + period: 60s data_streams: - vars: ~ \ No newline at end of file + vars: ~ From c7f878dc8735f1fddf419dda9ddc36ca74d1812c Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 17 Mar 2022 13:19:17 +0200 Subject: [PATCH 14/28] Update docs --- packages/gcp/docs/audit.md | 145 ++++++++++++++------------ packages/gcp/docs/firewall.md | 186 +++++++++++++++++++--------------- packages/gcp/docs/vpcflow.md | 164 ++++++++++++++++-------------- 3 files changed, 272 insertions(+), 223 deletions(-) diff --git a/packages/gcp/docs/audit.md b/packages/gcp/docs/audit.md index 1584aee2406..fe35676bd2d 100644 --- a/packages/gcp/docs/audit.md +++ b/packages/gcp/docs/audit.md @@ -11,99 +11,120 @@ An example event for `audit` looks as following: ```json { - "log": { - "logger": "projects/foo/logs/cloudaudit.googleapis.com%2Factivity" - }, - "source": { - "geo": { - "continent_name": "Europe", - "region_iso_code": "RU-MOW", - "city_name": "Moscow", - "country_iso_code": "RU", - "country_name": "Russia", - "region_name": "Moscow", - "location": { - "lon": 37.6172, - "lat": 55.7527 - } - }, - "ip": "1.2.3.4" + "@timestamp": "2019-12-19T00:44:25.051Z", + "agent": { + "ephemeral_id": "0365945c-c25a-4f02-b62c-a94a0b661f02", + "id": "c53ddea2-61ac-4643-8676-0c70ebf51c91", + "name": "docker-fleet-agent", + "type": "filebeat", + "version": "8.0.0-beta1" }, "cloud": { "project": { - "id": "foo" + "id": "elastic-beats" } }, - "@timestamp": "2020-08-05T21:59:26.456Z", + "data_stream": { + "dataset": "gcp.audit", + "namespace": "ep", + "type": "logs" + }, "ecs": { - "version": "1.8.0" + "version": "8.0.0" + }, + "elastic_agent": { + "id": "c53ddea2-61ac-4643-8676-0c70ebf51c91", + "snapshot": false, + "version": "8.0.0-beta1" + }, + "event": { + "action": "beta.compute.instances.aggregatedList", + "agent_id_status": "verified", + "created": "2021-12-31T03:10:44.655Z", + "dataset": "gcp.audit", + "id": "yonau2dg2zi", + "ingested": "2021-12-31T03:10:45Z", + "kind": "event", + "outcome": "success" }, "gcp": { "audit": { - "request": { - "name": "windows-server-2016-v20200805", - "proto_name": "type.googleapis.com/compute.images.insert" - }, "authentication_info": { - "principal_email": "user@mycompany.com" - }, - "method_name": "v1.compute.images.insert", - "request_metadata": { - "caller_ip": "1.2.3.4", - "caller_supplied_user_agent": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)" - }, - "response": { - "proto_name": "type.googleapis.com/operation", - "status": { - "value": "RUNNING" - } + "principal_email": "xxx@xxx.xxx" }, - "service_name": "compute.googleapis.com", - "type": "type.googleapis.com/google.cloud.audit.AuditLog", "authorization_info": [ { + "granted": true, + "permission": "compute.instances.list", "resource_attributes": { - "name": "projects/foo/global/images/windows-server-2016-v20200805", - "type": "compute.images", - "service": "compute" - }, - "permission": "compute.images.create", - "granted": true + "name": "projects/elastic-beats", + "service": "resourcemanager", + "type": "resourcemanager.projects" + } } ], - "resource_name": "projects/foo/global/images/windows-server-2016-v20200805", + "method_name": "beta.compute.instances.aggregatedList", + "num_response_items": 61, + "request": { + "proto_name": "type.googleapis.com/compute.instances.aggregatedList" + }, + "request_metadata": { + "caller_ip": "192.168.1.1", + "caller_supplied_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:71.0) Gecko/20100101 Firefox/71.0,gzip(gfe),gzip(gfe)" + }, "resource_location": { "current_locations": [ - "eu" + "global" ] - } + }, + "resource_name": "projects/elastic-beats/global/instances", + "response": { + "details": { + "group": "batch", + "kind": "jobs", + "name": "gsuite-exporter-1589294700", + "uid": "2beff34a-945f-11ea-bacf-42010a80007f" + }, + "proto_name": "core.k8s.io/v1.Status", + "status": { + "value": "Success" + } + }, + "service_name": "compute.googleapis.com", + "type": "type.googleapis.com/google.cloud.audit.AuditLog" } }, + "input": { + "type": "gcp-pubsub" + }, + "log": { + "logger": "projects/elastic-beats/logs/cloudaudit.googleapis.com%2Fdata_access" + }, "service": { "name": "compute.googleapis.com" }, - "event": { - "action": "v1.compute.images.insert", - "ingested": "2021-02-19T09:19:47.732239800Z", - "original": "{\"insertId\":\"v2spcwdzmc2\",\"logName\":\"projects/foo/logs/cloudaudit.googleapis.com%2Factivity\",\"operation\":{\"first\":true,\"id\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"producer\":\"compute.googleapis.com\"},\"protoPayload\":{\"@type\":\"type.googleapis.com/google.cloud.audit.AuditLog\",\"authenticationInfo\":{\"principalEmail\":\"user@mycompany.com\"},\"authorizationInfo\":[{\"granted\":true,\"permission\":\"compute.images.create\",\"resourceAttributes\":{\"name\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"service\":\"compute\",\"type\":\"compute.images\"}}],\"methodName\":\"v1.compute.images.insert\",\"request\":{\"@type\":\"type.googleapis.com/compute.images.insert\",\"family\":\"windows-server-2016\",\"guestOsFeatures\":[{\"type\":\"VIRTIO_SCSI_MULTIQUEUE\"},{\"type\":\"WINDOWS\"}],\"name\":\"windows-server-2016-v20200805\",\"rawDisk\":{\"source\":\"https://storage.googleapis.com/storage/v1/b/foo/o/windows-server-2016-v20200805.tar.gz\"},\"sourceType\":\"RAW\"},\"requestMetadata\":{\"callerIp\":\"1.2.3.4\",\"callerSuppliedUserAgent\":\"google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)\",\"destinationAttributes\":{},\"requestAttributes\":{\"auth\":{},\"time\":\"2020-08-05T21:59:27.515Z\"}},\"resourceLocation\":{\"currentLocations\":[\"eu\"]},\"resourceName\":\"projects/foo/global/images/windows-server-2016-v20200805\",\"response\":{\"@type\":\"type.googleapis.com/operation\",\"id\":\"44919313\",\"insertTime\":\"2020-08-05T14:59:27.259-07:00\",\"name\":\"operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"operationType\":\"insert\",\"progress\":\"0\",\"selfLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/operation-1596664766354-5ac287c395484-fa3923bd-543e018e\",\"selfLinkWithId\":\"https://www.googleapis.com/compute/v1/projects/foo/global/operations/4491931805423146320\",\"startTime\":\"2020-08-05T14:59:27.274-07:00\",\"status\":\"RUNNING\",\"targetId\":\"12345\",\"targetLink\":\"https://www.googleapis.com/compute/v1/projects/foo/global/images/windows-server-2016-v20200805\",\"user\":\"user@mycompany.com\"},\"serviceName\":\"compute.googleapis.com\"},\"receiveTimestamp\":\"2020-08-05T21:59:27.822546978Z\",\"resource\":{\"labels\":{\"image_id\":\"771879043\",\"project_id\":\"foo\"},\"type\":\"gce_image\"},\"severity\":\"NOTICE\",\"timestamp\":\"2020-08-05T21:59:26.456Z\"}", - "id": "v2spcwdzmc2", - "kind": "event", - "outcome": "success" + "source": { + "ip": "192.168.1.1" }, + "tags": [ + "forwarded", + "gcp-audit" + ], "user": { - "email": "user@mycompany.com" + "email": "xxx@xxx.xxx" }, "user_agent": { - "name": "Other", - "original": "google-cloud-sdk gcloud/290.0.1 command/gcloud.compute.images.create invocation-id/032752ad0fa44b4ea951951d2deef6a3 environment/None environment-version/None interactive/True from-script/False python/2.7.17 term/xterm-256color (Macintosh; Intel Mac OS X 19.6.0),gzip(gfe)", + "device": { + "name": "Mac" + }, + "name": "Firefox", + "original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:71.0) Gecko/20100101 Firefox/71.0,gzip(gfe),gzip(gfe)", "os": { + "full": "Mac OS X 10.15", "name": "Mac OS X", - "version": "19.6.0", - "full": "Mac OS X 19.6.0" + "version": "10.15" }, - "device": { - "name": "Mac" - } + "version": "71.0." } } ``` diff --git a/packages/gcp/docs/firewall.md b/packages/gcp/docs/firewall.md index 71f97bd2d37..78074a3316e 100644 --- a/packages/gcp/docs/firewall.md +++ b/packages/gcp/docs/firewall.md @@ -11,104 +11,122 @@ An example event for `firewall` looks as following: ```json { - "log": { - "logger": "projects/test-beats/logs/compute.googleapis.com%2Ffirewall" - }, - "destination": { - "geo": { - "continent_name": "North America", - "country_name": "United States", - "location": { - "lon": -97.822, - "lat": 37.751 - }, - "country_iso_code": "US" - }, - "as": { - "number": 15169, - "organization": { - "name": "Google LLC" - } - }, - "address": "8.8.8.8", - "port": 53, - "ip": "8.8.8.8" - }, - "rule": { - "name": "network:default/firewall:adrian-test-1" - }, - "source": { - "address": "10.128.0.16", - "port": 60094, - "domain": "adrian-test", - "ip": "10.128.0.16" - }, - "network": { - "name": "default", - "community_id": "1:iiDdIEXnxwSiz/hJbVnseQ4SZVE=", - "transport": "udp", - "type": "ipv4", - "iana_number": "17", - "direction": "outbound" + "@timestamp": "2019-10-30T13:52:42.191Z", + "agent": { + "ephemeral_id": "4fed48b9-0848-4ceb-88b1-30fb7da99604", + "id": "c53ddea2-61ac-4643-8676-0c70ebf51c91", + "name": "docker-fleet-agent", + "type": "filebeat", + "version": "8.0.0-beta1" }, "cloud": { - "region": "us-central1", - "availability_zone": "us-central1-a", + "availability_zone": "us-east1-b", "project": { "id": "test-beats" - } + }, + "region": "us-east1" + }, + "data_stream": { + "dataset": "gcp.firewall", + "namespace": "ep", + "type": "logs" + }, + "destination": { + "address": "10.42.0.2", + "domain": "test-windows", + "ip": "10.42.0.2", + "port": 3389 }, - "@timestamp": "2019-11-12T12:35:17.214Z", "ecs": { - "version": "1.8.0" + "version": "8.0.0" }, - "related": { - "ip": [ - "10.128.0.16", - "8.8.8.8" - ] + "elastic_agent": { + "id": "c53ddea2-61ac-4643-8676-0c70ebf51c91", + "snapshot": false, + "version": "8.0.0-beta1" + }, + "event": { + "action": "firewall-rule", + "agent_id_status": "verified", + "category": "network", + "created": "2021-12-31T03:11:30.136Z", + "dataset": "gcp.firewall", + "id": "1f21ciqfpfssuo", + "ingested": "2021-12-31T03:11:31Z", + "kind": "event", + "type": "connection" }, "gcp": { + "destination": { + "instance": { + "project_id": "test-beats", + "region": "us-east1", + "zone": "us-east1-b" + }, + "vpc": { + "project_id": "test-beats", + "subnetwork_name": "windows-isolated", + "vpc_name": "windows-isolated" + } + }, "firewall": { "rule_details": { - "action": "DENY", - "target_tag": [ - "adrian-test" - ], - "priority": 1000, - "destination_range": [ - "8.8.8.0/24" - ], + "action": "ALLOW", + "direction": "INGRESS", "ip_port_info": [ { - "ip_protocol": "ALL" + "ip_protocol": "TCP", + "port_range": [ + "3389" + ] } ], - "direction": "EGRESS" - } - }, - "source": { - "vpc": { - "project_id": "test-beats", - "subnetwork_name": "default", - "vpc_name": "default" - }, - "instance": { - "region": "us-central1", - "project_id": "test-beats", - "zone": "us-central1-a" + "priority": 1000, + "source_range": [ + "0.0.0.0/0" + ], + "target_tag": [ + "allow-rdp" + ] } } }, - "event": { - "ingested": "2021-02-19T09:19:48.040375200Z", - "original": "{\"insertId\":\"4zuj4nfn4llkb\",\"jsonPayload\":{\"connection\":{\"dest_ip\":\"8.8.8.8\",\"dest_port\":53,\"protocol\":17,\"src_ip\":\"10.128.0.16\",\"src_port\":60094},\"disposition\":\"DENIED\",\"instance\":{\"project_id\":\"test-beats\",\"region\":\"us-central1\",\"vm_name\":\"adrian-test\",\"zone\":\"us-central1-a\"},\"remote_location\":{\"continent\":\"America\",\"country\":\"usa\"},\"rule_details\":{\"action\":\"DENY\",\"destination_range\":[\"8.8.8.0/24\"],\"direction\":\"EGRESS\",\"ip_port_info\":[{\"ip_protocol\":\"ALL\"}],\"priority\":1000,\"reference\":\"network:default/firewall:adrian-test-1\",\"target_tag\":[\"adrian-test\"]},\"vpc\":{\"project_id\":\"test-beats\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"}},\"logName\":\"projects/test-beats/logs/compute.googleapis.com%2Ffirewall\",\"receiveTimestamp\":\"2019-11-12T12:35:24.466374097Z\",\"resource\":{\"labels\":{\"location\":\"us-central1-a\",\"project_id\":\"test-beats\",\"subnetwork_id\":\"1266623735137648253\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-11-12T12:35:17.214711274Z\"}", - "kind": "event", - "action": "firewall-rule", - "id": "4zuj4nfn4llkb", - "category": "network", - "type": "connection" - } + "input": { + "type": "gcp-pubsub" + }, + "log": { + "logger": "projects/test-beats/logs/compute.googleapis.com%2Ffirewall" + }, + "network": { + "community_id": "1:OdLB9eXsBDLz8m97ao4LepX6q+4=", + "direction": "inbound", + "iana_number": "6", + "name": "windows-isolated", + "transport": "tcp", + "type": "ipv4" + }, + "related": { + "ip": [ + "192.168.2.126", + "10.42.0.2" + ] + }, + "rule": { + "name": "network:windows-isolated/firewall:windows-isolated-allow-rdp" + }, + "source": { + "address": "192.168.2.126", + "geo": { + "continent_name": "Asia", + "country_name": "omn" + }, + "ip": "192.168.2.126", + "port": 64853 + }, + "tags": [ + "forwarded", + "gcp-firewall" + ] } ``` @@ -137,7 +155,7 @@ An example event for `firewall` looks as following: | destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | | destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | | destination.as.organization.name | Organization name. | keyword | -| destination.domain | Destination domain. | keyword | +| destination.domain | The domain name of the destination system. This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment. | keyword | | destination.geo.city_name | City name. | keyword | | destination.geo.continent_name | Name of the continent. | keyword | | destination.geo.country_iso_code | Country ISO code. | keyword | @@ -202,8 +220,8 @@ An example event for `firewall` looks as following: | network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | | network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | | network.name | Name given by operators to sections of their network. | keyword | -| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. | keyword | +| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. | keyword | | related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | | related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | | related.ip | All of the IPs seen on your event. | ip | @@ -212,7 +230,7 @@ An example event for `firewall` looks as following: | source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | | source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | | source.as.organization.name | Organization name. | keyword | -| source.domain | Source domain. | keyword | +| source.domain | The domain name of the source system. This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment. | keyword | | source.geo.city_name | City name. | keyword | | source.geo.continent_name | Name of the continent. | keyword | | source.geo.country_iso_code | Country ISO code. | keyword | diff --git a/packages/gcp/docs/vpcflow.md b/packages/gcp/docs/vpcflow.md index debb8d38ade..0b8d7b0f3d0 100644 --- a/packages/gcp/docs/vpcflow.md +++ b/packages/gcp/docs/vpcflow.md @@ -12,99 +12,109 @@ An example event for `vpcflow` looks as following: ```json { - "log": { - "logger": "projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows" + "@timestamp": "2019-06-14T03:50:10.845Z", + "agent": { + "ephemeral_id": "e58d02a0-e7a0-45c0-aba6-a8c983782744", + "id": "c53ddea2-61ac-4643-8676-0c70ebf51c91", + "name": "docker-fleet-agent", + "type": "filebeat", + "version": "8.0.0-beta1" }, - "destination": { - "address": "10.87.40.76", - "port": 33970, - "domain": "kibana", - "ip": "10.87.40.76" + "data_stream": { + "dataset": "gcp.vpcflow", + "namespace": "ep", + "type": "logs" }, - "source": { - "geo": { - "continent_name": "America", - "country_name": "usa" - }, + "destination": { + "address": "67.43.156.13", "as": { - "number": 15169 + "number": 35908 }, - "address": "198.51.100.248", - "port": 9200, - "bytes": 173663, - "domain": "elasticsearch", - "ip": "198.51.100.248", - "packets": 68 - }, - "network": { - "community_id": "1:e5cZeUPf9fWSqRY+SUSG302spGE=", - "bytes": 173663, - "name": "default", - "transport": "tcp", - "type": "ipv4", - "iana_number": "6", - "packets": 68, - "direction": "internal" - }, - "cloud": { - "region": "us-east1", - "availability_zone": "us-east1-b", - "project": { - "id": "my-sample-project" - } + "geo": { + "continent_name": "Asia", + "country_iso_code": "BT", + "country_name": "Bhutan", + "location": { + "lat": 27.5, + "lon": 90.5 + } + }, + "ip": "67.43.156.13", + "port": 33478 }, - "@timestamp": "2019-06-14T03:50:10.845Z", "ecs": { - "version": "1.8.0" + "version": "8.0.0" }, - "related": { - "ip": [ - "198.51.100.248", - "10.87.40.76" - ] + "elastic_agent": { + "id": "c53ddea2-61ac-4643-8676-0c70ebf51c91", + "snapshot": false, + "version": "8.0.0-beta1" + }, + "event": { + "agent_id_status": "verified", + "category": "network", + "created": "2021-12-31T03:12:25.823Z", + "dataset": "gcp.vpcflow", + "end": "2019-06-14T03:45:37.301953198Z", + "id": "ut8lbrffooxyw", + "ingested": "2021-12-31T03:12:26Z", + "kind": "event", + "start": "2019-06-14T03:45:37.186193305Z", + "type": "connection" }, "gcp": { - "destination": { + "source": { + "instance": { + "project_id": "my-sample-project", + "region": "us-east1", + "zone": "us-east1-b" + }, "vpc": { "project_id": "my-sample-project", "subnetwork_name": "default", "vpc_name": "default" - }, - "instance": { - "region": "us-east1", - "project_id": "my-sample-project", - "zone": "us-east1-b" } }, "vpcflow": { - "reporter": "DEST", + "reporter": "SRC", "rtt": { - "ms": 1 - } - }, - "source": { - "vpc": { - "project_id": "my-sample-project", - "subnetwork_name": "default", - "vpc_name": "default" - }, - "instance": { - "region": "us-east1", - "project_id": "my-sample-project", - "zone": "us-east1-b" + "ms": 36 } } }, - "event": { - "ingested": "2021-02-19T09:19:49.051077900Z", - "original": "{\"insertId\":\"ut8lbrffooxzb\",\"jsonPayload\":{\"bytes_sent\":\"173663\",\"connection\":{\"dest_ip\":\"10.87.40.76\",\"dest_port\":33970,\"protocol\":6,\"src_ip\":\"198.51.100.248\",\"src_port\":9200},\"dest_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"kibana\",\"zone\":\"us-east1-b\"},\"dest_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"end_time\":\"2019-06-14T03:49:51.821302149Z\",\"packets_sent\":\"68\",\"reporter\":\"DEST\",\"rtt_msec\":\"1\",\"src_instance\":{\"project_id\":\"my-sample-project\",\"region\":\"us-east1\",\"vm_name\":\"elasticsearch\",\"zone\":\"us-east1-b\"},\"src_location\":{\"asn\":15169,\"continent\":\"America\",\"country\":\"usa\"},\"src_vpc\":{\"project_id\":\"my-sample-project\",\"subnetwork_name\":\"default\",\"vpc_name\":\"default\"},\"start_time\":\"2019-06-14T03:40:08.466657665Z\"},\"logName\":\"projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows\",\"receiveTimestamp\":\"2019-06-14T03:50:10.845445834Z\",\"resource\":{\"labels\":{\"location\":\"us-east1-b\",\"project_id\":\"my-sample-project\",\"subnetwork_id\":\"758019854043528829\",\"subnetwork_name\":\"default\"},\"type\":\"gce_subnetwork\"},\"timestamp\":\"2019-06-14T03:50:10.845445834Z\"}", - "kind": "event", - "start": "2019-06-14T03:40:08.466657665Z", - "end": "2019-06-14T03:49:51.821302149Z", - "id": "ut8lbrffooxzb", - "category": "network", - "type": "connection" - } + "input": { + "type": "gcp-pubsub" + }, + "log": { + "logger": "projects/my-sample-project/logs/compute.googleapis.com%2Fvpc_flows" + }, + "network": { + "bytes": 1776, + "community_id": "1:Wa+aonxAQZ59AWtNdQD0CH6FnsM=", + "direction": "outbound", + "iana_number": "6", + "packets": 7, + "transport": "tcp", + "type": "ipv4" + }, + "related": { + "ip": [ + "10.87.40.76", + "67.43.156.13" + ] + }, + "source": { + "address": "10.87.40.76", + "bytes": 1776, + "domain": "kibana", + "ip": "10.87.40.76", + "packets": 7, + "port": 5601 + }, + "tags": [ + "forwarded", + "gcp-vpcflow" + ] } ``` @@ -133,7 +143,7 @@ An example event for `vpcflow` looks as following: | destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | | destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | | destination.as.organization.name | Organization name. | keyword | -| destination.domain | Destination domain. | keyword | +| destination.domain | The domain name of the destination system. This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment. | keyword | | destination.geo.city_name | City name. | keyword | | destination.geo.continent_name | Name of the continent. | keyword | | destination.geo.country_iso_code | Country ISO code. | keyword | @@ -191,8 +201,8 @@ An example event for `vpcflow` looks as following: | network.iana_number | IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. | keyword | | network.name | Name given by operators to sections of their network. | keyword | | network.packets | Total packets transferred in both directions. If `source.packets` and `destination.packets` are known, `network.packets` is their sum. | long | -| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | -| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS". | keyword | +| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. | keyword | +| network.type | In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc The field value must be normalized to lowercase for querying. | keyword | | related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | | related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | | related.ip | All of the IPs seen on your event. | ip | @@ -202,7 +212,7 @@ An example event for `vpcflow` looks as following: | source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | | source.as.organization.name | Organization name. | keyword | | source.bytes | Bytes sent from the source to the destination. | long | -| source.domain | Source domain. | keyword | +| source.domain | The domain name of the source system. This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment. | keyword | | source.geo.city_name | City name. | keyword | | source.geo.continent_name | Name of the continent. | keyword | | source.geo.country_iso_code | Country ISO code. | keyword | From 4186f6b7fd3c480e04dc8924ec1f6c3f77d4ccd6 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 17 Mar 2022 13:21:43 +0200 Subject: [PATCH 15/28] Update default period for firestoer --- packages/gcp/data_stream/firestore/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gcp/data_stream/firestore/manifest.yml b/packages/gcp/data_stream/firestore/manifest.yml index 17b11ee8404..0b4061f8a52 100644 --- a/packages/gcp/data_stream/firestore/manifest.yml +++ b/packages/gcp/data_stream/firestore/manifest.yml @@ -20,7 +20,7 @@ streams: - name: period type: text title: Period - default: 10s + default: 60s required: true - name: exclude_labels type: bool From bb4f48f4eb68d9031693e3ad8f4f87dbd5e6e499 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 17 Mar 2022 13:23:22 +0200 Subject: [PATCH 16/28] Update terraform deployer --- packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf index 0fe67522bd5..8db15450c6f 100644 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf @@ -4,12 +4,11 @@ variable "TEST_RUN_ID" { variable "project_id" { type = string - default = "elastic-obs-integrations-dev" } variable "collection_name" { type = string - default = "elastic-collection1" + default = "integration-test-collection" } variable "zone" { @@ -25,9 +24,9 @@ provider "google" { project = var.project_id } -resource "google_firestore_document" "mydoc" { +resource "google_firestore_document" "mydoc6" { project = var.project_id - collection = var.collection_name + collection = "${var.collection_name}-${var.TEST_RUN_ID}" document_id = "elastic-document-${var.TEST_RUN_ID}" fields = "{\"something\":{\"mapValue\":{\"fields\":{\"akey\":{\"stringValue\":\"avalue\"}}}}}" } From f04b73632e54a6551104b1dc5aabb284fb63f3c8 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 17 Mar 2022 13:23:41 +0200 Subject: [PATCH 17/28] Remove period from system test --- .../firestore/_dev/test/system/test-default-config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml b/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml index d5f88f5b89a..3ab5ca962f4 100644 --- a/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml +++ b/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml @@ -3,6 +3,5 @@ vars: project_id: "{{GCP_PROJECT_ID}}" zone: "{{GCP_ZONE}}" credentials_json: '{{{GOOGLE_CREDENTIALS}}}' - period: 60s data_streams: vars: ~ From be8a0ae7cc5fa46dbcd1a481210b47a103bd4835 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 17 Mar 2022 13:56:55 +0200 Subject: [PATCH 18/28] Update manifest version --- packages/gcp/manifest.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/gcp/manifest.yml b/packages/gcp/manifest.yml index 12d52e18448..720c6fe2e15 100644 --- a/packages/gcp/manifest.yml +++ b/packages/gcp/manifest.yml @@ -50,6 +50,16 @@ vars: required: false show_user: true policy_templates: + - name: firestore + title: Google Cloud Platform (GCP) Firestore metrics + description: Collect firestore metrics from Google Cloud Platform (GCP) with Elastic Agent + data_streams: + - firestore + inputs: + - type: gcp/metrics + title: Collect GCP Firestore Metrics + description: Collect GCP Firestore Metrics + input_group: metrics - name: audit title: Google Cloud Platform (GCP) Audit logs description: Collect audit logs from Google Cloud Platform (GCP) with Elastic Agent @@ -123,15 +133,5 @@ policy_templates: title: GCP Compute Metrics Dashboard size: 2000x2021 type: image/png - - name: firestore - title: Google Cloud Platform (GCP) Firestore metrics - description: Collect firestore metrics from Google Cloud Platform (GCP) with Elastic Agent - data_streams: - - firestore - inputs: - - type: gcp/metrics - title: Collect GCP Firestore Metrics - description: Collect GCP Firestore Metrics - input_group: metrics owner: github: elastic/security-external-integrations From 55718c900bf2d6cd5320502d4347beffd13effd8 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 17 Mar 2022 14:37:09 +0200 Subject: [PATCH 19/28] Update manifest file --- packages/gcp/manifest.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/gcp/manifest.yml b/packages/gcp/manifest.yml index 720c6fe2e15..1ec28b0cd52 100644 --- a/packages/gcp/manifest.yml +++ b/packages/gcp/manifest.yml @@ -50,16 +50,6 @@ vars: required: false show_user: true policy_templates: - - name: firestore - title: Google Cloud Platform (GCP) Firestore metrics - description: Collect firestore metrics from Google Cloud Platform (GCP) with Elastic Agent - data_streams: - - firestore - inputs: - - type: gcp/metrics - title: Collect GCP Firestore Metrics - description: Collect GCP Firestore Metrics - input_group: metrics - name: audit title: Google Cloud Platform (GCP) Audit logs description: Collect audit logs from Google Cloud Platform (GCP) with Elastic Agent @@ -133,5 +123,15 @@ policy_templates: title: GCP Compute Metrics Dashboard size: 2000x2021 type: image/png + - name: firestore + title: Google Cloud Platform (GCP) Firestore metrics + description: Collect firestore metrics from Google Cloud Platform (GCP) with Elastic Agent + data_streams: + - firestore + inputs: + - type: gcp/metrics + title: Collect GCP Firestore Metrics + description: Collect GCP Firestore Metrics + input_group: metrics owner: - github: elastic/security-external-integrations + github: elastic/integrations From 2be9cb5d0e7dde57d11f43955cd5fd84020d2203 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 17 Mar 2022 15:41:03 +0200 Subject: [PATCH 20/28] Add default project id --- packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf index 8db15450c6f..45151e000e4 100644 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf @@ -4,6 +4,7 @@ variable "TEST_RUN_ID" { variable "project_id" { type = string + default = "elastic-obs-integrations-dev" } variable "collection_name" { From 9ddd3f6aa8f928cc004d8a09e9f52c88b3b3559f Mon Sep 17 00:00:00 2001 From: Gabriel Date: Tue, 22 Mar 2022 00:31:09 +0200 Subject: [PATCH 21/28] Fix owner --- packages/gcp/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gcp/manifest.yml b/packages/gcp/manifest.yml index 1ec28b0cd52..12d52e18448 100644 --- a/packages/gcp/manifest.yml +++ b/packages/gcp/manifest.yml @@ -134,4 +134,4 @@ policy_templates: description: Collect GCP Firestore Metrics input_group: metrics owner: - github: elastic/integrations + github: elastic/security-external-integrations From 957e4f375f7e154e61d83176def9e2b9c3ca712a Mon Sep 17 00:00:00 2001 From: Gabriel Date: Tue, 22 Mar 2022 00:32:42 +0200 Subject: [PATCH 22/28] Update audit docs --- packages/gcp/docs/audit.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gcp/docs/audit.md b/packages/gcp/docs/audit.md index fe35676bd2d..1c6d4215dc6 100644 --- a/packages/gcp/docs/audit.md +++ b/packages/gcp/docs/audit.md @@ -172,6 +172,7 @@ An example event for `audit` looks as following: | gcp.audit.request.resource_name | Name of the request resource. | keyword | | gcp.audit.request_metadata.caller_ip | The IP address of the caller. | ip | | gcp.audit.request_metadata.caller_supplied_user_agent | The user agent of the caller. This information is not authenticated and should be treated accordingly. | keyword | +| gcp.audit.request_metadata.raw.caller_ip | The raw IP address of the caller. | keyword | | gcp.audit.resource_location.current_locations | Current locations of the resource. | keyword | | gcp.audit.resource_name | The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example, 'shelves/SHELF_ID/books'. | keyword | | gcp.audit.response.details.group | The name of the group. | keyword | From 21e114f645b63d01c9b1e06279d80a3b19ca416b Mon Sep 17 00:00:00 2001 From: Gabriel Date: Tue, 22 Mar 2022 10:36:39 +0200 Subject: [PATCH 23/28] Fix terraform deployer --- packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf index 45151e000e4..f74fa4a48af 100644 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf @@ -22,11 +22,10 @@ variable "zone" { } provider "google" { - project = var.project_id + project = var.gcp_project_id } resource "google_firestore_document" "mydoc6" { - project = var.project_id collection = "${var.collection_name}-${var.TEST_RUN_ID}" document_id = "elastic-document-${var.TEST_RUN_ID}" fields = "{\"something\":{\"mapValue\":{\"fields\":{\"akey\":{\"stringValue\":\"avalue\"}}}}}" From de949e92ee1164bd01aa81228587185fdcd096c6 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 23 Mar 2022 15:49:14 +0200 Subject: [PATCH 24/28] Remove redundant alternative host --- .../data_stream/audit/_dev/test/system/test-pubsub-config.yml | 1 - .../data_stream/firewall/_dev/test/system/test-pubsub-config.yml | 1 - .../data_stream/vpcflow/_dev/test/system/test-pubsub-config.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/packages/gcp/data_stream/audit/_dev/test/system/test-pubsub-config.yml b/packages/gcp/data_stream/audit/_dev/test/system/test-pubsub-config.yml index c336127a2f1..2cabbe0984c 100644 --- a/packages/gcp/data_stream/audit/_dev/test/system/test-pubsub-config.yml +++ b/packages/gcp/data_stream/audit/_dev/test/system/test-pubsub-config.yml @@ -20,4 +20,3 @@ data_stream: alternative_host: "{{Hostname}}:{{Port}}" subscription_name: subscription topic: topic - alternative_host: "{{Hostname}}:{{Port}}" diff --git a/packages/gcp/data_stream/firewall/_dev/test/system/test-pubsub-config.yml b/packages/gcp/data_stream/firewall/_dev/test/system/test-pubsub-config.yml index d62e2f42e91..b171a4364ba 100644 --- a/packages/gcp/data_stream/firewall/_dev/test/system/test-pubsub-config.yml +++ b/packages/gcp/data_stream/firewall/_dev/test/system/test-pubsub-config.yml @@ -10,4 +10,3 @@ data_stream: alternative_host: "{{Hostname}}:{{Port}}" subscription_name: subscription topic: topic - alternative_host: "{{Hostname}}:{{Port}}" diff --git a/packages/gcp/data_stream/vpcflow/_dev/test/system/test-pubsub-config.yml b/packages/gcp/data_stream/vpcflow/_dev/test/system/test-pubsub-config.yml index 449562b11b0..cff212ca960 100644 --- a/packages/gcp/data_stream/vpcflow/_dev/test/system/test-pubsub-config.yml +++ b/packages/gcp/data_stream/vpcflow/_dev/test/system/test-pubsub-config.yml @@ -9,4 +9,3 @@ data_stream: alternative_host: "{{Hostname}}:{{Port}}" subscription_name: subscription topic: topic - alternative_host: "{{Hostname}}:{{Port}}" From e5a000479263f152a7f87086c63b37df8d00fc3f Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 23 Mar 2022 15:49:37 +0200 Subject: [PATCH 25/28] Fix project variable --- packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf index f74fa4a48af..a6f9a94e9d3 100644 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf @@ -2,7 +2,7 @@ variable "TEST_RUN_ID" { default = "detached" } -variable "project_id" { +variable "gcp_project_id" { type = string default = "elastic-obs-integrations-dev" } From b8bc2c034c65b15cb4521404cf5ecc589359b84d Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 23 Mar 2022 17:04:48 +0200 Subject: [PATCH 26/28] Remove default project string --- packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml | 2 +- packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml b/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml index 8578dea83f2..5ecd1a3ba0a 100644 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml @@ -2,7 +2,7 @@ version: '2.3' services: terraform: environment: - - GCP_PROJECT_ID=${GCP_PROJECT_ID:-elastic-observability} + - GCP_PROJECT_ID=${GCP_PROJECT_ID} - GCP_ZONE=${GCP_ZONE:-us-central1-a} - GOOGLE_CREDENTIALS=${GOOGLE_CREDENTIALS} # pass project id to Terraform (NOTE: they are not passed to system test) diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf index a6f9a94e9d3..2aa6262fc22 100644 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf +++ b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf @@ -4,7 +4,6 @@ variable "TEST_RUN_ID" { variable "gcp_project_id" { type = string - default = "elastic-obs-integrations-dev" } variable "collection_name" { @@ -25,7 +24,7 @@ provider "google" { project = var.gcp_project_id } -resource "google_firestore_document" "mydoc6" { +resource "google_firestore_document" "document" { collection = "${var.collection_name}-${var.TEST_RUN_ID}" document_id = "elastic-document-${var.TEST_RUN_ID}" fields = "{\"something\":{\"mapValue\":{\"fields\":{\"akey\":{\"stringValue\":\"avalue\"}}}}}" From 9f6be59feb950d59258c0db224f13bc7bc234760 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 30 Mar 2022 14:16:14 +0300 Subject: [PATCH 27/28] Remove firestore datastream tests --- .../firestore/_dev/deploy/tf/env.yml | 10 ------ .../firestore/_dev/deploy/tf/main.tf | 31 ------------------- .../_dev/test/system/test-default-config.yml | 7 ----- 3 files changed, 48 deletions(-) delete mode 100644 packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml delete mode 100644 packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf delete mode 100644 packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml b/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml deleted file mode 100644 index 5ecd1a3ba0a..00000000000 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/env.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: '2.3' -services: - terraform: - environment: - - GCP_PROJECT_ID=${GCP_PROJECT_ID} - - GCP_ZONE=${GCP_ZONE:-us-central1-a} - - GOOGLE_CREDENTIALS=${GOOGLE_CREDENTIALS} - # pass project id to Terraform (NOTE: they are not passed to system test) - - TF_VAR_gcp_project_id=${GCP_PROJECT_ID} - - TF_VAR_zone=${GCP_ZONE:-us-central1-a} diff --git a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf b/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf deleted file mode 100644 index 2aa6262fc22..00000000000 --- a/packages/gcp/data_stream/firestore/_dev/deploy/tf/main.tf +++ /dev/null @@ -1,31 +0,0 @@ -variable "TEST_RUN_ID" { - default = "detached" -} - -variable "gcp_project_id" { - type = string -} - -variable "collection_name" { - type = string - default = "integration-test-collection" -} - -variable "zone" { - type = string - // NOTE: if you change this value you **must** change it also for test - // configuration, otherwise the tests will not be able to find metrics in - // the specified region - default = "us-central1-a" - # https://cloud.google.com/compute/docs/regions-zones#available -} - -provider "google" { - project = var.gcp_project_id -} - -resource "google_firestore_document" "document" { - collection = "${var.collection_name}-${var.TEST_RUN_ID}" - document_id = "elastic-document-${var.TEST_RUN_ID}" - fields = "{\"something\":{\"mapValue\":{\"fields\":{\"akey\":{\"stringValue\":\"avalue\"}}}}}" -} diff --git a/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml b/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml deleted file mode 100644 index 3ab5ca962f4..00000000000 --- a/packages/gcp/data_stream/firestore/_dev/test/system/test-default-config.yml +++ /dev/null @@ -1,7 +0,0 @@ -# wait_for_data_timeout: 10m -vars: - project_id: "{{GCP_PROJECT_ID}}" - zone: "{{GCP_ZONE}}" - credentials_json: '{{{GOOGLE_CREDENTIALS}}}' -data_streams: - vars: ~ From 9ed86587e91e115f2c2f07f38e6a0c7dd2bc45e1 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 30 Mar 2022 16:56:28 +0300 Subject: [PATCH 28/28] Revert "Add gcp tests env vars in Jenkinsfile" This reverts commit ceea735c0a8f8885834ebcf9be94d679e1d4ba89. --- .ci/Jenkinsfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index fbd83c8582a..87dd8060cf6 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -17,8 +17,6 @@ pipeline { JOB_GCS_BUCKET_INTERNAL = 'beats-ci-temp-internal' JOB_GCS_CREDENTIALS = 'beats-ci-gcs-plugin' JOB_GCS_EXT_CREDENTIALS = 'beats-ci-gcs-plugin-file-credentials' - ELASTIC_PACKAGE_GCP_SECRET = 'secret/observability-team/ci/service-account/elastic-package-gcp' - ELASTIC_OBSERVABILITY_PROJECT_ID = 'elastic-observability' STACK_VERSION = "${params.stackVersion}" } options { @@ -259,11 +257,6 @@ def withCloudTestEnv(Closure body) { [var: "AWS_ACCESS_KEY_ID", password: aws.access_key], [var: "AWS_SECRET_ACCESS_KEY", password: aws.secret_key], ]) - // GCP - withGCPEnv(secret: env.ELASTIC_PACKAGE_GCP_SECRET) { - maskedVars.add([var: 'GOOGLE_CREDENTIALS', password: readFile(file: env.GOOGLE_APPLICATION_CREDENTIALS)]); - maskedVars.add([var: 'GCP_PROJECT_ID', password: env.ELASTIC_OBSERVABILITY_PROJECT_ID]) - } withEnvMask(vars: maskedVars) { body() }