Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis: remove deprecated fields #27948

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add support for kube-state-metrics v2.0.0 {pull}27552[27552]
- Add User-Agent header to HTTP requests. {issue}18160[18160] {pull}27509[27509]
- Errors should be thrown as errors. Metricsets inside Metricbeat will now throw errors as the `error` log level. {pull}27804[27804]
- Remove deprecated fields in Redis module. {issue}11835[11835] {pull}27948[27948]

*Packetbeat*

Expand Down
14 changes: 0 additions & 14 deletions libbeat/kibana/testdata/extensive/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4943,16 +4943,6 @@
description: >
Number of client connections (excluding connections from slaves).

- name: longest_output_list
type: long
description: >
Longest output list among current client connections.

- name: biggest_input_buf
type: long
description: >
Biggest input buffer among current client connections.

- name: blocked
type: long
description: >
Expand Down Expand Up @@ -5109,10 +5099,6 @@
type: long
description:

- name: master_offset
type: long
description:

- name: backlog.active
type: long
description:
Expand Down
2 changes: 1 addition & 1 deletion libbeat/kibana/testdata/extensive/metricbeat-6.ndjson

Large diffs are not rendered by default.

49 changes: 5 additions & 44 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -53407,19 +53407,6 @@ Redis client stats.
Number of client connections (excluding connections from slaves).


type: long

--

*`redis.info.clients.longest_output_list`*::
+
--

deprecated:[6.5.0]

Longest output list among current client connections (replaced by max_output_buffer).


type: long

--
Expand All @@ -53430,19 +53417,6 @@ type: long
Longest output list among current client connections.


type: long

--

*`redis.info.clients.biggest_input_buf`*::
+
--

deprecated:[6.5.0]

Biggest input buffer among current client connections (replaced by max_input_buffer).


type: long

--
Expand Down Expand Up @@ -53577,7 +53551,7 @@ format: bytes
*`redis.info.memory.used.lua`*::
+
--
Used memory by the Lua engine.
Used memory by the Lua engine.


type: long
Expand All @@ -53589,7 +53563,7 @@ format: bytes
*`redis.info.memory.used.dataset`*::
+
--
The size in bytes of the dataset
The size in bytes of the dataset


type: long
Expand Down Expand Up @@ -53834,7 +53808,7 @@ format: duration
*`redis.info.persistence.rdb.copy_on_write.last_size`*::
+
--
The size in bytes of copy-on-write allocations during the last RBD save operation
The size in bytes of copy-on-write allocations during the last RBD save operation


type: long
Expand Down Expand Up @@ -53963,7 +53937,7 @@ format: bytes
*`redis.info.persistence.aof.size.current`*::
+
--
AOF current file size
AOF current file size


type: long
Expand Down Expand Up @@ -54027,19 +54001,6 @@ type: keyword
Number of connected slaves


type: long

--

*`redis.info.replication.master_offset`*::
+
--

deprecated:[6.5]

The server's current replication offset


type: long

--
Expand Down Expand Up @@ -54069,7 +54030,7 @@ format: bytes
*`redis.info.replication.backlog.first_byte_offset`*::
+
--
The master offset of the replication backlog buffer
The master offset of the replication backlog buffer


type: long
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/module/redis/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ version: '2.3'

services:
redis:
image: docker.elastic.co/integrations-ci/beats-redis:${REDIS_VERSION:-3.2.12}-1
image: docker.elastic.co/integrations-ci/beats-redis:${REDIS_VERSION:-5.0.5}-1
build:
context: ./_meta
args:
REDIS_VERSION: ${REDIS_VERSION:-3.2.12}
REDIS_VERSION: ${REDIS_VERSION:-5.0.5}
privileged: true
ports:
- 6379
2 changes: 1 addition & 1 deletion metricbeat/module/redis/fields.go

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

5 changes: 1 addition & 4 deletions metricbeat/module/redis/info/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
"redis": {
"info": {
"clients": {
"biggest_input_buf": 0,
"blocked": 0,
"connected": 5,
"longest_output_list": 0,
"max_input_buffer": 0,
"max_output_buffer": 0
},
Expand Down Expand Up @@ -116,7 +114,6 @@
"offset": 0,
"sync": {}
},
"master_offset": 0,
"role": "master",
"slave": {}
},
Expand Down Expand Up @@ -187,4 +184,4 @@
"type": "redis",
"version": "3.2.12"
}
}
}
34 changes: 9 additions & 25 deletions metricbeat/module/redis/info/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,10 @@
type: long
description: >
Number of client connections (excluding connections from slaves).
- name: longest_output_list
type: long
deprecated: "6.5.0"
description: >
Longest output list among current client connections (replaced by max_output_buffer).
- name: max_output_buffer
type: long
description: >
Longest output list among current client connections.
- name: biggest_input_buf
type: long
deprecated: "6.5.0"
description: >
Biggest input buffer among current client connections (replaced by max_input_buffer).
- name: max_input_buffer
type: long
description: >
Expand Down Expand Up @@ -92,12 +82,12 @@
type: long
format: bytes
description: >
Used memory by the Lua engine.
Used memory by the Lua engine.
- name: used.dataset
type: long
format: bytes
description: >
The size in bytes of the dataset
The size in bytes of the dataset

