title: Consul watch with critical consul checks
body: <p>So I have a consul check that watches over a container and is designed to go critical when the container is stopped.  I want to create a consul watch that will run a script after the check has gone critical, or after several critical responses (for example if my check sends 5 critical responses I want it to run a script).  </p>
  
  <p>Here is the json for my working check and my guess as to what I my watch might look like:</p>
  
  <pre><code>{
  
   // this check works
   "checks": [
      {
          "id": "docker_stuff",
          "name": "curl test",
          "notes": "curls the docker container",
          "script": "/scripts/docker.py",
          "interval": "1s"
      }
   ],
  
   //this watch doesn't work
   "watches": [
      {
          "Node": "client2",
          "CheckID": "docker-stuff",
          "Name": "docker-stuff-watch",
          "Status": "critical",
          "Status_amt": "5",
          "handler": "/scripts/new-docker.sh",
          "Output": "container relaunched",
      }
   ]
  
  }
  </code></pre>
  
  <p>What do I need to change in my watch to get it working?  </p>
  
  <p>Would I also need to use a consul event to watch my health check and then trigger a consul watch (of the event type) that runs my <code>/scripts/new-docker.sh</code> script?  If so then how would I make a consul event that watches over my health check?  For example if this was my consul check, watch and event, what would I need to change to get this working?</p>
  
  <pre><code>{
   "checks": [
      {
          "id": "docker_stuff",
          "name": "curl test",
          "notes": "curls the docker container",
          "script": "/scripts/docker.py",
          "interval": "1s"
      }
   ],
   "watches": [
      {     
          "type": "event", 
          "name": "docker-stuff-watch",
          "handler": "/scripts/new-docker.sh"
      }
   ],
   "events": [
      {
          "Node": "client2",
          "CheckID": "docker-stuff",
          "Name": "docker-stuff-event",
          "Status": "critical",
          "Status_amt": "5",
          "Output": "container relaunched",
      }
   ]
  }
  </code></pre>