It's quite simple: I have
env
, which can have following values ['prod', 'test']
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):
How can I leverage the template-var env
easily in this situation?
Well, it turned out that following solution works:
sum:aws.sqs.approximate_number_of_messages_visible{service:unified-importer AND env:$env.value AND queuename IN (unified-importer-test-sqsimportdlq86419573-al6dn7o5wqtj,unified-importer-prod-sqsimportdlq86419573-prmohksrvmxg)}