Could we perhaps group by the node then process_num then?
{nodename:value:
    {pid: pid1: {
        haproxy: {
            Uptime_sec:100,
            PoolFailed:1
            }
      stats: { "frontend": {
        "www.haproxy.org": {
            "bin": "999999999999",
            "lbtot": "555555",
            ...
        },
        "www.haproxy.com": {
            "bin": "999999999999",
            "lbtot": "555555",
            ...
        },
    },
    "backend": {
        "www.haproxy.org": {
            "bin": "999999999999",
            "lbtot": "555555",
            ....
            "server": {
                "srv1": {
                    "bin": "999999999999",
                    "lbtot": "555555",
                   ....
                },
                ...
            }

        },
    {pid: pid2: { haproxy: {
            Uptime_sec:100,
            PoolFailed:1
            }
      stats: { "frontend": {
        "www.haproxy.org": {
            "bin": "999999999999",
            "lbtot": "555555",
            ...
        },
        "www.haproxy.com": {
            "bin": "999999999999",
            "lbtot": "555555",
            ...
        },
    },
    "backend": {
        "www.haproxy.org": {
            "bin": "999999999999",
            "lbtot": "555555",
            ....
            "server": {
                "srv1": {
                    "bin": "999999999999",
                    "lbtot": "555555",
                   ....
                },
                ...
            }

        },

ignore the close brackets im pretty sure they are wrong, but you get the idea.

On 26 July 2016 at 14:30, Willy Tarreau <w...@1wt.eu> wrote:
> Hi Pavlos!
>
> On Tue, Jul 26, 2016 at 03:23:01PM +0200, Pavlos Parissis wrote:
>> Here is a suggestion
>> {
>>     "frontend": {
>>         "www.haproxy.org": {
>>             "bin": "999999999999",
>>             "lbtot": "555555",
>>             ...
>>         },
>>         "www.haproxy.com": {
>>             "bin": "999999999999",
>>             "lbtot": "555555",
>>             ...
>>         },
>>     },
>>     "backend": {
>>         "www.haproxy.org": {
>>             "bin": "999999999999",
>>             "lbtot": "555555",
>>             ....
>>             "server": {
>>                 "srv1": {
>>                     "bin": "999999999999",
>>                     "lbtot": "555555",
>>                    ....
>>                 },
>>                 ...
>>             }
>>
>>         },
>>     },
>>     "haproxy": {
>>         "id1": {
>>             "PipesFree": "555",
>>             "Process_num": "1",
>>             ...
>>         },
>>         "id2": {
>>             "PipesFree": "555",
>>             "Process_num": "2",
>>             ...
>>         },
>>         ...
>>     },
>> }
>
> Thanks. How does it scale if we later want to aggregate these ones over
> multiple processes and/or nodes ? The typed output already emits a
> process number for each field. Also, we do have the information of how
> data need to be parsed and aggregated. I suspect that we want to produce
> this with the JSON output as well so that we don't lose information when
> dumping in JSON mode. I would not be surprized if people find JSON easier
> to process than our current format to aggregate their stats, provided we
> have all the fields :-)
>
> Cheers,
> Willy

Reply via email to