- name: max.value
type: long
Expand Down Expand Up @@ -209,12 +199,12 @@
format: duration
description: >
Duration of the on-going RDB save operation if any

- name: copy_on_write.last_size
type: long
format: bytes
description: >
The size in bytes of copy-on-write allocations during the last RBD save operation
The size in bytes of copy-on-write allocations during the last RBD save operation

- name: aof
type: group
Expand Down Expand Up @@ -271,12 +261,12 @@
format: bytes
description: >
Size of the AOF buffer

- name: size.current
type: long
format: bytes
description: >
AOF current file size
AOF current file size
- name: size.base
type: long
format: bytes
Expand Down Expand Up @@ -307,12 +297,6 @@
description: >
Number of connected slaves

- name: master_offset
type: long
deprecated: 6.5
description: >
The server's current replication offset

- name: backlog.active
type: long
description: >
Expand All @@ -325,7 +309,7 @@
- name: backlog.first_byte_offset
type: long
description: >
The master offset of the replication backlog buffer
The master offset of the replication backlog buffer
- name: backlog.histlen
type: long
description: >
Expand Down Expand Up @@ -362,7 +346,7 @@
format: duration
description: >
Number of seconds since last transfer I/O during a SYNC operation

- name: slave.offset
type: long
description: >
Expand Down Expand Up @@ -513,7 +497,7 @@
type: long
description: >
Number of evicted keys due to maxmemory limit

- name: keyspace.hits
type: long
description: >
Expand Down
11 changes: 4 additions & 7 deletions metricbeat/module/redis/info/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ import (
var (
schema = s.Schema{
"clients": s.Object{
"connected": c.Int("connected_clients"),
"longest_output_list": c.Int("client_longest_output_list"),
"biggest_input_buf": c.Int("client_biggest_input_buf"),
"max_output_buffer": c.Int("client_recent_max_output_buffer"),
"max_input_buffer": c.Int("client_recent_max_input_buffer"),
"blocked": c.Int("blocked_clients"),
"connected": c.Int("connected_clients"),
"max_output_buffer": c.Int("client_recent_max_output_buffer"),
"max_input_buffer": c.Int("client_recent_max_input_buffer"),
"blocked": c.Int("blocked_clients"),
},
"cluster": s.Object{
"enabled": c.Bool("cluster_enabled"),
Expand Down Expand Up @@ -140,7 +138,6 @@ var (
"replication": s.Object{
"role": c.Str("role"),
"connected_slaves": c.Int("connected_slaves"),
"master_offset": c.Int("master_repl_offset"), // ToDo Should be deprectad as master.offset introduced
"backlog": s.Object{
"active": c.Int("repl_backlog_active"),
"size": c.Int("repl_backlog_size"),
Expand Down
15 changes: 0 additions & 15 deletions metricbeat/module/redis/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,6 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error {
return errors.Wrap(err, "failed to fetch redis info")
}

// In 5.0 some fields are renamed, maintain both names, old ones will be deprecated
renamings := []struct {
old, new string
}{
{"client_longest_output_list", "client_recent_max_output_buffer"},
{"client_biggest_input_buf", "client_recent_max_input_buffer"},
}
for _, r := range renamings {
if v, ok := info[r.new]; ok {
info[r.old] = v
} else {
info[r.new] = info[r.old]
}
}

slowLogLength, err := redis.FetchSlowLogLength(conn)
if err != nil {
return errors.Wrap(err, "failed to fetch slow log length")
Expand Down
5 changes: 2 additions & 3 deletions metricbeat/module/redis/test_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
CPU_FIELDS = ["used.sys", "used.sys_children", "used.user",
"used.user_children"]

CLIENTS_FIELDS = ["blocked", "biggest_input_buf",
"longest_output_list", "connected",
"max_input_buffer", "max_output_buffer"]
CLIENTS_FIELDS = ["blocked", "connected", "max_input_buffer",
"max_output_buffer"]


@metricbeat.parameterized_with_supported_versions
Expand Down