Open jcalhinho opened 3 years ago
Hi, Currently plugin is very limited, and expects only series with alias representing hierarchical component.
I've tested it on following data
> select folder, size from folder_sizes
name: folder_sizes
time folder size
---- ------ ----
1601406728562000000 /opt 3637904393
1601406728562000000 /opt/Postman 751448291
1601406728562000000 /opt/Postman/Postman-1594291304263-old 325608392
1601406728562000000 /opt/Postman/app 325611905
1601406728562000000 /opt/Postman/app/test 125611905
1601406728562000000 /opt/Telegram 93074741
1601406728562000000 /opt/Tusk 228779978
1601406728562000000 /opt/Tusk/locales 4597636
1601406728562000000 /opt/Tusk/resources 12586301
where folder is a tag
grafana query:
Ideally it would be nice to have csv with dump of panel data and description of what are you trying to visualize.
hello raman, thank you for your answer I understood well that it was necessary to have a hierarchical component as explained to you, I present you a part of the csv that I want to visualize: maybe my field separators are not good enough? I would like to restore especially the "proto_path" array in the sunburst.
Thank you very much again
As I understand You are trying to aggregate some data by the "proto path" across a certain time range in Grafana (for example the sum of nb_byte for each proto_path which have last_seen within the last hour?). Currently, the plugin does not aggregate data. It expects that incoming data is already aggregated in a database and the plugin explicitly gets the last element in each series if multiple values exist.
Also currently you can not have parts of the path with unknown value. All parts of the hierarchy must have a value returned from a database that is greater or equal to the sum of its children. I'm currently working on automatic summarization. In your case, you have values only on "leaf" nodes, so you need automatic summarization. You can fix this by inserting .sum(d => d.value) after this line https://github.com/rkorshakevich/zoomable-sunburst/blob/bd8cd164563c192a8d20f0e358959676a580de36/src/ZoomableSunburst.tsx#L101 and rebuilding.
Field delimiter, for the current version, is hardcoded as '/'. It would be nice to know what data source (database) you are using to store your data.
"If I understand correctly, you are trying to aggregate some data by the "proto path" over a certain period of time in Grafana (for example the sum of nb_byte for each proto_path that have been seen during the last hour?)"
is exactly that. In fact, I only get the last value of my request in return. I'll try inserting the line you copied from me. I use clickhouse as a multi-dimensional database. Maybe I could make an sql query that transforms my data in a hierarchical way? with "PRIOR" for example?
hello raman, Thank you for the grafana sunburst, however I have a problem I can not pass my data to it ... it only displays one with its field and its value on a white background ...
Maybe you could help me I would be grateful to you;
But Thanks again great work !!!!