How to set line color on a timeseries in DataDog

Viewed 2640

I'm setting up a timeseries to monitor system problems with the standard levels: Critical, Error, Warn, etc.. I want to set the colors as follows:

  • Critical: Red
  • Error: Orange
  • Warn: Yellow

I can't seem to do this. There is a color selection drop-down, but options aren't colors... they're themes, like "Classic," "Cool," "Warm," etc.

How do I set the color on a line in a time series?

2 Answers

You can't set a color per line, but you can set the color per query.

If you edit the graph using json, that field requests.style.palette is exposed and you can just try typing in whatever color you want there.

https://imgur.com/VrZZl72

If you want to have one time series that is green for hits, and one that is red for errors, you just make two metric queries, and then color one green and one red.

https://imgur.com/AHGi1Hk

Unfortunately, that doesn't seem to be a setting you can directly control at this time. The reasoning is that a given timeseries could be split by tag, so setting a single color for a timeseries split by tag would amount to multiple entires of the same color, and that wouldn't make sense.

To support the semantic meaning, I've often used the following settings:

  • Error: Warm (first timeseries is red)
  • Warn: Orange (it's orange, and nothing rhymes with orange)
  • Normal: Cool

I'm not sure I know what distinction there is of Error vs Critical in your definition, but using these palettes has proven useful for my team.

If you're looking for a specific widget to change color based on value - so if the number exceeds a threshold - take a look at the Query Value Widget, as that can be customized to change color based on the current value.

Alternately, if you have a Monitor already set for the timeseries, use the Alert Value Widget to show the current status, with less configuration, since the thresholds are managed in the Monitor's definition.

Related