We were wondering why, after running dbsize scan properly, our Grafana dashboard were still showing nothing for the estimated keys.
parseDBKeyspaceString receives two arguments:
inputKey which should be the database/namespace
inputVal which should be the keyspace numbers as string
Right now, the split length condition returns nothing if there are not four elements after the split on inputVal. But the inputVal data doesn't contain the database name, it is in inputKey, therefore we should look for three elements, not four.
As the code says, a valid example is:
db0:keys=1,expires=0,avg_ttl=0
inputKey is db0
inputVal is keys=1,expires=0,avg_ttl=0 (three elements, not four when splitted by comma)
We were wondering why, after running
dbsize scan
properly, our Grafana dashboard were still showing nothing for the estimated keys.parseDBKeyspaceString
receives two arguments:inputKey
which should be the database/namespaceinputVal
which should be the keyspace numbers as stringRight now, the split length condition returns nothing if there are not four elements after the split on
inputVal
. But theinputVal
data doesn't contain the database name, it is ininputKey
, therefore we should look for three elements, not four.As the code says, a valid example is:
inputKey
isdb0
inputVal
iskeys=1,expires=0,avg_ttl=0
(three elements, not four when splitted by comma)