matching labels must be unique on one side

1,687 views
Skip to first unread message

Deeraj V

unread,
May 15, 2022, 11:06:21 AM5/15/22
to Prometheus Users
(container_fs_usage_bytes{})*on(instance)group_left(pod) group by (pod)( container_fs_writes_bytes_total)

I am getting fllowing error.

Can you help me out to resolve?

Error executing query: found duplicate series for the match group {} on the right hand-side of the operation: [{pod="calico-node-fmvbf"}, {pod="kube-multus-ds-amd64-h4n77"}];many-to-many matching not allowed: matching labels must be unique on one side


Brian Candler

unread,
May 15, 2022, 1:48:41 PM5/15/22
to Prometheus Users
Split the query into two:

(container_fs_usage_bytes{pod="calico-node-fmvbf"})

(container_fs_writes_bytes_total{pod="calico-node-fmvbf"})

If you get more than one time series from both queries, then there's your problem.

Deeraj V

unread,
May 16, 2022, 12:54:13 AM5/16/22
to Prometheus Users
I had tried, 
(container_fs_writes_bytes_total{pod="calico-node-fmvbf"}) has more than 1 timeseris data
(container_fs_usage_bytes{pod="calico-node-fmvbf"}) has 0 timeseries data,

So had merged with on and group_left operation. Actually I would like to fetch container name,  by adding both query.

Container name label not available in the  container_fs_usage_bytes, Do u have any idea how we can fetch container name?

Brian Candler

unread,
May 16, 2022, 4:04:58 PM5/16/22
to Prometheus Users
On Monday, 16 May 2022 at 05:54:13 UTC+1 deerua...@gmail.com wrote:
Container name label not available in the  container_fs_usage_bytes, Do u have any idea how we can fetch container name?


Sorry, no - that's a kubernetes question.
Reply all
Reply to author
Forward
0 new messages