RocksLabs / kvrocks_exporter

Prometheus Exporter for Kvrocks Metrics
MIT License
27 stars 16 forks source link

Fix keyspace infos parsing #25

Closed kinoute closed 5 months ago

kinoute commented 5 months ago

We were wondering why, after running dbsize scan properly, our Grafana dashboard were still showing nothing for the estimated keys.

parseDBKeyspaceString receives two arguments:

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

git-hulk commented 5 months ago

@kinoute Thank you!