Prometheus 许可证过期监控

Prometheus licenses expiration monitoring

有一种方法可以添加一个文本文件,其中包含 Prometheus windows 出口商监控的许可证日期。(如果程序许可证将在 10 天后到期,则与警报管理器一起使用以接收警报例子)。 所以我基本上会有这个 license_example.txt 与: “” Visual studio 代码:22-01-2024 Windows 出口商:25-02-2025 “” 他可以接收文件输入吗?如果是的话,它们必须是什么格式,以便识别日期等。

感谢您的帮助和阅读所有这些内容。

是的,实际上是 enabled by default. Put *.prom files in this path C:\Program Files\windows_exporter\textfile_inputs and fill them according to the prometheus metrics exporter documentation. I'd suggest to use a Gauge metric with the remaining days until license expiration and a script to update the *.prom files regularly. See a sample of the required format here