Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replace no data by zeros in datadog graphs

Tags:

datadog

There does not seem to be a way to replace no data by zeros when using formulas in datadog. I've tried fill zero but it doesn't seem to work I would simply like my dd agent monitor to display 0 instead of no data when it is down

like image 299
PhilipGarnero Avatar asked Apr 05 '18 11:04

PhilipGarnero


3 Answers

how about the "default" function?

so default(sum:foo.bar{hello:world} by {baz}, 0) or some such?

like image 119
stephenlechner Avatar answered Nov 20 '22 17:11

stephenlechner


The default_zero() function does what you're looking for. You can type it in manually, as stephenlechner suggests.

There's another way I found:

  1. Click "Advanced" in the bottom right:

  2. Enter default(a, 0) as the formula, and disable the visibility of metric a:

When you save the graph and reopen, you'll see that things have been reshuffled a little, and you'll see a "default 0" section tagged onto the end of the metric's definition.

like image 33
Alexander Avatar answered Nov 20 '22 18:11

Alexander


There is now a default_zero() function that can be used in Datadog by modifying through JSON directly.

like image 7
user1655072 Avatar answered Nov 20 '22 19:11

user1655072