Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Service Management Commands

Configure and manage internal Redis Enterprise services.

Overview

Service commands provide control over Redis Enterprise's internal services including the cluster manager, proxy, statistics collector, and other system components.

Available Commands

List Services

redisctl enterprise services list

Shows all available services and their current status.

Get Service Configuration

redisctl enterprise services get <service_name>

Retrieves configuration for a specific service.

Update Service Configuration

redisctl enterprise services update <service_name> --data '{
  "enabled": true,
  "port": 8080,
  "log_level": "info"
}'

Restart Service

redisctl enterprise services restart <service_name>

Restarts a specific service across the cluster.

Get Service Status

redisctl enterprise services status <service_name>

Shows detailed status information for a service.

Enable Service

redisctl enterprise services enable <service_name>

Enables a previously disabled service.

Disable Service

redisctl enterprise services disable <service_name>

Disables a service (use with caution).

Common Services

ServiceDescriptionCritical
cm_serverCluster Manager ServerYes
crdb_coordinatorActive-Active CoordinatorFor CRDB
crdb_workerActive-Active WorkerFor CRDB
mdns_serverMulticast DNS ServerNo
pdns_serverPowerDNS ServerYes
saslauthdSASL AuthenticationFor LDAP
stats_archiverStatistics ArchiverNo
cnm_httpCluster Node ManagerYes
cnm_httpsSecure CNMYes

Common Use Cases

Checking Service Health

# List all services with status
redisctl enterprise services list -o table

# Check specific critical service
redisctl enterprise services status cm_server

# Get services in JSON for monitoring
redisctl enterprise services list -o json | jq '.[] | select(.status != "running")'

Troubleshooting Service Issues

# 1. Check service status
redisctl enterprise services status pdns_server

# 2. Review service configuration
redisctl enterprise services get pdns_server

# 3. Restart if needed
redisctl enterprise services restart pdns_server

# 4. Verify after restart
sleep 10
redisctl enterprise services status pdns_server

Managing Statistics Collection

# Check stats archiver
redisctl enterprise services get stats_archiver

# Adjust retention settings
redisctl enterprise services update stats_archiver --data '{
  "retention_days": 30,
  "collection_interval": 60
}'

# Restart to apply changes
redisctl enterprise services restart stats_archiver

LDAP Service Management

# Enable SASL for LDAP authentication
redisctl enterprise services enable saslauthd

# Configure SASL service
redisctl enterprise services update saslauthd --data '{
  "mechanisms": ["ldap"],
  "ldap_servers": "ldap://ldap.company.com",
  "ldap_search_base": "dc=company,dc=com"
}'

# Restart SASL service
redisctl enterprise services restart saslauthd

Service Configuration Examples

Cluster Manager Configuration

{
  "enabled": true,
  "port": 9443,
  "bind_address": "0.0.0.0",
  "log_level": "info",
  "max_connections": 1000,
  "timeout": 30
}

DNS Service Configuration

{
  "enabled": true,
  "port": 53,
  "cache_size": 10000,
  "negative_ttl": 60,
  "query_timeout": 2,
  "recursion": false
}

Monitoring Scripts

Service Health Check

#!/bin/bash
# Monitor critical services

CRITICAL_SERVICES="cm_server pdns_server cnm_https"

for service in $CRITICAL_SERVICES; do
  STATUS=$(redisctl enterprise services status $service -q 'status')
  if [[ "$STATUS" != "running" ]]; then
    echo "ALERT: Service $service is $STATUS"
    # Send notification
  fi
done

Service Performance Monitoring

# Track service resource usage
redisctl enterprise services list -o json | jq -r '.[] | 
  "\(.name): CPU=\(.cpu_usage)% MEM=\(.memory_mb)MB"'

Safety Considerations

Critical Services

Never disable these services:

  • cm_server - Cluster manager
  • cnm_http/https - Node management
  • pdns_server - DNS resolution

Pre-Restart Checks

# Before restarting a service
# 1. Check cluster health
redisctl enterprise cluster status

# 2. Verify no ongoing operations
redisctl enterprise action list

# 3. Consider maintenance window
echo "Current load:"
redisctl enterprise stats cluster -q 'operations_per_second'

Service Dependencies

Some services depend on others:

  • saslauthd requires LDAP configuration
  • crdb_* services require Active-Active setup
  • stats_archiver requires sufficient disk space

Troubleshooting

Service Won't Start

# Check logs
redisctl enterprise logs list --filter "service_name=$SERVICE"

# Verify configuration
redisctl enterprise services get $SERVICE

# Check system resources
df -h  # Disk space
free -m  # Memory

Service Consuming High Resources

# Get detailed status
redisctl enterprise services status $SERVICE -o json

# Check configuration limits
redisctl enterprise services get $SERVICE -q 'resource_limits'

# Adjust if needed
redisctl enterprise services update $SERVICE --data '{
  "max_memory": "2G",
  "max_cpu": 2
}'

Output Examples

Service List Output

[
  {
    "name": "cm_server",
    "status": "running",
    "enabled": true,
    "pid": 1234,
    "uptime": "7d 2h 15m",
    "cpu_usage": 2.5,
    "memory_mb": 512
  },
  {
    "name": "pdns_server",
    "status": "running",
    "enabled": true,
    "pid": 1235,
    "uptime": "7d 2h 15m",
    "cpu_usage": 0.5,
    "memory_mb": 128
  }
]

Service Status Output

{
  "name": "cm_server",
  "status": "running",
  "enabled": true,
  "configuration": {
    "port": 9443,
    "log_level": "info"
  },
  "statistics": {
    "requests_processed": 1000000,
    "errors": 0,
    "average_response_ms": 50
  },
  "health": {
    "status": "healthy",
    "last_check": "2025-09-15T10:30:00Z"
  }
}