<p>I'm using Grafana plus Prometheus queries to create dashboards in Grafana for Kubernetes. I take the name of the nodes (3 in this case) in a variable and then I pass this values to other query to extract the IPs of the machines. The values extracted are correct. I have the multi-value option enabled.</p>

<p>The problem comes with the query <code>sum(rate(container_cpu_usage_seconds_total{id="/", instance=~"$ip_test:10250"}[1m]))</code> and more than one IP because it only takes one of them. In other query it works but I think it is possible because the other query has not the <code>:10250</code> after the variable.</p>

<p>My question, do you know any way to concatenate all the ip:port? E.g.: X.X.X.X:pppp|X.X.X.X:pppp </p>

arturoxv
<p>Try it like this:</p>
<pre><code>sum(rate(container_cpu_usage_seconds_total{id=&quot;/&quot;, instance=~&quot;($ip_test):10250&quot;}[1m]))
</code></pre>
