Prometheus 2.20 gets better at service discovery, hits WAL by default

Monitoring system Prometheus has recently hit version 2.20, improving the CNCF project’s service discovery, query language, and user interface, amongst other things.

The main change the Prometheus team wanted to put front and centre was a new default in the system’s time series database (TSDB). Namely, compression of the write-ahead-log (WAL) is now standardly enabled.

Users who don’t care for that can go back to the old behaviour by setting the command line flag –no-storage.tsdb.wal-compression. They should be aware, however, that the compression “will prevent a downgrade to v2.10 or earlier without deleting the WAL”, according to the release notes.

Other enhancements to the TSDB include the incrementation of the WAL corruption metric on error during checkpointing, and some improvements to speed up queries. Meanwhile PromQL, the project’s query language, saw the introduction of the metric identifier without, a new aggregator called group, and some optimisations for regular expression label matching.

Service discovery (SD) was another major area of improvement, supplying most of v2.20’s new features. These include discovery for Docker Swarm and Digital Ocean, as well as a new configuration option for OpenStack, which is meant to provide a way of querying alternative endpoints. Teams using OpenStack SD should encounter less timeouts after the update, while those making use of EC2 can now access an AMI meta label.

The Prometheus UI got a couple of touch-ups, too, now displaying dates along timestamps on the status page, sporting more readable numbers in alerts, and no longer obscuring hash-fragment links with the navigation bar. Those more prone to employing the CLI will find that the Prometheus team has changed rule numbering from 0-based to 1-based when reporting rule errors, and added start and end flags to query labels in order to support inquiries for time ranges.

A complete list of changes, including a variety of TSDB bug fixes, can be found in the project’s repository.

Prometheus was initially developed at music streaming service SoundCloud in 2012, but was handed over to the Cloud Native Foundation in 2016 to underpin its vendor neutral stance. It was the second project to graduate the latter’s incubator in 2018 – just five months after Kubernetes.

Leave a Reply