{
  consul: 'localhost:8500',
  jobs: [
    {
      name: '{{.SENSOR_TYPE}}',
      exec: 'node /opt/app/',
      restarts: 'unlimited',
      health: {
        exec: 'pgrep node',
        interval: 10,
        ttl: 20
      }
    },
    {
      name: 'consul-agent',
      exec: ['/usr/local/bin/consul', 'agent',
                  '-data-dir=/data',
                  '-config-dir=/config',
                  '-log-level=err',
                  '-rejoin',
                  '-retry-join', '{{ .CONSUL | default "consul" }}',
                  '-retry-max', '10',
                  '-retry-interval', '10s'],
      restarts: 'unlimited'
    },
    {
      name: 'onchange-serializer',
      exec: 'pkill -SIGHUP node',
      when: {
        source: 'watch.serializer',
        each: 'changed'
      }
    },
    {
      name: 'onchange-nats',
      exec: 'pkill -SIGHUP node',
      when: {
        source: 'watch.nats',
        each: 'changed'
      }
    }
  ],
  telemetry: {
    port: 9090,
    interfaces: ['eth1', 'eth0', 'eth0[1]', 'lo', 'lo0', 'inet']
  },
  watches: [
    {
      name: 'serializer',
      interval: 1
    },
    {
      name: 'nats',
      interval: 3
    }
  ]
}
