Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Redis Stats

Demis Bellot edited this page Sep 2, 2015 · 1 revision

The RedisStats class provides better visibility and introspection into your running instances:

TotalCommandsSent Total number of commands sent
TotalFailovers Number of times the Redis Client Managers have FailoverTo() either by sentinel or manually
TotalDeactivatedClients Number of times a Client was deactivated from the pool, either by FailoverTo() or exceptions on client
TotalFailedSentinelWorkers Number of times connecting to a Sentinel has failed
TotalForcedMasterFailovers Number of times we've forced Sentinel to failover to another master due to consecutive errors
TotalInvalidMasters Number of times a connecting to a reported Master wasn't actually a Master
TotalNoMastersFound Number of times no Masters could be found in any of the configured hosts
TotalClientsCreated Number of Redis Client instances created with RedisConfig.ClientFactory
TotalClientsCreatedOutsidePool Number of times a Redis Client was created outside of pool, either due to overflow or reserved slot was overridden
TotalSubjectiveServersDown Number of times Redis Sentinel reported a Subjective Down (sdown)
TotalObjectiveServersDown Number of times Redis Sentinel reported an Objective Down (odown)
TotalRetryCount Number of times a Redis Request was retried due to Socket or Retryable exception
TotalRetrySuccess Number of times a Request succeeded after it was retried
TotalRetryTimedout Number of times a Retry Request failed after exceeding RetryTimeout
TotalPendingDeactivatedClients Total number of deactivated clients that are pending being disposed

You can get and print a dump of all the stats at anytime with:

RedisStats.ToDictionary().PrintDump();

And Reset all Stats back to 0 with RedisStats.Reset().