From 29b440f7580653b4042ea26b3847288d31733e71 Mon Sep 17 00:00:00 2001 From: Chris Mark Date: Wed, 20 Jan 2021 13:49:18 +0200 Subject: [PATCH] Add kubernetes.volume.fs.used.pct field (#23564) * Add kubernetes.volume.fs.used.pct field Signed-off-by: chrismark * Add changelog entry Signed-off-by: chrismark --- CHANGELOG.next.asciidoc | 1 + metricbeat/docs/fields.asciidoc | 12 ++++++++++++ metricbeat/module/kubernetes/fields.go | 2 +- metricbeat/module/kubernetes/volume/_meta/fields.yml | 5 +++++ metricbeat/module/kubernetes/volume/data.go | 3 +++ metricbeat/module/kubernetes/volume/volume_test.go | 1 + 6 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 8026c0a6ac9..1d9bacfa6bb 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -580,6 +580,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Honor kube event resysncs to handle missed watch events {pull}22668[22668] - Add autodiscover provider and metadata processor for Nomad. {pull}14954[14954] {pull}23324[23324] - Add `processors.rate_limit.n.dropped` monitoring counter metric for the `rate_limit` processor. {pull}23330[23330] +- Add kubernetes.volume.fs.used.pct field. {pull}23564[23564] *Auditbeat* diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index b47f7d09ca8..b430fffdae9 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -30873,6 +30873,18 @@ format: bytes -- +*`kubernetes.volume.fs.used.pct`*:: ++ +-- +Percentage of used storage + + +type: scaled_float + +format: percent + +-- + *`kubernetes.volume.fs.inodes.used`*:: + diff --git a/metricbeat/module/kubernetes/fields.go b/metricbeat/module/kubernetes/fields.go index bc7f92ad298..aec239344fd 100644 --- a/metricbeat/module/kubernetes/fields.go +++ b/metricbeat/module/kubernetes/fields.go @@ -32,5 +32,5 @@ func init() { // AssetKubernetes returns asset data. // This is the base64 encoded gzipped contents of module/kubernetes. func AssetKubernetes() string { - return "eJzsXU9z47aSv8+nQM1psuXosLW1hzlsVeK8t8+VzDyv7ckctrYUmGxJiEmAAUB79D79FsB/IAmAoAjJHls6pDK21f1Dd6PR6AYaP6IH2H9ED+U9cAoSxDuEJJEZfETvf21/+P4dQimIhJNCEkY/ov96hxBC3R+gHCQnifo2hwywgI9oi98hJEBKQrfiI/rf90Jk7y/Q+52Uxfv/U7/bMS7XCaMbsv2INjgT8A6hDYEsFR81gx8RxTkM4KmP3BeKA2dlUf/EAk99ruiG8RyrHyNMUyQklkRIkgjENqhgqUA5pngLKbrfG3xWNQUTjYkIF0QAfwTe/sYGygNsIL+frq9QRdAQZfPpi7T5DKGZ8Dj8VYKQqyQjQGXvTxqcD7B/Yjwd/M6DVn0uNT0E3yAplV4bRsKLgoNgJU8gHo6bijKkyEp7CECU98fE4CI/gpGwIj4ApMmiD0lWCgn8QjMVBU7gopXOD15cj8Dv48H6x93dNRqRHFkmSyOKQvMckRzzpBKoXCtG8dVQY9As0IjFEEvK92te0ngwvoLcAUdyBw0PVAoQKOV7NGQ0BPNA6JDbAiS/Epoq71pTn1BJXjAa10c1JNEO0zRTXsoQihfN0HcvRKKcuiaJNqzRTICbeAQuCItoGjXBFsV4mEMIWnK9xW0hhGaS2AgPmecgdyyiPeqJaSE6GjQTEc2wHfGQasO24CwBIawcbYZoW+9NeklRrgQko983NFNW3mdDvzcayOX1FyQgYTQdIus45ZAzvlfLOkmBytX9vovMxnwzRreWX1Zx2Ufk+nIP1c/qjxChqOFZY5iC+Ei4LHF2SoQ1yymAm1SsWAF0lbBy5P0mofVYfy7ze+DK4yqCaEMyaP+AcbcahcRcQhrBaG4rg0GC0AS0i6mNu+FhnQBqIxDN+tt1teQ62l+VYlUAT4BKksHq35wjZPd/QmJTQPWL9Rw5NHO+AYFyknBWTyfUwXHrxDYMUeYL9ePHlZR5mWFJHgHZWPmgLTfeBpqmpFeohv4kEEH+BdXMj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aRqHCfXt3L9K1nsBfZlrMWhGcS7Hq/Xf1Fj/R2OdqvgPpTQHQcWB0A3jOaToww7zVC9QAtIffLel42w7+gN1HoxR9A5lYY6wmjnqqxfoDzXUP9RY/1CD/cOxflgGfsD4NDktysr8cFFkBASSbLw99f/TvZ1V7oAksbIrNbVnPzR1W+PwJE+yUkjgriA8gMcVlcApztDVdWvy9fjtLOFb9YVFO+JmZA0x9MvnW/cUaFkePswRQ8feImM4Xd/jDNNkkVh/YzhFP9d0WoNyMF0yxZuBjWi0O0K65WofvsRENAUX+oaB2rItsYmGzT9sdAbrjt3jT7xu0ohK01DOsPcFc3cJmzKLF9g3FKNF9j4hTGWGxoHL3c4QiSQ5CInzAn0AtUBX6+BtPYJh9HeCrUZPeG0MddBu48jxqdHfqAlPezGfS4joGbYdowMSPoANuC4AP7aejVDfCF5elrpbJRtgX4aaG+UGABvkUYdp1GVez8yqPnso1UPjDqgKzh6JIIyO9o+zi0UdpS6wMlG4agC6FLO2nC2fFXtrKvUJ9ao1yJ7inCRY7UnrBaSuSNhLV3Xd457oxOKiNP4nllaHh9Pqne1ONoRuEaYpqrnEX/J7ap9Y+PXDb7Gsv3pFznjnIsrCb7nwOksTltef2isq7qsZJ35U7k28bZUwfvxHK0cNFsdsJh9bDLzUi2ppXzIOtcgppo5WFAOUL+WZryMdajo/49QD/fqfXbm5vQ0TRf1Yzet/m+fr6FWeCckUeAtHfPGlu10X/ArNyRBNv0MT9ShZ//zYswXoY6kYJ8es3EZPcx/uoT3Pcb+mWTh6bH/6se3wSu0rFVHAM9rdOu/Z0r9S8dgfyLYN4qU9YHjde66wPsOgd4tOBRPKUs/B7iUqnnx+PUb4+6VSlmMQhmfl4N+bxADzdw4QAsbe6yY2mip+reH8fwAAAP//CPgmJQ==" } diff --git a/metricbeat/module/kubernetes/volume/_meta/fields.yml b/metricbeat/module/kubernetes/volume/_meta/fields.yml index 93b6204d53e..4eedf6014ba 100644 --- a/metricbeat/module/kubernetes/volume/_meta/fields.yml +++ b/metricbeat/module/kubernetes/volume/_meta/fields.yml @@ -35,6 +35,11 @@ format: bytes description: > Filesystem total used in bytes + - name: pct + type: scaled_float + format: percent + description: > + Percentage of used storage - name: inodes type: group fields: diff --git a/metricbeat/module/kubernetes/volume/data.go b/metricbeat/module/kubernetes/volume/data.go index ae0f5d891f4..6170bbadbcc 100644 --- a/metricbeat/module/kubernetes/volume/data.go +++ b/metricbeat/module/kubernetes/volume/data.go @@ -67,6 +67,9 @@ func eventMapping(content []byte) ([]common.MapStr, error) { }, }, } + if volume.CapacityBytes > 0 { + volumeEvent.Put("fs.used.pct", float64(volume.UsedBytes)/float64(volume.CapacityBytes)) + } events = append(events, volumeEvent) } diff --git a/metricbeat/module/kubernetes/volume/volume_test.go b/metricbeat/module/kubernetes/volume/volume_test.go index e527a64d452..71ca971c5e5 100644 --- a/metricbeat/module/kubernetes/volume/volume_test.go +++ b/metricbeat/module/kubernetes/volume/volume_test.go @@ -49,6 +49,7 @@ func TestEventMapping(t *testing.T) { "fs.available.bytes": 1939689472, "fs.capacity.bytes": 1939701760, "fs.used.bytes": 12288, + "fs.used.pct": float64(12288) / float64(1939701760), "fs.inodes.used": 9, "fs.inodes.free": 473551, "fs.inodes.count": 473560,