0

I have DataDog with Amazon AWS RDS integration configured.

Is it possible to create a graph and use a tag to exclude some hosts from the result. I have let's say 100 hosts with tag environment:live and 10 of them are also tagged with tag importance:ignore. So I need to create a graph which will include metrics for 90 hosts that are tagged with first tag but don't tagged with a second one. Is it possible?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
pensnarik
  • 1,214
  • 2
  • 12
  • 15

1 Answers1

4

Yes, you can configure widgets to exclude results by tags. You can do this by applying a tag prepended with a ! to signify "not".

So in your case, you can set up your widget scoped over importance:ignore and then hit the little </> button on the right to expose the underlying query, and sneak a ! in front to make it !importance:ignore.

This doc has a nice example (although it's for notebooks, it works the same in dashboards as well).

stephenlechner
  • 1,836
  • 11
  • 11
  • Thank you for your answer. But that is not exactly my case. I want to specify 100 result by the first tag, than exclude 10 from them by using *!importance:ignore* and that seems doesn't work because when I specify 2 tags in > edit mode it treats comma as *OR* instead of *AND*. – pensnarik Apr 05 '20 at 08:11
  • 1
    I think this should still work if you scope by `environment:live,!importance:ignore`, or more precisely, `avg:my.metric{environment:live,!importance:ignore} by {host}` maybe? that should give you all the 90 hosts that have the environment:live tag and not the importance:ignore tag. or maybe i'm misunderstanding something? if that _is_ what you're looking for maybe just let me know and I'll update my answer? – stephenlechner Apr 08 '20 at 04:26