Created
March 20, 2013 13:47
-
-
Save itsderek23/5204746 to your computer and use it in GitHub Desktop.
Scout Plugin that runs at a custom interval
This file contains hidden or 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
class CustomInterval < Scout::Plugin | |
def build_report | |
interval = 15*60 # 15 minute interval | |
if @last_run.nil? or Time.now > @last_run + interval | |
# it's time to report | |
report(:metric => rand) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment