Coroot enriches each Redis database with an overview dashboard based on metrics gathered by
redis_exporter.
Redis Helm charts by Bitnami
If you deploy your Redis databases using Helm charts by Bitnami, you can easily enable the exporter by setting metrics.enable=true.
helm upgrade --install rdb --set "metrics.enabled=true" oci://registry-1.docker.io/bitnamicharts/redis
Kubernetes
Here is an example Kubernetes deployment configuration for how to deploy redis_exporter as a sidecar to a Redis instance:
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9121"
labels:
app: redis
spec:
containers:
- name: redis
image: redis:4
ports:
- containerPort: 6379
name: redis
- name: exporter
image: oliver006/redis_exporter:latest
ports:
- containerPort: 9121
name: exporter
If you use Prometheus Operator,
you will also need to create a PodMonitor:
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: redis-exporter
spec:
selector:
matchLabels:
app: redis
podMetricsEndpoints:
- port: exporter
Make sure the PodMonitor matches podMonitorSelector defined in your Prometheus:
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
...
spec:
...
podMonitorNamespaceSelector: {}
podMonitorSelector: {}
...
The special value {} allows Prometheus to watch all the PodMonitors from all namespaces.
Docker
docker run -d --name redis_exporter -p 9121:9121 -e REDIS_ADDR=redis://172.17.0.4:6379 oliver006/redis_exporter