Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rows aren't merging in a table panel. #12688

Closed
lesovsky opened this issue Jul 23, 2018 · 3 comments

Comments

@lesovsky
Copy link

@lesovsky lesovsky commented Jul 23, 2018

Hi,

I’m trying to organize data in a table panel and trying to merge values from multiple queries in a table, but with no success.
I’ve started with two metrics, which have the same set of labels and even label's values are the same:

1. node_filesystem_total_bytes{db_instance=“db1”,device="/dev/md0",flags=“rw,noatime,nobarrier,stripe=512,data=ordered”,fstype=“ext4”,job=“db_system”,mountpoint="/mnt/nvme",sysid=“6364961867687332226”}
2. node_filesystem_used_bytes{db_instance=“db1”,device="/dev/md0",flags=“rw,noatime,nobarrier,stripe=512,data=ordered”,fstype=“ext4”,job=“db_system”,mountpoint="/mnt/nvme",sysid=“6364961867687332226”}

But in the result table, I've got metric’s results are in the separate rows. Take a look at the picture below on Value #A and Value #B
garafana-table

Also I've made a single metric node_filesystem_usage with special label usage with values like total/free/used. Next I've tried to create table again based on that metric, but got separate rows again.

How can I merge this rows into the single one? Or is it working as intended?

grafana 5.2.1, prometheus data source, centos 7.5 linux. Table Transform set to Table

@daniellee

This comment has been minimized.

Copy link
Member

@daniellee daniellee commented Jul 23, 2018

They should be merged if the datetime column and labels match and I can't see anything obvious in your screenshot. Can you check using Query Inspector if there is some difference between the rows. You can also trying hiding columns one-by-one to figure out which column is causing the merge not to happen.

Example dashboard: https://play.grafana.org/d/000000065/prometheus-console-tables?panelId=2&fullscreen&edit&orgId=1

Docs: http://docs.grafana.org/features/panels/table_panel/#merge-multiple-queries-per-table

@marefr

This comment has been minimized.

Copy link
Member

@marefr marefr commented Jul 23, 2018

@lesovsky There's a workaround in #10050 (comment) that maybe help?

@lesovsky

This comment has been minimized.

Copy link
Author

@lesovsky lesovsky commented Jul 23, 2018

@daniellee thank you, for the example. The problem was solved with sum by (), which wasn't obvious for me from Grafana documentation.

Everything works OK now, thanks!
image

@lesovsky lesovsky closed this Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.