loggerLevel: info

urlMonitor:
  timeout: 4000 # HTTP connection timeout after 8 seconds
  interval: 45000 # perform check status of each URL every 45 seconds
  services:
    hn: https://news.ycombinator.com # compact notation for URL only
    endpoint1: # extended notation
      url: http://myserver1.com/endpoint1
      label: endpoint1 on myserver1
    endpoint2:
      url: http://myserver2.com/endpoint2
      # note that a label determined from URL by default

htmlMonitor:
   class: HtmlMonitor
   loggerLevel: debug
   scheduledTimeout: 2000 # initial check after 2 seconds
   scheduledInterval: 45000 # check every 45 seconds
   regex:
     description: <meta name="description" content="(.*)">
   services:
      google:
         url: http://www.google.com
         content:
            title: "Google"
            description: "Google"
      guardian-share:  # test facebook share
         url: http://www.theguardian.com/world/2014/apr/11/journalists-nsa-guardian-polk-award-snowden
         headers:
            User-Agent: facebookexternalhit
         content:
            title: "Journalists who broke NSA story in Guardian dedicate award to Snowden"
      devsite: # ensure 403 (Access Prohibited) to Googlebot
         url: http://dev.mysite.com
         headers:
            User-Agent: Googlebot
         statusCode: 403

jsonMonitor:
   class: JsonMonitor
   loggerLevel: debug
   scheduledTimeout: 2000 # initial check after 2 seconds
   scheduledInterval: 45000 # check every 45 seconds
   services:
      hn-api:
         url: https://hacker-news.firebaseio.com/v0/item/160705.json?print=pretty
         required:
            id: integer
            time: integer
            type: string

expressServer: # for debugging and monitoring by peers
  location: /chronica
  port: 8882
  publishLoggers: [info, warn, error]

alerter:
   elapsedThreshold: 600000 # suppress alerts for 10 minutes (self or peer)
   peers: # suppress alert if any peer alerted in past 10 minutes
   mypeer1:
      url: http://chronica.mypeer1.com/chronica

slackMessenger:
   bots: # see: https://api.slack.com/slackbot
   - url: https://<ACCOUNT>.slack.com/services/hooks/slackbot?token=<TOKEN>&channel=%23<CHANNEL>

emailMessenger: # uses node-mailer which works out the box for @gmail.com and @googlegroups.com
   fromEmail: chronica-alerts@my.com
   admins: # email recipients for alerts
   - email: me@my.com
   - email: other@my.com

tracker: # tracks the status and decides if and when the send an email alert
   debounceCount: 2 # status must stay changed during multiple iterations before alert

reporter:
   helloDelay: 16000 # send an email 16 seconds after starting
   daily: # send a daily digest of current status of all services
      hour: 16 # 16:10 (pm)
      minute: 10
   hourly:
      hours: [8, 12, 16, 20]
      minute: 45 # hourly report at 45th minute of every hour
