Skip to content

Instantly share code, notes, and snippets.

@jjbuchan
Created October 20, 2014 16:38
Show Gist options
  • Select an option

  • Save jjbuchan/f7b009b47243efba9939 to your computer and use it in GitHub Desktop.

Select an option

Save jjbuchan/f7b009b47243efba9939 to your computer and use it in GitHub Desktop.
if (metric['body_match'] == '') {
return new AlarmStatus(CRITICAL, 'URL response did not contain the correct content.');
}
if (metric['code'] != '200') {
return new AlarmStatus(CRITICAL, 'URL returned a #{code} code. Expected to receive a 200.');
}
return new AlarmStatus(OK, 'URL responds as expected.');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment