yaoweibin/nginx_upstream_check_module — pull request #25 by dkerwin (2013-10-24 16:02:18+00:00)
Title: JSON status to simplify automatic monitoring

Hi,

we modified the the status resource to return json instead of a HTML table. This can be used to simplify monitoring. Example output looks like this:

```
{
upstream_servers: 4,
generation: 1,
peers: [
{
upstream: "example-api.com",
member: "192.168.1.1:80",
status: "up",
rise_count: 8,
fall_count: 0,
check_type: "http"
},
{
upstream: "www.example-app.com",
member: "192.168.1.2:80",
status: "up",
rise_count: 8,
fall_count: 0,
check_type: "http"
},
{
upstream: "www.company.com",
member: "192.168.1.3:80",
status: "up",
rise_count: 9,
fall_count: 0,
check_type: "http"
},
]
}
```

There is lot's of room for improvement regarding the structure of the hash but i still hope you like the idea.

Cheers!
Daniel