Skip to content

Commit

Permalink
Metricbeat: Add maxmemory to redis info metricset (elastic#7127)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano authored and stevea78 committed May 20, 2018
1 parent 02e7b89 commit 2d32667
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 @@ -241,6 +241,7 @@ https://github.com/elastic/beats/compare/v6.2.3...master[Check the HEAD diff]
- Add config option `management_path_prefix` for RabbitMQ module to configure management plugin path prefix {issue}6875[6875] {pull}7074[7074]
- Add shard metricset to Elasticsearch module. {pull}7006[7006]
- Add apiserver metricset to Kubernetes module. {pull}7059[7059]
- Add maxmemory to redis info metricset. {pull}7127[7127]

*Packetbeat*

Expand Down
21 changes: 21 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12076,6 +12076,27 @@ format: bytes
Used memory lua.
--
*`redis.info.memory.max.value`*::
+
--
type: long
format: bytes
Memory limit.
--
*`redis.info.memory.max.policy`*::
+
--
type: keyword
Eviction policy to use when memory limit is reached.
--
*`redis.info.memory.allocator`*::
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/include/fields.go

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion metricbeat/module/redis/info/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
},
"memory": {
"allocator": "jemalloc-4.0.3",
"max": {
"policy": "noeviction",
"value": 0
},
"used": {
"lua": 37888,
"peak": 822240,
Expand Down Expand Up @@ -148,4 +152,4 @@
}
}
}
}
}
11 changes: 11 additions & 0 deletions metricbeat/module/redis/info/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@
description: >
Used memory lua.
- name: max.value
type: long
format: bytes
description: >
Memory limit.
- name: max.policy
type: keyword
description:
Eviction policy to use when memory limit is reached.

- name: allocator
type: keyword
description: >
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/module/redis/info/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ var (
"peak": c.Int("used_memory_peak"),
"lua": c.Int("used_memory_lua"),
},
"max": s.Object{
"value": c.Int("maxmemory"),
"policy": c.Str("maxmemory_policy"),
},
"allocator": c.Str("mem_allocator"), // Could be moved to server as it rarely changes
},
"persistence": s.Object{
Expand Down

0 comments on commit 2d32667

Please sign in to comment.