有没有办法在 IIS 站点使用 Prometheus 出现故障时发出警报?

Is there a way to produce an alert when an IIS site goes down using Prometheus?

我想使用 Prometheus 监控一些 IIS 站点。专门监视和警告中断。当站点遇到中断时,我无法弄清楚如何获取指标。理想情况下,我希望当站点出现故障时能够提供该信息,将指标抓取到 Prometheus,然后使用 Prometheus Alertsmanager 将其发送到我们的 Slack webhook。我知道有专门用于此的工具,例如 Pingdom、Uptime Robot、StatusCake,但如果我可以使用我们已经在使用的 Prometheus 来做到这一点,那就更好了。

我目前是 运行 WMI Exporter 以获取指标。

我相信您对 blackbox-exporter(参见 https://github.com/prometheus/blackbox_exporter)感兴趣以通过 HTTP 请求监视目标。

安装导出器并配置目标后,您将对 probe_success 指标的警报感兴趣。

只能使用 windows_exporter 来完成。您应该将 W3SVC 添加为要监视的服务。希望这对您有所帮助!