sensu/sensu — pull request #820 by tatarmihai (2014-11-21 19:31:10+00:00)
Title: Provides sensu agents, which can perform some (or all) of the checks on ...

...behalf of the represented client.

Agents can represent before the server hosts on which the client cannot be installed. They cand send keepalive in the name of their clients and, from the server's perspective, behave exactly like a sensu client. Client representation can be full or just partial, for a set of checks, depending on the needs.
Represented hosts can be statically specified in the configuration, discovered using a script or (TODO) looked-up against the sensu infrastructure (Redis or API).

This commit does NOT provide any specs (will be provided in future commits, as time allows).

Supporting commits: https://github.com/sensu/sensu-settings/pull/4, https://github.com/sensu/sensu-plugin/pull/79

Example configuration:

```json
"agents": {
"static": {
"name": "static-agent-name",
"address": "static.agent.address",
"represents": {
"name": "represented-host-name",
"address": "represented.host.address"
},
"subscriptions": [ "static-agent" ],
"keepalive": {
"thresholds": {
"warning": 120,
"critical": 180
},
"handler": "keepalive"
},
"custom": "value"
},
"discovered": {
"name": "discovering-agent-name",
"address": "discovering.agent.address",
"discovery": {
"command": "cat /discovered/hosts",
"interval": 20,
"timeout": 60
},
"subscriptions": [ "discovering-agent" ],
"keepalive": {
"thresholds": {
"warning": 120,
"critical": 180
},
"handler": "keepalive"
},
"another": "custom value"
},
"lookup": {
"name": "lookup-agent-name",
"address": "lookup.agent.address",
"represents": {
"match": "^look(ed)? up host(s)?$"
},
"subscriptions": [ "lookup-agent" ],
"yet": "another custom vallue"
},
"socket": {
"bind": "120.0.0.1",
"port": "3031"
}
}
```