Skip to content

Commit

Permalink
Added metric_type fields for collstats datastream. (#5986)
Browse files Browse the repository at this point in the history
* Added metric_type fields for collstats datastream.
  • Loading branch information
ritalwar authored Apr 27, 2023
1 parent 75b038b commit 5d89a5e
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 64 deletions.
5 changes: 5 additions & 0 deletions packages/mongodb/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- version: "1.9.1"
changes:
- description: Added metric_type fields for collstats datastream.
type: enhancement
link: https://github.com/elastic/integrations/pull/5986
- version: "1.9.0"
changes:
- description: Added dimensions fields for collStats datastream to enable TSDB.
Expand Down
18 changes: 18 additions & 0 deletions packages/mongodb/data_stream/collstats/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,76 +19,94 @@
Combination of database and collection name.
- name: total.time.us
type: long
metric_type: counter
description: |
Total waiting time for locks in microseconds.
- name: total.count
type: long
metric_type: counter
description: |
Total number of lock wait events.
- name: lock
type: group
fields:
- name: read.time.us
type: long
metric_type: counter
description: |
Time waiting for read locks in microseconds.
- name: read.count
type: long
metric_type: counter
description: |
Number of read lock wait events.
- name: write.time.us
type: long
metric_type: counter
description: |
Time waiting for write locks in microseconds.
- name: write.count
type: long
metric_type: counter
description: |
Number of write lock wait events.
- name: queries.time.us
type: long
metric_type: counter
description: |
Time running queries in microseconds.
- name: queries.count
type: long
metric_type: counter
description: |
Number of queries executed.
- name: getmore.time.us
type: long
metric_type: counter
description: |
Time asking for more cursor rows in microseconds.
- name: getmore.count
type: long
metric_type: counter
description: |
Number of times a cursor asked for more data.
- name: insert.time.us
type: long
metric_type: counter
description: |
Time inserting new documents in microseconds.
- name: insert.count
type: long
metric_type: counter
description: |
Number of document insert events.
- name: update.time.us
type: long
metric_type: counter
description: |
Time updating documents in microseconds.
- name: update.count
type: long
metric_type: counter
description: |
Number of document update events.
- name: remove.time.us
type: long
metric_type: counter
description: |
Time deleting documents in microseconds.
- name: remove.count
type: long
metric_type: counter
description: |
Number of document delete events.
- name: commands.time.us
type: long
metric_type: counter
description: |
Time executing database commands in microseconds.
- name: commands.count
type: long
metric_type: counter
description: |-
Number of database commands executed.
126 changes: 63 additions & 63 deletions packages/mongodb/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,69 +346,69 @@ The fields reported are:

**Exported fields**

| Field | Description | Type |
|---|---|---|
| @timestamp | Event timestamp. | date |
| agent.id | | keyword |
| 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 |
| 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.dataset | Event dataset | constant_keyword |
| event.module | Event module | constant_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.name.text | Multi-field of `host.os.name`. | text |
| 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 |
| mongodb.collstats.collection | Collection name. | keyword |
| mongodb.collstats.commands.count | Number of database commands executed. | long |
| mongodb.collstats.commands.time.us | Time executing database commands in microseconds. | long |
| mongodb.collstats.db | Database name. | keyword |
| mongodb.collstats.getmore.count | Number of times a cursor asked for more data. | long |
| mongodb.collstats.getmore.time.us | Time asking for more cursor rows in microseconds. | long |
| mongodb.collstats.insert.count | Number of document insert events. | long |
| mongodb.collstats.insert.time.us | Time inserting new documents in microseconds. | long |
| mongodb.collstats.lock.read.count | Number of read lock wait events. | long |
| mongodb.collstats.lock.read.time.us | Time waiting for read locks in microseconds. | long |
| mongodb.collstats.lock.write.count | Number of write lock wait events. | long |
| mongodb.collstats.lock.write.time.us | Time waiting for write locks in microseconds. | long |
| mongodb.collstats.name | Combination of database and collection name. | keyword |
| mongodb.collstats.queries.count | Number of queries executed. | long |
| mongodb.collstats.queries.time.us | Time running queries in microseconds. | long |
| mongodb.collstats.remove.count | Number of document delete events. | long |
| mongodb.collstats.remove.time.us | Time deleting documents in microseconds. | long |
| mongodb.collstats.total.count | Total number of lock wait events. | long |
| mongodb.collstats.total.time.us | Total waiting time for locks in microseconds. | long |
| mongodb.collstats.update.count | Number of document update events. | long |
| mongodb.collstats.update.time.us | Time updating documents in microseconds. | long |
| service.address | Address of the machine where the service is running. | 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 |
| Field | Description | Type | Metric Type |
|---|---|---|---|
| @timestamp | Event timestamp. | date | |
| agent.id | | keyword | |
| 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 | |
| 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.dataset | Event dataset | constant_keyword | |
| event.module | Event module | constant_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.name.text | Multi-field of `host.os.name`. | text | |
| 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 | |
| mongodb.collstats.collection | Collection name. | keyword | |
| mongodb.collstats.commands.count | Number of database commands executed. | long | counter |
| mongodb.collstats.commands.time.us | Time executing database commands in microseconds. | long | counter |
| mongodb.collstats.db | Database name. | keyword | |
| mongodb.collstats.getmore.count | Number of times a cursor asked for more data. | long | counter |
| mongodb.collstats.getmore.time.us | Time asking for more cursor rows in microseconds. | long | counter |
| mongodb.collstats.insert.count | Number of document insert events. | long | counter |
| mongodb.collstats.insert.time.us | Time inserting new documents in microseconds. | long | counter |
| mongodb.collstats.lock.read.count | Number of read lock wait events. | long | counter |
| mongodb.collstats.lock.read.time.us | Time waiting for read locks in microseconds. | long | counter |
| mongodb.collstats.lock.write.count | Number of write lock wait events. | long | counter |
| mongodb.collstats.lock.write.time.us | Time waiting for write locks in microseconds. | long | counter |
| mongodb.collstats.name | Combination of database and collection name. | keyword | |
| mongodb.collstats.queries.count | Number of queries executed. | long | counter |
| mongodb.collstats.queries.time.us | Time running queries in microseconds. | long | counter |
| mongodb.collstats.remove.count | Number of document delete events. | long | counter |
| mongodb.collstats.remove.time.us | Time deleting documents in microseconds. | long | counter |
| mongodb.collstats.total.count | Total number of lock wait events. | long | counter |
| mongodb.collstats.total.time.us | Total waiting time for locks in microseconds. | long | counter |
| mongodb.collstats.update.count | Number of document update events. | long | counter |
| mongodb.collstats.update.time.us | Time updating documents in microseconds. | long | counter |
| service.address | Address of the machine where the service is running. | 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 | |


### dbstats
Expand Down
2 changes: 1 addition & 1 deletion packages/mongodb/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mongodb
title: MongoDB
version: 1.9.0
version: 1.9.1
description: Collect logs and metrics from MongoDB instances with Elastic Agent.
type: integration
categories:
Expand Down

0 comments on commit 5d89a5e

Please sign in to comment.