Last active
June 21, 2017 11:17
-
-
Save calebhailey/8fed39a2eba3d230933f6d53de038f24 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
{ | |
"handlers": { | |
"example_handler": { | |
"type": "pipe", | |
"command": "notify_somebody.rb", | |
"timeout": 30, | |
"filter": "filter_weekly_maintenance" | |
} | |
} | |
} |
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
{ | |
"filters": { | |
"filter_july_29_maintenance": { | |
"negate": true, | |
"attributes": { | |
"timestamp": "eval: Time.new(2016,7,29,18,0,0,'-06:00') < value && value < Time.new(2016,7,30,6,0,0,'-06:00')", | |
"check": { | |
"name": "eval: ['check_foo','check_bar','check_baz'].include?(value)" | |
} | |
} | |
} | |
} | |
} |
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
{ | |
"filters": { | |
"filter_weekly_maintenance": { | |
"negate": true, | |
"attributes": { | |
"timestamp": "eval: (Time.at(value).wday == 5 && Time.at(value).hour > 18) || (Time.at(value).wday == 6 && Time.at(value).hour < 6)", | |
"check": { | |
"name": "eval: ['check_foo','check_bar','check_baz'].include?(value)" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you guys so much! This is exactly what I need until scheduled maintenance is available. 😄