如何使用 curl 查找 Prometheus 最新版本?

How to find Prometheus latest version with curl?


我需要使用 cURL http 请求收集 Prometheus 的最新版本。到目前为止,我可以看到 Prometheus 版本发布在 https://github.com/prometheus/prometheus/releases/ 下。但是,这需要以某种方式解析整个 HTML 页面才能找到它。 有没有更直接的方式获取最新版本的Prometheus? 谢谢

您可以使用

https://github.com/prometheus/prometheus/releases/latest

/latest 会将您重定向到标记为最新的版本