Last active
July 15, 2016 15:54
-
-
Save wolfdancer/ddca9340f1451481ad5af551d5e00b42 to your computer and use it in GitHub Desktop.
Rackspace Montiornig HTTP Configuration
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: ZNC Bouncer Web | |
disabled: false | |
period: 60 | |
timeout: 30 | |
target_hostname: irc.duan.io | |
target_resolver: IPv4 | |
details: | |
method: GET | |
url: https://irc.duan.io | |
body: ZNC | |
monitoring_zones_poll: | |
- mzdfw | |
- mziad | |
- mzord | |
metadata: | |
url: https://intelligence.rackspace.com/cloud/entities/en8bVrlMva/checks/chO4OIO8BC | |
alarms: | |
connection-time: | |
label: Connection Time | |
notification_plan_id: npOBd2IcIW | |
criteria: | | |
:set consecutiveCount=1 | |
:set consistencyLevel=QUORUM | |
return new AlarmStatus(CRITICAL, 'HTTP request took more than 20000 milliseconds.'); | |
} | |
if (metric['duration'] > 10000) { | |
return new AlarmStatus(WARNING, 'HTTP request took more than 10000 milliseconds.'); | |
} | |
return new AlarmStatus(OK, 'HTTP connection time is normal'); | |
metadata: | |
url: https://intelligence.rackspace.com/cloud/entities/en8bVrlMva/checks/chO4OIO8BC | |
ci_alarm_info: '{ "count":1, "level":"QUORUM", "id":"remote.http_connection_time", "fields":[ { "name":"warning_threshold", "model":10000 }, { "name":"critical_threshold", "model":20000 } ] }' | |
ssl-cert: | |
label: SSL certificate expiration time | |
notification_plan_id: npOBd2IcIW | |
criteria: | | |
if (metric['cert_end_in'] < 604800) { | |
return new AlarmStatus(CRITICAL, 'Cert expiring in less than 604800 seconds: #{cert_end_in}'); | |
} | |
if (metric['cert_end_in'] < 2628288) { | |
return new AlarmStatus(WARNING, 'Cert expiring in less than 2628288 seconds: #{cert_end_in}'); | |
} | |
return new AlarmStatus(OK, 'HTTP certificate doesn\'t expire soon: #{cert_end_in}'); | |
status-code: | |
label: Status Code | |
notification_plan_id: npOBd2IcIW | |
criteria: | | |
if (metric['code'] regex '4[0-9][0-9]') { | |
return new AlarmStatus(CRITICAL, 'HTTP server responding with 4xx status'); | |
} | |
if (metric['code'] regex '5[0-9][0-9]') { | |
return new AlarmStatus(CRITICAL, 'HTTP server responding with 5xx status'); | |
} | |
return new AlarmStatus(OK, 'HTTP server is functioning normally'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment