Why does graphing a grouped, arithmetical metric query sometimes yield a blank graph?

If you are trying to configure a grouped, arithmetical metric query on a graph, you may sometimes find that your graph appears completely blank, like so:

 

 

How does this happen? 

 

To illustrate, let's say you're trying to configure a query that performs arithmetic on two separate metric queries (a and b, broken down by group), such as a / b  or  a - b. In this case, let's assume you're using the following queries: 

 

a: avg:aws.ec2.host_ok{availability-zone:abc,role:xyz} by {host}

b: avg:aws.ec2.host_ok{role:xyz} by {host}

 

If your graph shows nothing at all, it's because the number of series returned by each of these two queries is not equal. As such, arithmetic cannot be performed here, since there would be an unequal number of operands--the only way this will work is if each of these two queries always returns the same number of unique timeseries.

 

In this case, you can see that query a returns a total of 2 unique timeseries: 

 

 

And query b returns a total of 6 unique timeseries, as seen here: 

 

 

So, in this case, it's not possible to divide the 2 series by the 6 series, broken down by host. One possible way to work around this would be to try unifying some of your tags, although you could lose a bit of specificity that way.

 

There is a beta feature that we can enable for your account that may allow you to graph queries such as these, even when the subqueries return an unequal number of series. If you're interested in trying this out, please email support@datadoghq.com

 

Failing that, depending on your query we may be able to help you find a workaround that suits your needs. Please contact our support team if you have questions about a particular query. 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk