| 1 | plugin_name: go.d.plugin |
| 2 | modules: |
| 3 | - meta: |
| 4 | id: collector-go.d.plugin-redis |
| 5 | plugin_name: go.d.plugin |
| 6 | module_name: redis |
| 7 | monitored_instance: |
| 8 | name: Redis |
| 9 | link: https://redis.com/ |
| 10 | categories: |
| 11 | - data-collection.databases |
| 12 | icon_filename: redis.svg |
| 13 | related_resources: |
| 14 | integrations: |
| 15 | list: |
| 16 | - plugin_name: apps.plugin |
| 17 | module_name: apps |
| 18 | - plugin_name: cgroups.plugin |
| 19 | module_name: /sys/fs/cgroup |
| 20 | monitored_instance_name: Containers |
| 21 | alternative_monitored_instances: [] |
| 22 | info_provided_to_referring_integrations: |
| 23 | description: "" |
| 24 | keywords: |
| 25 | - redis |
| 26 | - databases |
| 27 | overview: |
| 28 | data_collection: |
| 29 | metrics_description: | |
| 30 | This collector monitors the health and performance of Redis servers and collects general statistics, CPU and memory consumption, replication information, command statistics, and more. |
| 31 | method_description: | |
| 32 | It connects to the Redis instance via a TCP or UNIX socket and executes the following commands: |
| 33 | |
| 34 | - [INFO ALL](https://redis.io/commands/info) |
| 35 | - [PING](https://redis.io/commands/ping/) |
| 36 | default_behavior: |
| 37 | auto_detection: |
| 38 | description: | |
| 39 | By default, it detects instances running on localhost by attempting to connect using known Redis TCP and UNIX sockets: |
| 40 | |
| 41 | - 127.0.0.1:6379 |
| 42 | - /tmp/redis.sock |
| 43 | - /var/run/redis/redis.sock |
| 44 | - /var/lib/redis/redis.sock |
| 45 | limits: |
| 46 | description: "" |
| 47 | performance_impact: |
| 48 | description: "" |
| 49 | additional_permissions: |
| 50 | description: "" |
| 51 | multi_instance: true |
| 52 | supported_platforms: |
| 53 | include: [] |
| 54 | exclude: [] |
| 55 | setup: |
| 56 | prerequisites: |
| 57 | list: [] |
| 58 | configuration: |
| 59 | file: |
| 60 | name: go.d/redis.conf |
| 61 | options: |
| 62 | description: | |
| 63 | The following options can be defined globally: update_every, autodetection_retry. |
| 64 | folding: |
| 65 | title: Config options |
| 66 | enabled: true |
| 67 | list: |
| 68 | - name: update_every |
| 69 | description: Data collection interval (seconds). |
| 70 | default_value: 5 |
| 71 | required: false |
| 72 | group: Collection |
| 73 | - name: autodetection_retry |
| 74 | description: Autodetection retry interval (seconds). Set 0 to disable. |
| 75 | default_value: 0 |
| 76 | required: false |
| 77 | group: Collection |
| 78 | |
| 79 | - name: address |
| 80 | description: Redis server address (TCP or Unix socket). |
| 81 | default_value: redis://@localhost:6379 |
| 82 | required: true |
| 83 | group: Target |
| 84 | details: | |
| 85 | There are two connection types: TCP socket and Unix socket. |
| 86 | |
| 87 | - TCP: `redis://<user>:<password>@<host>:<port>/<db_number>` |
| 88 | - Unix: `unix://<user>:<password>@</path/to/redis.sock>?db=<db_number>` |
| 89 | - name: timeout |
| 90 | description: Dial, read, and write timeout (seconds). |
| 91 | default_value: 1 |
| 92 | required: false |
| 93 | group: Target |
| 94 | |
| 95 | - name: username |
| 96 | description: Username for authentication. |
| 97 | default_value: "" |
| 98 | required: false |
| 99 | group: Auth |
| 100 | - name: password |
| 101 | description: Password for authentication. |
| 102 | default_value: "" |
| 103 | required: false |
| 104 | group: Auth |
| 105 | |
| 106 | - name: tls_skip_verify |
| 107 | description: Skip TLS certificate and hostname verification (insecure). |
| 108 | default_value: no |
| 109 | required: false |
| 110 | group: TLS |
| 111 | - name: tls_ca |
| 112 | description: Path to CA bundle used to validate the server certificate. |
| 113 | default_value: "" |
| 114 | required: false |
| 115 | group: TLS |
| 116 | - name: tls_cert |
| 117 | description: Path to client TLS certificate (for mTLS). |
| 118 | default_value: "" |
| 119 | required: false |
| 120 | group: TLS |
| 121 | - name: tls_key |
| 122 | description: Path to client TLS private key (for mTLS). |
| 123 | default_value: "" |
| 124 | required: false |
| 125 | group: TLS |
| 126 | |
| 127 | - name: functions.top_queries.disabled |
| 128 | description: Disable the [top-queries](#top-queries) function. |
| 129 | default_value: false |
| 130 | required: false |
| 131 | group: Functions |
| 132 | - name: functions.top_queries.timeout |
| 133 | description: Query timeout (seconds). Uses collector timeout if not set. |
| 134 | default_value: "" |
| 135 | required: false |
| 136 | group: Functions |
| 137 | - name: functions.top_queries.limit |
| 138 | description: Maximum number of queries to return. |
| 139 | default_value: 500 |
| 140 | required: false |
| 141 | group: Functions |
| 142 | |
| 143 | - name: vnode |
| 144 | description: Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes). |
| 145 | default_value: "" |
| 146 | required: false |
| 147 | group: Virtual Node |
| 148 | examples: |
| 149 | folding: |
| 150 | title: Config |
| 151 | enabled: true |
| 152 | list: |
| 153 | - name: TCP socket |
| 154 | description: An example configuration. |
| 155 | config: | |
| 156 | jobs: |
| 157 | - name: local |
| 158 | address: 'redis://@127.0.0.1:6379' |
| 159 | - name: Unix socket |
| 160 | description: An example configuration. |
| 161 | config: | |
| 162 | jobs: |
| 163 | - name: local |
| 164 | address: 'unix://@/tmp/redis.sock' |
| 165 | - name: TCP socket with password |
| 166 | description: An example configuration. |
| 167 | config: | |
| 168 | jobs: |
| 169 | - name: local |
| 170 | address: 'redis://:password@127.0.0.1:6379' |
| 171 | - name: Multi-instance |
| 172 | description: | |
| 173 | > **Note**: When you define multiple jobs, their names must be unique. |
| 174 | |
| 175 | Local and remote instances. |
| 176 | config: | |
| 177 | jobs: |
| 178 | - name: local |
| 179 | address: 'redis://:password@127.0.0.1:6379' |
| 180 | |
| 181 | - name: remote |
| 182 | address: 'redis://user:password@203.0.113.0:6379' |
| 183 | troubleshooting: |
| 184 | problems: |
| 185 | list: [] |
| 186 | alerts: |
| 187 | - name: redis_connections_rejected |
| 188 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/redis.conf |
| 189 | metric: redis.connections |
| 190 | info: connections rejected because of maxclients limit in the last minute |
| 191 | - name: redis_bgsave_slow |
| 192 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/redis.conf |
| 193 | metric: redis.bgsave_now |
| 194 | info: duration of the on-going RDB save operation |
| 195 | - name: redis_bgsave_broken |
| 196 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/redis.conf |
| 197 | metric: redis.bgsave_health |
| 198 | info: 'status of the last RDB save operation (0: ok, 1: error)' |
| 199 | - name: redis_master_link_down |
| 200 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/redis.conf |
| 201 | metric: redis.master_link_down_since_time |
| 202 | info: time elapsed since the link between master and slave is down |
| 203 | functions: |
| 204 | description: | |
| 205 | This collector exposes real-time functions for interactive troubleshooting in the Live tab. |
| 206 | list: |
| 207 | - id: top-queries |
| 208 | name: Top Queries |
| 209 | description: | |
| 210 | Retrieves slow command entries from Redis [SLOWLOG](https://redis.io/docs/latest/commands/slowlog/). |
| 211 | |
| 212 | This function executes the `SLOWLOG GET` command to retrieve entries of commands that exceeded the configured execution time threshold (`slowlog-log-slower-than`). It provides command details, execution duration, and client information for each slow command. |
| 213 | |
| 214 | Use cases: |
| 215 | - Identify slow commands that may need optimization |
| 216 | - Analyze command patterns to detect performance hotspots |
| 217 | - Investigate client sources of slow commands |
| 218 | |
| 219 | Command text is truncated at 4096 characters for display purposes. |
| 220 | parameters: |
| 221 | - id: __sort |
| 222 | name: Filter By |
| 223 | description: Select the primary sort column. Options include duration, timestamp, ID, and command name. Defaults to duration to focus on slowest commands. |
| 224 | type: select |
| 225 | required: true |
| 226 | default: duration |
| 227 | options: [] |
| 228 | returns: |
| 229 | description: Slowlog entries with command timing and client metadata, providing insight into Redis performance patterns. Each row represents a single slow command execution that exceeded the configured threshold. |
| 230 | columns: |
| 231 | - name: ID |
| 232 | type: integer |
| 233 | unit: "" |
| 234 | visibility: hidden |
| 235 | description: Unique identifier for the slowlog entry. Allows tracking individual command executions. |
| 236 | - name: Timestamp |
| 237 | type: timestamp |
| 238 | unit: "" |
| 239 | description: Date and time when the slow command was executed. Useful for correlating slow commands with application events or system changes. |
| 240 | - name: Command |
| 241 | type: string |
| 242 | unit: "" |
| 243 | description: Full command text including all arguments. May contain sensitive data (keys, values) depending on application implementation. Truncated to 4096 characters. |
| 244 | - name: Command Name |
| 245 | type: string |
| 246 | unit: "" |
| 247 | description: The Redis command name (e.g., SET, GET, HGETALL, ZADD). Useful for grouping and analyzing slow commands by type. |
| 248 | - name: Duration |
| 249 | type: duration |
| 250 | unit: "milliseconds" |
| 251 | description: Execution time that exceeded the slowlog threshold. Higher values indicate slower commands that may need optimization or investigation. |
| 252 | - name: Client Address |
| 253 | type: string |
| 254 | unit: "" |
| 255 | visibility: hidden |
| 256 | description: IP address of the client that executed the slow command. Useful for identifying problematic clients or network segments. |
| 257 | - name: Client Name |
| 258 | type: string |
| 259 | unit: "" |
| 260 | visibility: hidden |
| 261 | description: Client identifier or name reported by Redis. Useful for identifying specific applications or services generating slow commands. |
| 262 | performance: | |
| 263 | Executes `SLOWLOG GET` command to retrieve entries from Redis memory:<br/>• Minimal overhead as SLOWLOG is stored in memory<br/>• Default limit of 500 entries balances completeness with performance<br/>• Large slowlogs with many entries may take slightly longer to transfer |
| 264 | security: | |
| 265 | Command arguments may contain unmasked literal values including potentially sensitive data:<br/>• Redis keys and values in command arguments<br/>• Application-specific identifiers or session tokens<br/>• Access should be restricted to authorized personnel only |
| 266 | availability: | |
| 267 | Available when:<br/>• The collector has successfully connected to Redis<br/>• SLOWLOG is enabled (`slowlog-log-slower-than` > 0)<br/>• Returns HTTP 503 if collector is still initializing<br/>• Returns HTTP 500 if the command fails<br/>• Returns HTTP 504 if the command times out |
| 268 | require_cloud: true |
| 269 | metrics: |
| 270 | folding: |
| 271 | title: Metrics |
| 272 | enabled: false |
| 273 | description: "" |
| 274 | availability: [] |
| 275 | scopes: |
| 276 | - name: global |
| 277 | description: These metrics refer to the entire monitored application. |
| 278 | labels: [] |
| 279 | metrics: |
| 280 | - name: redis.connections |
| 281 | description: Accepted and rejected (maxclients limit) connections |
| 282 | unit: connections/s |
| 283 | chart_type: line |
| 284 | dimensions: |
| 285 | - name: accepted |
| 286 | - name: rejected |
| 287 | - name: redis.clients |
| 288 | description: Clients |
| 289 | unit: clients |
| 290 | chart_type: line |
| 291 | dimensions: |
| 292 | - name: connected |
| 293 | - name: blocked |
| 294 | - name: tracking |
| 295 | - name: in_timeout_table |
| 296 | - name: redis.ping_latency |
| 297 | description: Ping latency |
| 298 | unit: seconds |
| 299 | chart_type: area |
| 300 | dimensions: |
| 301 | - name: min |
| 302 | - name: max |
| 303 | - name: avg |
| 304 | - name: redis.commands |
| 305 | description: Processed commands |
| 306 | unit: commands/s |
| 307 | chart_type: line |
| 308 | dimensions: |
| 309 | - name: processes |
| 310 | - name: redis.keyspace_lookup_hit_rate |
| 311 | description: Keys lookup hit rate |
| 312 | unit: percentage |
| 313 | chart_type: line |
| 314 | dimensions: |
| 315 | - name: lookup_hit_rate |
| 316 | - name: redis.memory |
| 317 | description: Memory usage |
| 318 | unit: bytes |
| 319 | chart_type: area |
| 320 | dimensions: |
| 321 | - name: max |
| 322 | - name: used |
| 323 | - name: rss |
| 324 | - name: peak |
| 325 | - name: dataset |
| 326 | - name: lua |
| 327 | - name: scripts |
| 328 | - name: redis.mem_fragmentation_ratio |
| 329 | description: Ratio between used_memory_rss and used_memory |
| 330 | unit: ratio |
| 331 | chart_type: line |
| 332 | dimensions: |
| 333 | - name: mem_fragmentation |
| 334 | - name: redis.key_eviction_events |
| 335 | description: Evicted keys due to maxmemory limit |
| 336 | unit: keys/s |
| 337 | chart_type: line |
| 338 | dimensions: |
| 339 | - name: evicted |
| 340 | - name: redis.net |
| 341 | description: Bandwidth |
| 342 | unit: kilobits/s |
| 343 | chart_type: area |
| 344 | dimensions: |
| 345 | - name: received |
| 346 | - name: sent |
| 347 | - name: redis.rdb_changes |
| 348 | description: Operations that produced changes since the last SAVE or BGSAVE |
| 349 | unit: operations |
| 350 | chart_type: line |
| 351 | dimensions: |
| 352 | - name: changes |
| 353 | - name: redis.bgsave_now |
| 354 | description: Duration of the on-going RDB save operation if any |
| 355 | unit: seconds |
| 356 | chart_type: line |
| 357 | dimensions: |
| 358 | - name: current_bgsave_time |
| 359 | - name: redis.bgsave_health |
| 360 | description: 'Status of the last RDB save operation (0: ok, 1: err)' |
| 361 | unit: status |
| 362 | chart_type: line |
| 363 | dimensions: |
| 364 | - name: last_bgsave |
| 365 | - name: redis.bgsave_last_rdb_save_since_time |
| 366 | description: Time elapsed since the last successful RDB save |
| 367 | unit: seconds |
| 368 | chart_type: line |
| 369 | dimensions: |
| 370 | - name: last_bgsave_time |
| 371 | - name: redis.aof_file_size |
| 372 | description: AOF file size |
| 373 | unit: bytes |
| 374 | chart_type: line |
| 375 | dimensions: |
| 376 | - name: current |
| 377 | - name: base |
| 378 | - name: redis.commands_calls |
| 379 | description: Calls per command |
| 380 | unit: calls |
| 381 | chart_type: stacked |
| 382 | dimensions: |
| 383 | - name: a dimension per command |
| 384 | - name: redis.commands_usec |
| 385 | description: Total CPU time consumed by the commands |
| 386 | unit: microseconds |
| 387 | chart_type: stacked |
| 388 | dimensions: |
| 389 | - name: a dimension per command |
| 390 | - name: redis.commands_usec_per_sec |
| 391 | description: Average CPU consumed per command execution |
| 392 | unit: microseconds/s |
| 393 | chart_type: stacked |
| 394 | dimensions: |
| 395 | - name: a dimension per command |
| 396 | - name: redis.key_expiration_events |
| 397 | description: Expired keys |
| 398 | unit: keys/s |
| 399 | chart_type: line |
| 400 | dimensions: |
| 401 | - name: expired |
| 402 | - name: redis.database_keys |
| 403 | description: Keys per database |
| 404 | unit: keys |
| 405 | chart_type: line |
| 406 | dimensions: |
| 407 | - name: a dimension per database |
| 408 | - name: redis.database_expires_keys |
| 409 | description: Keys with an expiration per database |
| 410 | unit: keys |
| 411 | chart_type: line |
| 412 | dimensions: |
| 413 | - name: a dimension per database |
| 414 | - name: redis.connected_replicas |
| 415 | description: Connected replicas |
| 416 | unit: replicas |
| 417 | chart_type: line |
| 418 | dimensions: |
| 419 | - name: connected |
| 420 | - name: redis.master_link_status |
| 421 | description: Master link status |
| 422 | unit: status |
| 423 | chart_type: line |
| 424 | dimensions: |
| 425 | - name: up |
| 426 | - name: down |
| 427 | - name: redis.master_last_io_since_time |
| 428 | description: Time elapsed since the last interaction with master |
| 429 | unit: seconds |
| 430 | chart_type: line |
| 431 | dimensions: |
| 432 | - name: time |
| 433 | - name: redis.master_link_down_since_time |
| 434 | description: Time elapsed since the link between master and slave is down |
| 435 | unit: seconds |
| 436 | chart_type: line |
| 437 | dimensions: |
| 438 | - name: time |
| 439 | - name: redis.uptime |
| 440 | description: Uptime |
| 441 | unit: seconds |
| 442 | chart_type: line |
| 443 | dimensions: |
| 444 | - name: uptime |