← All Modules

assay.alertmanager

Alertmanager alert and silence management. Query, create, and delete alerts and silences. Client: alertmanager.client(url).

Example:

local am = require("assay.alertmanager")
local c = am.client("http://alertmanager:9093")
local firing = c.alerts:is_firing("HighCPU")
if firing then
  c.silences:silence_alert("HighCPU", 2, {comment = "Investigating"})
end