-
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
Cherry-pick #15598 to 7.x: [Metricbeat] Add storage metricset to Google Cloud Platform module #17219
Merged
Merged
Cherry-pick #15598 to 7.x: [Metricbeat] Add storage metricset to Google Cloud Platform module #17219
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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[] | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
- module: googlecloud | ||
metricsets: | ||
- compute | ||
- 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" | ||
project_id: "your project id" | ||
credentials_file_path: "your JSON credentials file path" | ||
exclude_labels: false | ||
period: 300s |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ name: googlecloud | |
metricsets: | ||
- compute | ||
- loadbalancing | ||
- storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
x-pack/metricbeat/module/googlecloud/storage/_meta/data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
x-pack/metricbeat/module/googlecloud/storage/_meta/docs.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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. |
44 changes: 44 additions & 0 deletions
44
x-pack/metricbeat/module/googlecloud/storage/_meta/fields.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
oops extra line
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.
Fixed!