Permalink
Browse files

Tabs to spaces

  • Loading branch information...
1 parent 76c975d commit baf5db88b7154d9d41587166fd09a4162f28f295 Matt Wright committed Apr 3, 2012
Showing with 29 additions and 29 deletions.
  1. +29 −29 scripts/monitor.py
View
@@ -3,36 +3,36 @@
from daemonwatch import *
def run_monitor(url=None):
-
- Monitor(
- Service(
- name="cbu-ensure-up",
- monitor=(
- HTTP(
- GET=url,
- freq=Time.ms(5000),
- fail=[
- Incident(
- errors=1,
- during=Time.s(5),
- actions=[
- Print("%s experienced an error")
- ]
- ),
- Incident(
- errors=2,
- during=Time.s(10),
- actions=[
- Print("%s experienced 2 errors within 10 seconds")
- ]
- )
- ]
- )
- )
- )
- ).run()
+
+ Monitor(
+ Service(
+ name="cbu-ensure-up",
+ monitor=(
+ HTTP(
+ GET=url,
+ freq=Time.ms(5000),
+ fail=[
+ Incident(
+ errors=1,
+ during=Time.s(5),
+ actions=[
+ Print("%s experienced an error")
+ ]
+ ),
+ Incident(
+ errors=2,
+ during=Time.s(10),
+ actions=[
+ Print("%s experienced 2 errors within 10 seconds")
+ ]
+ )
+ ]
+ )
+ )
+ )
+ ).run()
if len(sys.argv) == 1:
- sys.exit("Please specify a URL (be sure to include a trailing slash): python monitor.py http://yourhost/")
+ sys.exit("Please specify a URL (be sure to include a trailing slash): python monitor.py http://yourhost/")
run_monitor(sys.argv[1])

0 comments on commit baf5db8

Please sign in to comment.