yesoreyeram / yesoreyeram-boomtable-panel

Boom Table Panel for Grafana (Graphite, Prometheus, InfluxDB & Cloudwatch) :boom:
https://grafana.com/plugins/yesoreyeram-boomtable-panel
MIT License
152 stars 37 forks source link

[Feature Request] Split data into multi columns or rows #58

Open tuxknight opened 5 years ago

tuxknight commented 5 years ago

example metrics:

query:

 100 * sum by (app_name, team)(probe_success{})/(count(probe_success{}) by (app_name, team))

metrics:

{app_name="monitor",team="devops"}  100
{app_name="apm",team="devops"}  100
{app_name="scm",team="devops"}  90
{app_name="slb",team="devops"}  100
{app_name="internet",team="web"}  100
{app_name="internal",team="web"}  50
{app_name="master",team="db"}  100
{app_name="replica01",team="db"}  100
{app_name="replica02",team="db"}  100
{app_name="replica03",team="db"}  100

The table that generated using metrics from above(hide first row):

devops monitor[100%] apm[100%] scm[90%] slb[100%] N/A N/A N/A N/A N/A N/A
web N/A N/A N/A N/A internet[100%] internal[100%] N/A N/A N/A N/A
db N/A N/A N/A N/A N/A N/A master[100%] replica01[100%] replica02[100%] replica03[100%]

I think this table struct is not compact and is not suitable for TV dashboard. The table I expected like below:

devops monitor[100%] apm[100%] scm[90%] slb[100%]
web internet[100%] internal[100%] N/A N/A
db master[100%] replica01[100%] replica02[100%] replica03[100%]

Could any one help me about this issue?

yesoreyeram commented 5 years ago

What datasource you are using ?

yesoreyeram commented 5 years ago

In you metric results app_name is unique. On what basis, you are grouping the results??

tuxknight commented 5 years ago

@yesoreyeram the datasource I'm using is prometheus.

In the metric results app_name is unique for it is a group-by result. In original metrics, there are some labels like server_ip, server_port which are different.

Here is the example.

probe_success{app_name="monitor",team="devops",server_ip="1.2.3.4"} 1
probe_success{app_name="monitor",team="devops",server_ip="1.2.3.5"} 1

I tried using repeat and variables to generate one boom table panel for each $team. But the panel size is not fit with different dataset sizes. So, the result I want to achieve is the "table-version" repeat.

kakaday22 commented 5 years ago

As Part of this request, if user does not provide a column name can you set the behavior as following:

devops monitor[100%] apm[100%] scm[90%] slb[100%]
web internet[100%] internal[100%] N/A N/A
db master[100%] replica01[100%] replica02[100%] replica03[100%]

such as if you have "Duplicate Matches" it would just add each match to column similar behavior should occur with rows :)