Redis

Metrics, Dashboards, Alerts and more for Redis Integration in Sysdig Monitor.
Redis

This integration is enabled by default.

Versions supported: > v2

This integration uses a standalone exporter that is available in UBI or scratch base image.

This integration has 34 metrics.

Timeseries generated: 150 series per instance

List of Alerts

AlertDescriptionFormat
[Redis] Low UpTimeUptime of less than 1 hour in a redis instancePrometheus
[Redis] High Memory UsageHigh memory usagePrometheus
[Redis] High Clients UsageHigh client connections usagePrometheus
[Redis] High Response TimeResponse time over 250msPrometheus
[Redis] High Fragmentation RatioHigh fragmentation ratioPrometheus
[Redis] High Keys Eviction RatioHigh keys eviction ratioPrometheus
[Redis] Recurrent Rejected ConnectionsRecurrent rejected connectionsPrometheus
[Redis] Low Hit RatioLow keyspace hit ratioPrometheus
[Redis] Exporter Process DownExporter proccess is not serving metricsPrometheus

List of Dashboards

Redis

The dashboard provides information on the status, error rate, latency, traffic and resource usage of a Redis instance. Redis

List of Metrics

Metric name
redis_blocked_clients
redis_commands_duration_seconds_total
redis_commands_processed_total
redis_commands_total
redis_config_maxclients
redis_connected_clients
redis_connected_slaves
redis_connections_received_total
redis_cpu_sys_children_seconds_total
redis_cpu_sys_seconds_total
redis_cpu_user_children_seconds_total
redis_cpu_user_seconds_total
redis_db_avg_ttl_seconds
redis_db_keys
redis_evicted_keys_total
redis_expired_keys_total
redis_keyspace_hits_total
redis_keyspace_misses_total
redis_mem_fragmentation_ratio
redis_memory_max_bytes
redis_memory_used_bytes
redis_memory_used_dataset_bytes
redis_memory_used_lua_bytes
redis_memory_used_overhead_bytes
redis_memory_used_scripts_bytes
redis_net_input_bytes_total
redis_net_output_bytes_total
redis_pubsub_channels
redis_pubsub_patterns
redis_rdb_changes_since_last_save
redis_rdb_last_save_timestamp_seconds
redis_rejected_connections_total
redis_slowlog_length
redis_uptime_in_seconds

Prerequisites

Basic Authentication

Follow these steps if your Redis server requires user and password authentication

1.- Create a user and password in your Redis instance for the exporter.

ACL SETUSER USERNAME +client +ping +info +config|get +cluster|info +slowlog +latency +memory +select +get +scan +xinfo +type +pfcount +strlen +llen +scard +zcard +hlen +xlen +eval allkeys on >PASSWORD

Replace USERNAME and PASSWORD with yours for the Redis instance.

2.- Create a secret with the user and password for the exporter. Keep the following in mind:

  • It has to be in the same namespace where the exporter will be deployed.
  • Use the same user name and password that you used for the api in the previous step.
  • You can change the name of the secret. If you do it, you will need to select it in the next steps of the integration.
kubectl create secret -n Your-Application-Namespace generic redis-exporter-auth \
  --from-literal=user=USER \
  --from-literal=password=PASSWORD

Replace USER and PASSWORD with yours for the Redis instance.

Installation

An automated wizard is present in the Monitoring Integrations in Sysdig Monitor. Expert users can also use the Helm chart for installation: https://github.com/sysdiglabs/integrations-charts/tree/main/charts/redis-exporter

Agent Configuration

The default agent job for this integration is as follows:

- job_name: redis-default
  tls_config:
    insecure_skip_verify: true
  kubernetes_sd_configs:
  - role: pod
  relabel_configs:
  - action: keep
    source_labels: [__meta_kubernetes_pod_host_ip]
    regex: __HOSTIPS__
  - action: keep
    source_labels:
    - __meta_kubernetes_pod_annotation_promcat_sysdig_com_integration_type
    regex: "redis"
  - source_labels: [__meta_kubernetes_pod_phase]
    action: keep
    regex: Running
  - action: replace
    source_labels: [__meta_kubernetes_pod_annotation_promcat_sysdig_com_target_ns]
    target_label: kube_namespace_name
  - action: replace
    source_labels: [__meta_kubernetes_pod_annotation_promcat_sysdig_com_target_workload_type]
    target_label: kube_workload_type
  - action: replace
    source_labels: [__meta_kubernetes_pod_annotation_promcat_sysdig_com_target_workload_name]
    target_label: kube_workload_name
  - action: replace
    replacement: true
    target_label: sysdig_omit_source
  - action: replace
    source_labels: [__address__, __meta_kubernetes_pod_annotation_promcat_sysdig_com_port]
    regex: ([^:]+)(?::\d+)?;(\d+)
    replacement: $1:$2
    target_label: __address__
  - action: replace
    source_labels: [__meta_kubernetes_pod_uid]
    target_label: sysdig_k8s_pod_uid
  - action: replace
    source_labels: [__meta_kubernetes_pod_container_name]
    target_label: sysdig_k8s_pod_container_name