-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Metricbeat] Add storage metricset to Google Cloud Platform module #15598
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//// | ||
This file is generated! See scripts/mage/docs_collector.go | ||
//// | ||
|
||
[[metricbeat-metricset-googlecloud-storage]] | ||
=== Google Cloud Platform storage metricset | ||
|
||
beta[] | ||
|
||
include::../../../../x-pack/metricbeat/module/googlecloud/storage/_meta/docs.asciidoc[] | ||
|
||
|
||
==== Fields | ||
|
||
For a description of each field in the metricset, see the | ||
<<exported-fields-googlecloud,exported fields>> section. | ||
|
||
Here is an example document generated by this metricset: | ||
|
||
[source,json] | ||
---- | ||
include::../../../../x-pack/metricbeat/module/googlecloud/storage/_meta/data.json[] | ||
---- |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ metricsets: | |
- compute | ||
- pubsub | ||
- loadbalancing | ||
- storage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"@timestamp": "2020-01-15T19:50:00.000Z", | ||
"@metadata": { | ||
"beat": "metricbeat", | ||
"type": "_doc", | ||
"version": "8.0.0" | ||
}, | ||
"ecs": { | ||
"version": "1.4.0" | ||
}, | ||
"host": { | ||
"name": "mcastro" | ||
}, | ||
"agent": { | ||
"type": "metricbeat", | ||
"ephemeral_id": "b925f861-f858-4aa8-8075-99fc8e86e736", | ||
"hostname": "mcastro", | ||
"id": "7e36a073-1a32-4a94-b65b-4c7f971fb228", | ||
"version": "8.0.0" | ||
}, | ||
"metricset": { | ||
"name": "storage", | ||
"period": 300000 | ||
}, | ||
"googlecloud": { | ||
"labels": { | ||
"metrics": { | ||
"storage_class": "REGIONAL" | ||
}, | ||
"resource": { | ||
"location": "us-central1", | ||
"bucket_name": "test-elastic-metricbeat" | ||
} | ||
}, | ||
"storage": { | ||
"storage": { | ||
"object_count": 1 | ||
} | ||
} | ||
}, | ||
"service": { | ||
"type": "googlecloud" | ||
}, | ||
"cloud": { | ||
"account": { | ||
"id": "elastic-metricbeat" | ||
}, | ||
"provider": "googlecloud" | ||
}, | ||
"event": { | ||
"dataset": "googlecloud.storage", | ||
"module": "googlecloud", | ||
"duration": 818254385 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Storage Metricset to fetch metrics from https://cloud.google.com/storage/[Storage] in Google Cloud Platform. | ||
|
||
The `storage` Metricset contains all metrics exported from the https://cloud.google.com/monitoring/api/metrics_gcp#gcp-storage[Stackdriver API]. The field names have been left untouched for people already familiar with them. | ||
|
||
You can specify a single region to fetch metrics like `us-central1`. Be aware that GCP Storage does not use zones so `us-central1-a` will return nothing. If no region is specified, it will return metrics from all buckets. | ||
|
||
[float] | ||
=== Fields | ||
|
||
- `storage.api.request_count`: Delta count of API calls, grouped by the API method name and response code. | ||
- `storage.authz.acl_based_object_access_count`: Delta count of requests that result in an object being granted access solely due to object ACLs. | ||
- `storage.authz.acl_operations_count`: Usage of ACL operations broken down by type. | ||
- `storage.authz.object_specific_acl_mutation_count`: Delta count of changes made to object specific ACLs. | ||
- `storage.network.received_bytes_count`: Delta count of bytes received over the network, grouped by the API method name and response code. | ||
- `storage.network.sent_bytes_count`: Delta count of bytes sent over the network, grouped by the API method name and response code. | ||
- `storage.storage.object_count`: Total number of objects per bucket, grouped by storage class. This value is measured once per day, and the value is repeated at each sampling interval throughout the day. | ||
- `storage.storage.total_byte_seconds`: Delta count of bytes received over the network, grouped by the API method name and response code. | ||
- `storage.storage.total_bytes`: Total size of all objects in the bucket, grouped by storage class. This value is measured once per day, and the value is repeated at each sampling interval throughout the day. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
- name: storage | ||
release: beta | ||
type: group | ||
description: Google Cloud Storage metrics | ||
fields: | ||
- name: api | ||
type: group | ||
fields: | ||
- name: request_count | ||
type: long | ||
description: Delta count of API calls, grouped by the API method name and response code. | ||
- name: authz | ||
type: group | ||
fields: | ||
- name: acl_based_object_access_count | ||
type: long | ||
description: Delta count of requests that result in an object being granted access solely due to object ACLs. | ||
- name: acl_operations_count | ||
type: long | ||
description: Usage of ACL operations broken down by type. | ||
- name: object_specific_acl_mutation_count | ||
type: long | ||
description: Delta count of changes made to object specific ACLs. | ||
- name: network | ||
type: group | ||
fields: | ||
- name: received_bytes_count | ||
type: long | ||
description: Delta count of bytes received over the network, grouped by the API method name and response code. | ||
- name: sent_bytes_count | ||
type: long | ||
description: Delta count of bytes sent over the network, grouped by the API method name and response code. | ||
- name: storage | ||
type: group | ||
fields: | ||
- name: object_count | ||
type: long | ||
description: Total number of objects per bucket, grouped by storage class. This value is measured once per day, and the value is repeated at each sampling interval throughout the day. | ||
- name: total_byte_seconds | ||
type: long | ||
description: Delta count of bytes received over the network, grouped by the API method name and response code. | ||
- name: total_bytes | ||
type: long | ||
description: Total size of all objects in the bucket, grouped by storage class. This value is measured once per day, and the value is repeated at each sampling interval throughout the day. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
default: false | ||
input: | ||
module: googlecloud | ||
metricset: stackdriver | ||
defaults: | ||
stackdriver: | ||
service: storage | ||
metrics: | ||
- "storage.googleapis.com/api/request_count" | ||
- "storage.googleapis.com/authz/acl_based_object_access_count" | ||
- "storage.googleapis.com/authz/acl_operations_count" | ||
- "storage.googleapis.com/authz/object_specific_acl_mutation_count" | ||
- "storage.googleapis.com/network/received_bytes_count" | ||
- "storage.googleapis.com/network/sent_bytes_count" | ||
- "storage.googleapis.com/storage/object_count" | ||
- "storage.googleapis.com/storage/total_byte_seconds" | ||
- "storage.googleapis.com/storage/total_bytes" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,14 @@ | |
- pubsub | ||
- loadbalancing | ||
zone: "us-central1-a" | ||
project_id: "your project id" | ||
credentials_file_path: "your JSON credentials file path" | ||
exclude_labels: false | ||
period: 300s | ||
|
||
- module: googlecloud | ||
metricsets: | ||
- storage | ||
region: "us-central1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should compute and storage be in separate config section? Because one is taking zone and the other is taking region as config. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would say that yes 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sayden ^^ WDYT? 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I overlooked at this the first time but yeap, I think it's better to separate them too. Thanks! 😬 |
||
project_id: "your project id" | ||
credentials_file_path: "your JSON credentials file path" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a suggestion, since this is being included in the docs it would be nice if we could have more metrics-fields as a more complete sample for our users. I would try to include as many as possible of them https://github.com/elastic/beats/pull/15598/files#diff-71e43a13b3f822a4956f547a646aced4R10.
wdyt?