Prometheus 2.21 emerges with improved service discovery

Prometheus 2.21 emerges with improved service discovery

Monitoring system Prometheus 2.21 is now available for download, providing users with upgraded service discovery, some UI enhancements, and bugfixes for a couple of PromQL and rule issues.

In the three months since the last minor release, the Prometheus team has continued to polish the tool’s new user interface, adding durations, labels, and annotations to the alerts page, and making sure the rules site of the React UI hides those fields when empty. Most of the other enhancements focus on service discovery, however. 

Amongst other things, Prometheus is now able to detect Eureka and Hetzner services, and an addition to the Kubernetes SD unit helps the system to work with endpoint slices. The latter allows users to bundle endpoints, which can come in handy for Prometheus in cases where single entities in large deployments get updated, since it reduces the amount of transferred data.

Other than that, DNS service discovery now includes meta labels for SRV record target and ports, and Docker Swarm SD has learned to support tasks and services without published ports. The team also taught the UI, the system’s querying language PromQL, and the config, to handle composite durations such as 1h10m, and reduced the amount of data queried by PromQL remote reads for subqueries containing an offset.

Since the enabling of HTTP/2 earlier this year, some users ran into some federation issues, which is probably down to problems in the HTTP/2 client in Go 1.15. A fix has already been offered to the language developers, but since it didn’t find its way into the latest release yet, HTTP/2 has been disabled again in Prometheus for the time being. 

Users should also be aware that the query_log_file path in PromQL is now relative to the config file, while the tsdb command line tool in Promtool has been replaced by a  promtool tsdb subcommand. The full list of changes is available via the project’s release notes.

Prometheus was developed at music streaming service SoundCloud in 2012 and has since become part of the Cloud Native Computing Foundation. The organisation, which is part of the Linux Foundation, just recently committed to pushing two additional Prometheus-related projects forward, by promoting Thanos and Cortex into its incubator. 

Both projects are developed by members of the Prometheus team and aim at providing components for building metric systems with “unlimited storage capacity” and scalable, long-term storage respectively.