You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
While you will generally be OK to retrieve a metric with the 3 parameters passed in by Prometheus aka task+region+target, there is a case where you need a 'target2' or equivalent.
If you use elastic search then the corresponding metrics are a two-dimension one. ClientId+DomainName.
The ClientId is in fact your AWS account ID (not changing and the domain is your choice when you create an ES domain and you can have many of them.
We have aws_dimensions: [ClientId, Domain].
The problem is that the account ID will be different in your DEV environment, STAGE environment, PROD environment... So you cannot hard-code it in the Docker image. At the same time, you may want to get the metrics for multiple domains.
So there is no simple solution even with the regexp support (thanks for it!!!) of #4 and #6. If you want a 'portable' container that you can deploy in any environment of yours with flexible options, you want target and 'target2' as parameters received from Prometheus (if this is even possible).
The support for aws_dimensions_select and aws_dimensions_select_regex has still some constraints, e.g. you cannot mix a aws_dimensions_select value (target) for the domain and a aws_dimensions_select_regex ([0-9]+) for the clientid which could have done the trick (cost of an extra AWS call on each exporter call to the list of values when you use a regexp or no value at all (interpreted as .*).
Hard-coding a list of values like
(the IDs of your accounts) does not work either with on the next line Domain: [$_target] and in any case we would make more AWS calls than needed.
The only solution that I have found, trying many ones is to declare the two-dimension metric and to not specify any value. It work but because of the price is 1 AWS call to get a list of client IDs (only one is returned) plus 1 AWS call to get a list of domains (let say returns N domains). Then you make 1xN individual calls so a total of 2+N AWS calls.
If you could pass target + 'target2' you would make 1 AWS call.
Other metrics may have the same problem but this one was one that I required to get.
I think that it is a good case for a 'target2' parameter if this is doable.
Thanks for this project.
The text was updated successfully, but these errors were encountered:
Hi @a-teisseire ,
I have moved to a different project but I may have a few cycles for testing. Is it what you think about? Developing is another story as I hardly read Go.
While you will generally be OK to retrieve a metric with the 3 parameters passed in by Prometheus aka
task+region+target
, there is a case where you need a 'target2' or equivalent.If you use elastic search then the corresponding metrics are a two-dimension one.
ClientId+DomainName
.The
ClientId
is in fact your AWS account ID (not changing and thedomain
is your choice when you create an ES domain and you can have many of them.We have
aws_dimensions: [ClientId, Domain]
.The problem is that the account ID will be different in your DEV environment, STAGE environment, PROD environment... So you cannot hard-code it in the Docker image. At the same time, you may want to get the metrics for multiple domains.
So there is no simple solution even with the regexp support (thanks for it!!!) of #4 and #6. If you want a 'portable' container that you can deploy in any environment of yours with flexible options, you want target and 'target2' as parameters received from Prometheus (if this is even possible).
The support for
aws_dimensions_select
andaws_dimensions_select_regex
has still some constraints, e.g. you cannot mix aaws_dimensions_select value (target)
for thedomain
and aaws_dimensions_select_regex ([0-9]+)
for theclientid
which could have done the trick (cost of an extra AWS call on each exporter call to the list of values when you use a regexp or no value at all (interpreted as.*
).Hard-coding a list of values like
(the IDs of your accounts) does not work either with on the next line
Domain: [$_target]
and in any case we would make more AWS calls than needed.The only solution that I have found, trying many ones is to declare the two-dimension metric and to not specify any value. It work but because of the price is 1 AWS call to get a list of client IDs (only one is returned) plus 1 AWS call to get a list of domains (let say returns N domains). Then you make 1xN individual calls so a total of 2+N AWS calls.
If you could pass target + 'target2' you would make 1 AWS call.
Other metrics may have the same problem but this one was one that I required to get.
I think that it is a good case for a 'target2' parameter if this is doable.
Thanks for this project.
The text was updated successfully, but these errors were encountered: