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/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/_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/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/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/agent/stream/stream.yml.hbs b/packages/gcp/data_stream/firestore/agent/stream/stream.yml.hbs new file mode 100644 index 00000000000..97f3875279c --- /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..0b4061f8a52 --- /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: 60s + 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..ddfe07c3a27 --- /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" + } +} \ 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..1c6d4215dc6 --- /dev/null +++ b/packages/gcp/docs/audit.md @@ -0,0 +1,254 @@ +# 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 +{ + "@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": "elastic-beats" + } + }, + "data_stream": { + "dataset": "gcp.audit", + "namespace": "ep", + "type": "logs" + }, + "ecs": { + "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": { + "authentication_info": { + "principal_email": "xxx@xxx.xxx" + }, + "authorization_info": [ + { + "granted": true, + "permission": "compute.instances.list", + "resource_attributes": { + "name": "projects/elastic-beats", + "service": "resourcemanager", + "type": "resourcemanager.projects" + } + } + ], + "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": [ + "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" + }, + "source": { + "ip": "192.168.1.1" + }, + "tags": [ + "forwarded", + "gcp-audit" + ], + "user": { + "email": "xxx@xxx.xxx" + }, + "user_agent": { + "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": "10.15" + }, + "version": "71.0." + } +} +``` + +**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.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 | +| 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/billing.md b/packages/gcp/docs/billing.md new file mode 100644 index 00000000000..e373aa7040e --- /dev/null +++ b/packages/gcp/docs/billing.md @@ -0,0 +1,97 @@ +# Billing + +## Metrics + +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 | 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/docs/firewall.md b/packages/gcp/docs/firewall.md new file mode 100644 index 00000000000..78074a3316e --- /dev/null +++ b/packages/gcp/docs/firewall.md @@ -0,0 +1,244 @@ +# 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 +{ + "@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": { + "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 + }, + "ecs": { + "version": "8.0.0" + }, + "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": "ALLOW", + "direction": "INGRESS", + "ip_port_info": [ + { + "ip_protocol": "TCP", + "port_range": [ + "3389" + ] + } + ], + "priority": 1000, + "source_range": [ + "0.0.0.0/0" + ], + "target_tag": [ + "allow-rdp" + ] + } + } + }, + "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" + ] +} +``` + +**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 | 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 | +| 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. | 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 | +| 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 | 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 | +| 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/vpcflow.md b/packages/gcp/docs/vpcflow.md new file mode 100644 index 00000000000..0b8d7b0f3d0 --- /dev/null +++ b/packages/gcp/docs/vpcflow.md @@ -0,0 +1,227 @@ +# 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 +{ + "@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" + }, + "data_stream": { + "dataset": "gcp.vpcflow", + "namespace": "ep", + "type": "logs" + }, + "destination": { + "address": "67.43.156.13", + "as": { + "number": 35908 + }, + "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 + }, + "ecs": { + "version": "8.0.0" + }, + "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": { + "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" + } + }, + "vpcflow": { + "reporter": "SRC", + "rtt": { + "ms": 36 + } + } + }, + "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" + ] +} +``` + +**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 | 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 | +| 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. | 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 | +| 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 | 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 | +| 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/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