From 342bb7628fe86f0cf0c873b58fb9e7f301ad5bf0 Mon Sep 17 00:00:00 2001 From: Hooddominator Date: Wed, 18 Jul 2018 12:01:58 +0200 Subject: [PATCH 1/6] Update data.go added bytes and limit_maxbytes to schema --- metricbeat/module/memcached/stats/data.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/metricbeat/module/memcached/stats/data.go b/metricbeat/module/memcached/stats/data.go index be6224eab11c..e3b1b57ea0b5 100644 --- a/metricbeat/module/memcached/stats/data.go +++ b/metricbeat/module/memcached/stats/data.go @@ -52,5 +52,9 @@ var ( "total": c.Int("total_items"), }, "evictions": c.Int("evictions"), + "bytes": s.Object{ + "current": c.Int("bytes"), + "limit": c.Int("limit_maxbytes"), + }, } ) From 5e231c957dd90dff95c7c2171e631f293ac76797 Mon Sep 17 00:00:00 2001 From: Hooddominator Date: Wed, 18 Jul 2018 12:02:56 +0200 Subject: [PATCH 2/6] Update data.json updated example data --- metricbeat/module/memcached/stats/_meta/data.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/metricbeat/module/memcached/stats/_meta/data.json b/metricbeat/module/memcached/stats/_meta/data.json index 1ddf7d907a8e..540f45b0ca89 100644 --- a/metricbeat/module/memcached/stats/_meta/data.json +++ b/metricbeat/module/memcached/stats/_meta/data.json @@ -6,6 +6,10 @@ }, "memcached": { "stats": { + "bytes": { + "current": 0, + "limit": 67108864 + }, "cmd": { "get": 0, "set": 0 @@ -42,4 +46,4 @@ "name": "stats", "rtt": 115 } -} \ No newline at end of file +} From 8f4851b03e585411724ee2ae30a55f69357681b1 Mon Sep 17 00:00:00 2001 From: Hooddominator Date: Wed, 18 Jul 2018 12:04:14 +0200 Subject: [PATCH 3/6] Update fields.yml updated fields-description --- .../module/memcached/stats/_meta/fields.yml | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/metricbeat/module/memcached/stats/_meta/fields.yml b/metricbeat/module/memcached/stats/_meta/fields.yml index cdeee70f3209..5eedc6a82f43 100644 --- a/metricbeat/module/memcached/stats/_meta/fields.yml +++ b/metricbeat/module/memcached/stats/_meta/fields.yml @@ -8,78 +8,75 @@ type: long description: > Current process ID of the Memcached task. - - name: uptime.sec type: long description: > Memcached server uptime. - - name: threads type: long description: > Number of threads used by the current Memcached server process. - - name: connections.current type: long description: > Number of open connections to this Memcached server, should be the same value on all servers during normal operation. - - name: connections.total type: long description: > Numer of successful connect attempts to this server since it has been started. - - name: get.hits type: long description: > Number of successful "get" commands (cache hits) since startup, divide them by the "cmd_get" value to get the cache hitrate. - - name: get.misses type: long description: > Number of failed "get" requests because nothing was cached for this key or the cached value was too old. - - name: cmd.get type: long description: > Number of "get" commands received since server startup not counting if they were successful or not. - - name: cmd.set type: long description: > Number of "set" commands serviced since startup. - - name: read.bytes type: long formate: bytes description: > Total number of bytes received from the network by this server. - - name: written.bytes type: long formate: bytes description: > Total number of bytes send to the network by this server. - - name: items.current type: long description: > Number of items currently in this server's cache. - - name: items.total type: long formate: bytes description: > Number of items stored ever stored on this server. This is no "maximum item count" value but a counted increased by every new item stored in the cache. - - name: evictions type: long formate: bytes description: > Number of objects removed from the cache to free up memory for new items because Memcached reached it's maximum memory setting (limit_maxbytes). + - name: bytes.current + type: long + formate: bytes + description: > + Number of bytes currently used for caching items. + - name: bytes.limit + type: long + formate: bytes + description: > + Number of bytes this server is allowed to use for storage. From 5b59c2b49615b1c6b43ad9c4c6041eff263a220a Mon Sep 17 00:00:00 2001 From: Hooddominator Date: Wed, 18 Jul 2018 13:56:43 +0200 Subject: [PATCH 4/6] Update fields.yml fixed empty newlines --- .../module/memcached/stats/_meta/fields.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/metricbeat/module/memcached/stats/_meta/fields.yml b/metricbeat/module/memcached/stats/_meta/fields.yml index 5eedc6a82f43..35940c8751ce 100644 --- a/metricbeat/module/memcached/stats/_meta/fields.yml +++ b/metricbeat/module/memcached/stats/_meta/fields.yml @@ -8,73 +8,88 @@ type: long description: > Current process ID of the Memcached task. + - name: uptime.sec type: long description: > Memcached server uptime. + - name: threads type: long description: > Number of threads used by the current Memcached server process. + - name: connections.current type: long description: > Number of open connections to this Memcached server, should be the same value on all servers during normal operation. + - name: connections.total type: long description: > Numer of successful connect attempts to this server since it has been started. + - name: get.hits type: long description: > Number of successful "get" commands (cache hits) since startup, divide them by the "cmd_get" value to get the cache hitrate. + - name: get.misses type: long description: > Number of failed "get" requests because nothing was cached for this key or the cached value was too old. + - name: cmd.get type: long description: > Number of "get" commands received since server startup not counting if they were successful or not. + - name: cmd.set type: long description: > Number of "set" commands serviced since startup. + - name: read.bytes type: long formate: bytes description: > Total number of bytes received from the network by this server. + - name: written.bytes type: long formate: bytes description: > Total number of bytes send to the network by this server. + - name: items.current type: long description: > Number of items currently in this server's cache. + - name: items.total type: long formate: bytes description: > Number of items stored ever stored on this server. This is no "maximum item count" value but a counted increased by every new item stored in the cache. + - name: evictions type: long formate: bytes description: > Number of objects removed from the cache to free up memory for new items because Memcached reached it's maximum memory setting (limit_maxbytes). + - name: bytes.current type: long formate: bytes description: > Number of bytes currently used for caching items. + - name: bytes.limit type: long formate: bytes From e134074423bcd5233035cecb448820fadcfeaf1e Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 25 Jul 2018 20:23:55 +0200 Subject: [PATCH 5/6] Update fields --- metricbeat/docs/fields.asciidoc | 20 ++++++++++++++++++++ metricbeat/module/memcached/fields.go | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index ebc748e47433..e2924237b269 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -9169,6 +9169,26 @@ type: long Number of objects removed from the cache to free up memory for new items because Memcached reached it's maximum memory setting (limit_maxbytes). +-- + +*`memcached.stats.bytes.current`*:: ++ +-- +type: long + +Number of bytes currently used for caching items. + + +-- + +*`memcached.stats.bytes.limit`*:: ++ +-- +type: long + +Number of bytes this server is allowed to use for storage. + + -- [[exported-fields-mongodb]] diff --git a/metricbeat/module/memcached/fields.go b/metricbeat/module/memcached/fields.go index 3d7e97821009..2ad44bb92149 100644 --- a/metricbeat/module/memcached/fields.go +++ b/metricbeat/module/memcached/fields.go @@ -31,5 +31,5 @@ func init() { // Asset returns asset data func Asset() string { - return "eJzEVr12MycQ7fUUc9R89jn2PoCKNEmTIqnc+7AwqyUCZsMMkvftc4Bd/ceSEzmhkQTizr3zyytscFyBR6+V7tEsAMSKwxUsf5v3lgsAg6yjHcRSWMFPCwCA/Tl4MsnhAoB7ivKuKXR2vYJOOc67ER0qxhW0KGoB0Fl0hlcF5BWC8nhKIC8ZB1zBOlIapp0rDE6hjuFYlPB+9xrc30LWdQ5wrmFe5wSOSQzWnOzPNByF9dnBJ0zy+jnFiEFgiKSRGX79BagD6fEoCKJ40+xvXiWUBrEeG0b9IF4H64xxi3G28DkN6SMqww/i8HvyLcbqj4ILidFAOxb/6MlzF0wnV96gqikE1Nk0NxPUw2nTgOHYEAiB9JYvOL/k+krOQItFGyuPF7hb5RICBVDOTfcYTIo2rCFQ9Mplg1FlU18QLyTKPU56Vc5J5xh0yc22QImgH+TghClcbINGsAK9YmgRQ67QKGhuaFijNL2VxyfbEfflGmUJmrxXwTA8laBBtvo88S5c0/ACxm6tKdHzF9hTxi61N+8FsYZSKIuoyTwDRyW3iiwL95YZHy+9U9ahmWRH/DMhSw6KVokRAkmfk22nGKb07SjWYG5wvMAtZzj/tWrOd4UIyN2Kr/amWePji/IsphE12m2uxBrPKSlrWLNk0JSCZN22NOZLnTuMeJw1FPO9O+Txd8jjE3lZj9UHeVXXDW652TbtKPdnWJf7j+QheuXWDe5vuQFB2CsoEIe4dJF8yaOAsqO4qdW07x83pOyiFcHwf6thDKY2vn+owwr67xtUBX2eqG4EG46p/ZjK/S6KXxon/8bR5+xZKKIBrOVbvtOJjAbe8g/LEAiWXn1Yn3y5fIFdSn5u020SUHULDdigY34vlndIN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urcBoQ57UmY/vr5QPD6OoBi1FqO/0YfPTyEs23quXThKvqR2+tgHnc1Wr4XB51DVWXqNo6GWrqP8O/an4P9pcrl2fdIemAtSdp5FSMZq/Z4mrxTwAAAP//OVbeqg==" } From 1e40e1afb3c0680c4f5e75178426aff1d1224af5 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 25 Jul 2018 20:28:40 +0200 Subject: [PATCH 6/6] Add changelog entry --- CHANGELOG.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index b694e08212ab..760483280247 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -325,6 +325,7 @@ https://github.com/elastic/beats/compare/v6.2.3...master[Check the HEAD diff] - Release prometheus collector metricset as GA. {pull}7660[7660] - Add Elasticsearch `cluster_stats` metricset. {pull}7638[7638] - Added `basepath` setting for HTTP-based metricsets {pull}7700[7700] +- Add metrics about cache size to memcached module {pull}7740[7740] *Packetbeat*