Skip to content

Commit

Permalink
Add dashboard for redis keys (#9746)
Browse files Browse the repository at this point in the history
Add a dashboard with details for Redis keys using the new key metricset.
Visualizations included show lists length, what is useful when redis is used
for queuing, and average strings sizes and TTLs, what is useful when Redis
is used as a cache.
jsoriano authored Dec 21, 2018
1 parent e80bca5 commit ac04c32
Showing 9 changed files with 921 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
@@ -80,6 +80,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d

*Metricbeat*

- Add `key` metricset to the Redis module. {issue}9582[9582] {pull}9657[9657] {pull}9746[9746]

*Packetbeat*

*Functionbeat*
@@ -231,7 +233,6 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha1...v7.0.0-alpha2[Check the
- Support GET requests in Jolokia module. {issue}8566[8566] {pull}9226[9226]
- Add freebsd support for the uptime metricset. {pull}9413[9413]
- Add `host.os.name` field to add_host_metadata processor. {issue}8948[8948] {pull}9405[9405]
- Add `key` metricset to the Redis module. {issue}9582[9582] {pull}9657[9657]
- Add more TCP statuses to `socket_summary` metricset. {pull}9430[9430]
- Remove experimental tag from ceph metricsets. {pull}9708[9708]
10 changes: 10 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
@@ -20326,6 +20326,16 @@ type: keyword
Key name.
--
*`redis.key.id`*::
+
--
type: keyword
Unique id for this key (With the form <keyspace>:<name>).
--
*`redis.key.type`*::
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion metricbeat/module/redis/fields.go
3 changes: 2 additions & 1 deletion metricbeat/module/redis/key/_meta/data.json
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
"expire": {
"ttl": 360
},
"id": "0:foo",
"length": 3,
"name": "foo",
"type": "string"
@@ -29,4 +30,4 @@
"address": "192.168.32.2:6379",
"type": "redis"
}
}
}
7 changes: 7 additions & 0 deletions metricbeat/module/redis/key/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -23,3 +23,10 @@ whose name starts with `pipeline-*`, with a limit of 20 keys.
- name: 'pipeline-*'
limit: 20
------------------------------------------------------------------------------

[float]
=== Dashboard

The Redis key metricset comes with a predefined dashboard. For example:

image::./images/metricbeat_redis_key_dashboard.png[]
5 changes: 5 additions & 0 deletions metricbeat/module/redis/key/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,11 @@
description: >
Key name.
- name: id
type: keyword
description: >
Unique id for this key (With the form <keyspace>:<name>).
- name: type
type: keyword
description: >
1 change: 1 addition & 0 deletions metricbeat/module/redis/key/data.go
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ import (
)

func eventMapping(r mb.ReporterV2, keyspace uint, info map[string]interface{}) {
info["id"] = fmt.Sprintf("%d:%s", keyspace, info["name"])
r.Event(mb.Event{
MetricSetFields: info,
ModuleFields: common.MapStr{

0 comments on commit ac04c32

Please sign in to comment.