This tool does the simple job of checking a Prometheus rule file for validity
and printing the parsed rules if the loading succeeds. This came out of
an immediate need to quickly verify changes to existing rule files.
An design question was open for me in the beginning was whether to
serialize other types to disk, but Protocol Buffers quickly won out,
which allows us to drop support for other types. This is a good
start to cleaning up a lot of cruft in the storage stack and
can let us eventually decouple the various moving parts into
separate subsystems for easier reasoning.
This commit is not strictly required, but it is a start to making
the rest a lot more enjoyable to interact with.
This very simple tool dumps all samples in a LevelDB metrics storage
together with their chunk information. This is very crude for now - I
just whipped it up because I needed to debug something. We should add
printf-style formatting support for it in the future to indicate what
information to output for each sample in the database. We could also
support inspecting the index databases.
This commit simplifies the way that compactions across a database's
keyspace occur due to reading the LevelDB internals. Secondarily it
introduces the database size estimation mechanisms.