Created
March 25, 2015 16:22
-
-
Save andrewhampton/e338d038c53fd9dac436 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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