Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suffix and Prefix Asterisk in combination with Wildcard in Datadog Metrics

It's quite simple: I have

  • a datadog-dashbaord
  • a template-variable named env, which can have following values ['prod', 'test']

enter image description here

And I want to display metrics based on the env:

  • from-resource for test is unified-importer-test-sqsimportdlq11419573-xl6dn7o5wqtj
  • from-resource for prod is unified-importer-prod-sqsimportdlq11419573-prmohksrvxxg

So naturally I'd use following syntax: unified-importer-$env.value-sqsimportdlq*

But this does not display anything, nor shows it any error.

This, however, works as expected: unified-importer-test-sqsimportdlq* (or unified-importer-prod-sqsimportdlq* respectively).

It looks like asterisk in combination with wildcards is not working.

Additionally, DD seems to dislike using two asterisks (as prefix and suffix): enter image description here

How can I leverage the template-var env easily in this situation?

like image 767
Christopher Will Avatar asked Oct 22 '25 03:10

Christopher Will


1 Answers

There's no way to use the template variable in the middle of a string, it can only go at the end. That would be a feature request to the Datadog team

like image 80
draav Avatar answered Oct 26 '25 17:10

draav