Skip to content

Commit

Permalink
Kubernetes state_daemonset metricset for Metricbeat
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.

Closes: elastic#17010
  • Loading branch information
jarpy committed Aug 18, 2020
1 parent e4baae6 commit d511981
Show file tree
Hide file tree
Showing 20 changed files with 1,831 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Update MySQL dashboard with connection errors and cache metrics {pull}19913[19913] {issue}16955[16955]
- Add cloud.instance.name into aws ec2 metricset. {pull}20077[20077]
- 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]

*Packetbeat*

Expand Down
61 changes: 61 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26312,6 +26312,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
1 change: 1 addition & 0 deletions metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-metricset-kubernetes-scheduler,scheduler>>
|<<metricbeat-metricset-kubernetes-state_container,state_container>>
|<<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>>
|<<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.
29 changes: 29 additions & 0 deletions metricbeat/module/kubernetes/state_daemonset/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- name: daemonset
type: group
description: >
Kubernetes DaemonSet metrics
release: experimental
fields:
- name: name
type: keyword
- name: replicas
type: group
description: >
Kubernetes DaemonSet replica metrics
fields:
- name: available
type: long
description: >
The number of available replicas per DaemonSet
- name: desired
type: long
description: >
The desired number of replicas per DaemonSet
- name: ready
type: long
description: >
The number of ready replicas per DaemonSet
- name: unavailable
type: long
description: >
The number of unavailable replicas per DaemonSet
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"RootFields": null,
"ModuleFields": {
"namespace": "kube-system"
},
"MetricSetFields": {
"name": "kube-proxy",
"replicas": {
"available": 1,
"desired": 1,
"ready": 1,
"unavailable": 0
}
},
"Index": "",
"ID": "",
"Namespace": "kubernetes.daemonset",
"Timestamp": "0001-01-01T00:00:00Z",
"Error": null,
"Host": "",
"Service": "",
"Took": 0,
"Period": 0,
"DisableTimeSeries": false
}
]
Loading

0 comments on commit d511981

Please sign in to comment.