I would like to view all graphite tree structure in json format. I am currently using
GET /metrics/find/?format=treejson&query=stats.gauges.*
gives:
[{"leaf": 0, "context": {}, "text": "echo_server",
"expandable": 1, "id": "stats.gauges.echo_server", "allowChildren": 1},
{"leaf": 0, "context": {}, "text": "logstash",
"expandable": 1, "id": "stats.gauges.logstash", "allowChildren": 1},
{"leaf": 0, "context": {}, "text": "server0",
"expandable": 1, "id": "stats.gauges.server0", "allowChildren": 1},
{"leaf": 0, "context": {}, "text": "server1",
"expandable": 1, "id": "stats.gauges.server1", "allowChildren": 1},
{"leaf": 0, "context": {}, "text": "stats",
"expandable": 1, "id": "stats.gauges.stats", "allowChildren": 1},
{"leaf": 0, "context": {}, "text": "statsd",
"expandable": 1, "id": "stats.gauges.statsd", "allowChildren": 1},
{"leaf": 0, "context": {}, "text": "vamsi",
"expandable": 1, "id": "stats.gauges.vamsi", "allowChildren": 1},
{"leaf": 0, "context": {}, "text": "vamsi-server",
"expandable": 1, "id": "stats.gauges.vamsi-server", "allowChildren": 1}
]
to obtain immediate children, Ideally i would like to have all the elements.
[[UPDATE]]
using GET/metrics/index.json
gives required JSON.
So, how do we build the tree view?