Skip to content

Instantly share code, notes, and snippets.

@andrewhampton
Created March 25, 2015 16:22
Show Gist options
  • Save andrewhampton/e338d038c53fd9dac436 to your computer and use it in GitHub Desktop.
Save andrewhampton/e338d038c53fd9dac436 to your computer and use it in GitHub Desktop.
local os = require "os"
local alert = require "alert"
alert.set_throttle(60 * 1e9)
local host1 = "box1"
local host2 = "box2"
while true do
local current_time = os.time() * 1e9
if not alert.throttled(current_time, host1) then
alert.send(current_time, host1, "host1 alert")
end
if not alert.throttled(current_time, host2) then
alert.send(current_time, host2, "host2 alert")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment