CONFIG GET
CONFIG GET parameter [parameter ...]
- Group
- Server
- Complexity
- O(N) where N is the number of settings
- Arity
- -3 (at least 3 words, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
CONFIG GET returns the current value of the settings you ask for. Each
parameter is either a setting name or a glob-style pattern (*, ? and
[...]), matched case-insensitively. Older names that Redis still accepts
work too, for example slave-read-only for replica-read-only or
hash-max-ziplist-entries for hash-max-listpack-entries.
A setting asked for by its exact name is returned under the name as you typed it. One matched by a pattern is returned under its own name. Each setting appears at most once, even if several parameters match it.
Secrets are never returned: requirepass, masterauth, tls-key-file-pass
and tls-client-key-file-pass read (hidden) when set, and an empty string
when not. Memory sizes are returned in bytes.
Return value
Section titled “Return value”The settings and their values: a map in RESP3, a flat array of name and value pairs in RESP2. Names that match nothing are left out, so the reply can be empty.
A call without any parameter gets
ERR wrong number of arguments for 'config|get' command.
Examples
Section titled “Examples”127.0.0.1:6379> CONFIG GET maxmemory*1) "maxmemory"2) "0"3) "maxmemory-policy"4) "noeviction"5) "maxmemory-samples"6) "5"127.0.0.1:6379> CONFIG GET appendonly appendfsync1) "appendonly"2) "no"3) "appendfsync"4) "everysec"127.0.0.1:6379> CONFIG GET requirepass1) "requirepass"2) "(hidden)"Compatibility
Section titled “Compatibility”Same reply shapes and pattern rules as Redis 7 and Valkey 8, with two
differences: passwords read (hidden) instead of their value, and only the
settings HotKV implements are listed. Settings that exist only in a HotKV
configuration file section (such as replication settings) are
not returned by CONFIG GET.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.