简体   繁体   中英

Migrating tree structure of graphite

How do we migrate the tree structure of graphite? I tried

GET /metrics/index.json

which only gives me the graphite tree structure in JSON format. I would however like to display the tree in custom UI.

The desirable output would be: 在此处输入图片说明

Thanks

You'll need to traverse the /browser/ endpoint and reconstruct it yourself using the node types (eg leaf). I have some code in Descartes that does this already.

https://github.com/obfuscurity/descartes/blob/35e0182664348d3738d348988803b807af3cae73/lib/descartes/public/js/render-graph.js#L71-L107

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM