Skip to content

Commit

Permalink
[Metricbeat] gcp: add gke metricset documentation (#27613)
Browse files Browse the repository at this point in the history
  • Loading branch information
endorama authored Sep 2, 2021
1 parent d601e3f commit 07174bd
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 8 deletions.
17 changes: 15 additions & 2 deletions metricbeat/docs/modules/gcp.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ For example, if Compute Metricset fetches 14 metrics (which is the number of met

[float]
== Metricsets
Currently, we have `billing`, `compute`, `loadbalancing`, `pubsub`, `metrics` and
Currently, we have `billing`, `compute`, `gke`, `loadbalancing`, `pubsub`, `metrics` and
`storage` metricset in `gcp` module.

[float]
Expand All @@ -176,6 +176,15 @@ The `compute` metricset comes with a predefined dashboard:

image::./images/metricbeat-gcp-compute-overview.png[]

[float]
=== `gke`

This metricset fetches metrics for https://cloud.google.com/kubernetes-engine[Kubernetes Engine].

The `gke` metricset contains all GA metrics exported by https://cloud.google.com/monitoring/api/metrics_kubernetes[Cloud Monitoring Kubernetes metrics].

Extra labels and metadata are also extracted using the https://cloud.google.com/compute/docs/reference/rest/v1/instances/get[Compute API].

[float]
=== `loadbalancing`
This metricset fetches metrics from https://cloud.google.com/load-balancing/[Load Balancing]
Expand Down Expand Up @@ -295,7 +304,7 @@ metricbeat.modules:
period: 1m
metrics:
- aligner: ALIGN_NONE
service: kubernetes
service: gke
service_metric_prefix: kubernetes.io/
metric_types:
- "container/cpu/core_usage_time"
Expand All @@ -320,6 +329,8 @@ The following metricsets are available:

* <<metricbeat-metricset-gcp-compute,compute>>

* <<metricbeat-metricset-gcp-gke,gke>>

* <<metricbeat-metricset-gcp-loadbalancing,loadbalancing>>

* <<metricbeat-metricset-gcp-metrics,metrics>>
Expand All @@ -332,6 +343,8 @@ include::gcp/billing.asciidoc[]

include::gcp/compute.asciidoc[]

include::gcp/gke.asciidoc[]

include::gcp/loadbalancing.asciidoc[]

include::gcp/metrics.asciidoc[]
Expand Down
19 changes: 19 additions & 0 deletions metricbeat/docs/modules/gcp/gke.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-gcp-gke]]
[role="xpack"]
=== Google Cloud Platform gke metricset

beta[]

include::../../../../x-pack/metricbeat/module/gcp/gke/_meta/docs.asciidoc[]

This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.

==== Fields

For a description of each field in the metricset, see the
<<exported-fields-gcp,exported fields>> section.

3 changes: 2 additions & 1 deletion metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-metricset-etcd-self,self>>
|<<metricbeat-metricset-etcd-store,store>>
|<<metricbeat-module-gcp,Google Cloud Platform>> beta[] |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.6+| .6+| |<<metricbeat-metricset-gcp-billing,billing>> beta[]
.7+| .7+| |<<metricbeat-metricset-gcp-billing,billing>> beta[]
|<<metricbeat-metricset-gcp-compute,compute>> beta[]
|<<metricbeat-metricset-gcp-gke,gke>> beta[]
|<<metricbeat-metricset-gcp-loadbalancing,loadbalancing>> beta[]
|<<metricbeat-metricset-gcp-metrics,metrics>> beta[]
|<<metricbeat-metricset-gcp-pubsub,pubsub>> beta[]
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ metricbeat.modules:
period: 1m
metrics:
- aligner: ALIGN_NONE
service: kubernetes
service: gke
service_metric_prefix: kubernetes.io/
metric_types:
- "container/cpu/core_usage_time"
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/module/gcp/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
period: 1m
metrics:
- aligner: ALIGN_NONE
service: kubernetes
service: gke
service_metric_prefix: kubernetes.io/
metric_types:
- "container/cpu/core_usage_time"
Expand Down
11 changes: 10 additions & 1 deletion x-pack/metricbeat/module/gcp/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ For example, if Compute Metricset fetches 14 metrics (which is the number of met

[float]
== Metricsets
Currently, we have `billing`, `compute`, `loadbalancing`, `pubsub`, `metrics` and
Currently, we have `billing`, `compute`, `gke`, `loadbalancing`, `pubsub`, `metrics` and
`storage` metricset in `gcp` module.

[float]
Expand All @@ -166,6 +166,15 @@ The `compute` metricset comes with a predefined dashboard:

image::./images/metricbeat-gcp-compute-overview.png[]

[float]
=== `gke`

This metricset fetches metrics for https://cloud.google.com/kubernetes-engine[Kubernetes Engine].

The `gke` metricset contains all GA metrics exported by https://cloud.google.com/monitoring/api/metrics_kubernetes[Cloud Monitoring Kubernetes metrics].

Extra labels and metadata are also extracted using the https://cloud.google.com/compute/docs/reference/rest/v1/instances/get[Compute API].

[float]
=== `loadbalancing`
This metricset fetches metrics from https://cloud.google.com/load-balancing/[Load Balancing]
Expand Down
28 changes: 28 additions & 0 deletions x-pack/metricbeat/module/gcp/gke/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
`gke` metricset is designed for collecting metrics from https://cloud.google.com/kubernetes-engine[Google Kubernetes
Engine].
Google Cloud Monitoring supports Google Kubernetes Engine metrics, as listed in
https://cloud.google.com/monitoring/api/metrics_kubernetes[Google Cloud Monitoring Kubernetes metrics].

This metricset collects all GA Kubernetes metrics from Google Cloud Monitoring
APIs. It leverages under the hood the `metrics` metricset.

We recommend users to define `period: 1m` for this metricset because in Google
Cloud, GKE monitoring metrics are sampled every 60 seconds.
Some of the metrics have an ingest delay up to 240 seconds.

[float]
=== Metricset-specific configuration notes
None

[float]
=== Configuration example
[source,yaml]
----
- module: gcp
metricsets:
- gke
project_id: "your project id"
credentials_file_path: "your JSON credentials file path"
exclude_labels: false
period: 1m
----
2 changes: 1 addition & 1 deletion x-pack/metricbeat/module/gcp/metrics/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ metric prefix, as for GKE metrics the required prefix is `kubernetes.io/`
exclude_labels: false
period: 1m
metrics:
- service: kubernetes
- service: gke
service_metric_prefix: kubernetes.io/
metric_types:
- "container/cpu/core_usage_time"
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/modules.d/gcp.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
period: 1m
metrics:
- aligner: ALIGN_NONE
service: kubernetes
service: gke
service_metric_prefix: kubernetes.io/
metric_types:
- "container/cpu/core_usage_time"
Expand Down

0 comments on commit 07174bd

Please sign in to comment.