Created
July 6, 2016 18:29
-
-
Save joeashcraft/28269589c179649ae740664156cd5696 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
type : remote.http | |
label : HTTP WAN-IP example.com | |
disabled : false | |
period : 60 | |
timeout : 30 | |
target_alias : access_ip1_v4 | |
monitoring_zones_poll : [ mzdfw, mziad, mzord, mzlon ] | |
details : | |
url : "http://example.com" | |
alarms : | |
alarm1 : | |
label : Connection Time | |
notification_plan_id : npManaged | |
criteria : | | |
if (metric['duration'] > 25000) { | |
return new AlarmStatus(CRITICAL, 'HTTP request took more than 25 seconds: #{duration} milliseconds'); | |
} | |
if (metric['duration'] > 20000) { | |
return new AlarmStatus(WARNING, 'HTTP request took more than 20 seconds: #{duration} milliseconds'); | |
} | |
return new AlarmStatus(OK, 'HTTP connection time is normal: #{duration} milliseconds'); | |
alarm2 : | |
label : Status Code | |
notification_plan_id : npManaged | |
criteria : | | |
if (metric['code'] regex '[45][0-9][0-9]') { | |
return new AlarmStatus(CRITICAL, 'HTTP server responding with status code #{code}'); | |
} | |
return new AlarmStatus(OK, 'HTTP server is functioning normally, returned #{code} status'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment