Unverified Commit a698a639 authored by Oran Agra's avatar Oran Agra Committed by GitHub
Browse files

Add maxclients and cluster_connections to INFO CLIENTS (#7979)

Few config settings are also reflected by the INFO command.
these are mainly ones that are important for either an instant view of
the server status (to compare a metric to it's limit config),
Important configurations that are necessary in the crash log (which
currently doesn't print the config),
And things that are important for monitoring solutions (such as
Prometheus), which rely on INFO to collect their data.

Add cluster_connections to INFO CLUSTER:
This makes it possible to be combined together with connected_clients
and connected_slaves and be matched against maxclients
parent 89c78a98
...@@ -4295,12 +4295,16 @@ sds genRedisInfoString(const char *section) { ...@@ -4295,12 +4295,16 @@ sds genRedisInfoString(const char *section) {
info = sdscatprintf(info, info = sdscatprintf(info,
"# Clients\r\n" "# Clients\r\n"
"connected_clients:%lu\r\n" "connected_clients:%lu\r\n"
"cluster_connections:%lu\r\n"
"maxclients:%u\r\n"
"client_recent_max_input_buffer:%zu\r\n" "client_recent_max_input_buffer:%zu\r\n"
"client_recent_max_output_buffer:%zu\r\n" "client_recent_max_output_buffer:%zu\r\n"
"blocked_clients:%d\r\n" "blocked_clients:%d\r\n"
"tracking_clients:%d\r\n" "tracking_clients:%d\r\n"
"clients_in_timeout_table:%llu\r\n", "clients_in_timeout_table:%llu\r\n",
listLength(server.clients)-listLength(server.slaves), listLength(server.clients)-listLength(server.slaves),
getClusterConnectionsCount(),
server.maxclients,
maxin, maxout, maxin, maxout,
server.blocked_clients, server.blocked_clients,
server.tracking_clients, server.tracking_clients,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment