Skip to content

Commit

Permalink
Kubernetes state_daemonset metricset for Metricbeat (elastic#20649)
Browse files Browse the repository at this point in the history
Implements state_daemonset for the Metricbeat Kubernetes module, in
the model of state_deployment, state_replicaset etc.

(cherry picked from commit 2a0e099)
  • Loading branch information
jarpy authored and jsoriano committed Sep 1, 2020
1 parent ad4f043 commit 0159bac
Show file tree
Hide file tree
Showing 21 changed files with 1,856 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,8 @@ field. You can revert this change by configuring tags for the module and omittin
- Add cloud.instance.name into aws ec2 metricset. {pull}20077[20077]
- Add host inventory metrics into aws ec2 metricset. {pull}20171[20171]
- Add `scope` setting for elasticsearch module, allowing it to monitor an Elasticsearch cluster behind a load-balancing proxy. {issue}18539[18539] {pull}18547[18547]
- Add state_daemonset metricset for Kubernetes Metricbeat module {pull}20649[20649]
- Add host inventory metrics to azure compute_vm metricset. {pull}20641[20641]
- Add host inventory metrics to googlecloud compute metricset. {pull}20391[20391]
- Add host inventory metrics to azure compute_vm metricset. {pull}20641[20641]
- Request prometheus endpoints to be gzipped by default {pull}20766[20766]
Expand Down
61 changes: 61 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26356,6 +26356,67 @@ type: double
--
Deadline seconds after schedule for considering failed

type: long

--

[float]
=== daemonset

Kubernetes DaemonSet metrics



*`kubernetes.daemonset.name`*::
+
--
type: keyword

--

[float]
=== replicas

Kubernetes DaemonSet replica metrics



*`kubernetes.daemonset.replicas.available`*::
+
--
The number of available replicas per DaemonSet


type: long

--

*`kubernetes.daemonset.replicas.desired`*::
+
--
The desired number of replicas per DaemonSet


type: long

--

*`kubernetes.daemonset.replicas.ready`*::
+
--
The number of ready replicas per DaemonSet


type: long

--

*`kubernetes.daemonset.replicas.unavailable`*::
+
--
The number of unavailable replicas per DaemonSet


type: long

--
Expand Down
5 changes: 5 additions & 0 deletions metricbeat/docs/modules/kubernetes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ metricbeat.modules:
enabled: true
metricsets:
- state_node
- state_daemonset
- state_deployment
- state_replicaset
- state_statefulset
Expand Down Expand Up @@ -303,6 +304,8 @@ The following metricsets are available:

* <<metricbeat-metricset-kubernetes-state_cronjob,state_cronjob>>

* <<metricbeat-metricset-kubernetes-state_daemonset,state_daemonset>>

* <<metricbeat-metricset-kubernetes-state_deployment,state_deployment>>

* <<metricbeat-metricset-kubernetes-state_node,state_node>>
Expand Down Expand Up @@ -345,6 +348,8 @@ include::kubernetes/state_container.asciidoc[]

include::kubernetes/state_cronjob.asciidoc[]

include::kubernetes/state_daemonset.asciidoc[]

include::kubernetes/state_deployment.asciidoc[]

include::kubernetes/state_node.asciidoc[]
Expand Down
23 changes: 23 additions & 0 deletions metricbeat/docs/modules/kubernetes/state_daemonset.asciidoc
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-kubernetes-state_daemonset]]
=== Kubernetes state_daemonset metricset

experimental[]

include::../../../module/kubernetes/state_daemonset/_meta/docs.asciidoc[]


==== Fields

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

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/kubernetes/state_daemonset/_meta/data.json[]
----
3 changes: 2 additions & 1 deletion metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ This file is generated! See scripts/mage/docs_collector.go
.2+| .2+| |<<metricbeat-metricset-kibana-stats,stats>>
|<<metricbeat-metricset-kibana-status,status>>
|<<metricbeat-module-kubernetes,Kubernetes>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.21+| .21+| |<<metricbeat-metricset-kubernetes-apiserver,apiserver>>
.22+| .22+| |<<metricbeat-metricset-kubernetes-apiserver,apiserver>>
|<<metricbeat-metricset-kubernetes-container,container>>
|<<metricbeat-metricset-kubernetes-controllermanager,controllermanager>> beta[]
|<<metricbeat-metricset-kubernetes-event,event>>
Expand All @@ -158,6 +158,7 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-metricset-kubernetes-scheduler,scheduler>> beta[]
|<<metricbeat-metricset-kubernetes-state_container,state_container>>
|<<metricbeat-metricset-kubernetes-state_cronjob,state_cronjob>> beta[]
|<<metricbeat-metricset-kubernetes-state_daemonset,state_daemonset>> experimental[]
|<<metricbeat-metricset-kubernetes-state_deployment,state_deployment>>
|<<metricbeat-metricset-kubernetes-state_node,state_node>>
|<<metricbeat-metricset-kubernetes-state_persistentvolumeclaim,state_persistentvolumeclaim>> experimental[]
Expand Down
1 change: 1 addition & 0 deletions metricbeat/include/list_docker.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ metricbeat.modules:
enabled: true
metricsets:
- state_node
- state_daemonset
- state_deployment
- state_replicaset
- state_statefulset
Expand Down
1 change: 1 addition & 0 deletions metricbeat/module/kubernetes/_meta/config.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
enabled: true
metricsets:
- state_node
- state_daemonset
- state_deployment
- state_replicaset
- state_statefulset
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/kubernetes/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions metricbeat/module/kubernetes/state_daemonset/_meta/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"@timestamp": "2019-03-01T08:05:34.853Z",
"event": {
"dataset": "kubernetes.daemonset",
"duration": 115000,
"module": "kubernetes"
},
"kubernetes": {
"daemonset": {
"name": "kube-proxy",
"replicas": {
"available": 1,
"desired": 1,
"ready": 1,
"unavailable": 0
}
},
"namespace": "kube-system"
},
"metricset": {
"name": "state_daemonset",
"period": 10000
},
"service": {
"address": "127.0.0.1:55555",
"type": "kubernetes"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is the `state_daemonset` metricset of the Kubernetes module.
Loading

0 comments on commit 0159bac

Please sign in to comment.