Skip to content

Commit

Permalink
Metricbeat: Add memcached used bytes metrics (elastic#7740)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano authored and ruflin committed Jul 26, 2018
1 parent 2df93d0 commit 60e8999
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand Down
20 changes: 20 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9684,6 +9684,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]]
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/memcached/fields.go

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

6 changes: 5 additions & 1 deletion metricbeat/module/memcached/stats/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
},
"memcached": {
"stats": {
"bytes": {
"current": 0,
"limit": 67108864
},
"cmd": {
"get": 0,
"set": 0
Expand Down Expand Up @@ -42,4 +46,4 @@
"name": "stats",
"rtt": 115
}
}
}
12 changes: 12 additions & 0 deletions metricbeat/module/memcached/stats/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,15 @@
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.
4 changes: 4 additions & 0 deletions metricbeat/module/memcached/stats/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
},
}
)

0 comments on commit 60e8999

Please sign in to comment.