Add memory-usage metrics to schema of memcached-module of metricbeats

To determ memory-usage of a memcached-instance it would be really helpfull if we can add two additional metrics which are allready present in scanned/parsed "stats"-data of memcached. The field with key " limit_maxbytes" contains the maximum defined memory for the instance and the field with key "bytes" contains the currently used memory. If we add these fields to the scheme which is used for mapping by the scanner, we can calculate the used-memory against max memory of an instance (eg. as percental value by calculate limit_maxbytes / bytes * 100 in a pipeline via logstash or ingestnode). This metric would be ways more usefull to determ an instance which memory reaching max than notice occuring evictions - when max memory is allready reached...

schema = s.Schema{
	"pid": c.Int("pid"),
	"uptime": s.Object{
		"sec": c.Int("uptime"),
	"threads": c.Int("threads"),
	"connections": s.Object{
		"current": c.Int("curr_connections"),
		"total":   c.Int("total_connections"),
	"get": s.Object{
		"hits":   c.Int("get_hits"),
		"misses": c.Int("get_misses"),
	"cmd": s.Object{
		"get": c.Int("cmd_get"),
		"set": c.Int("cmd_set"),
	"read": s.Object{
		"bytes": c.Int("bytes_read"),
	"written": s.Object{
		"bytes": c.Int("bytes_written"),
	"items": s.Object{
		"current": c.Int("curr_items"),
		"total":   c.Int("total_items"),
	"evictions": c.Int("evictions"),
    "bytes": s.Object{
	 	"current": c.Int("bytes"),
	 	"max":   c.Int("limit_maxbytes"),

That's a great idea.

I suggest you either create an enhancement request in the Beats repo or, if you feel brave, submit a pull request with the changes yourself.

thanks, i forwarded this to github as issue #7618

Enhancement request seems to be implemented in future release - at least changes got merged in master.

Thanks for your contribution @Hooddominator !

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.