Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metricsFilter only export the first filter as "dimension" #58

Open
chris8205 opened this issue Jul 28, 2023 · 2 comments
Open

metricsFilter only export the first filter as "dimension" #58

chris8205 opened this issue Jul 28, 2023 · 2 comments

Comments

@chris8205
Copy link

chris8205 commented Jul 28, 2023

possible to "change" the metricsFilter to put the filtered dimension value also as dedicated "key-value pair"
ex. metricFilter: ["HttpStatusGroup eq '*'","BackendPool eq '*'"]

actual result is like

- azure_metrics_name{aggregation="average", container="azure-metrics-exporter", **dimension="2xx"**, endpoint="http-metrics", instance="xxx.xxx.xxx.xxx:8080", interval="PT1M", job="amex", metric="BackendResponseStatus", namespace="k8s-system", pod="xxxxxxxxx-tnskx", resourceGroup="xxxxxx-rg", resourceID="/subscriptions/xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/xxxxxxx-rg/providers/microsoft.network/applicationgateways/xxxxxxxxx-agw-01", resourceName="xxxxxxxxxxxx-agw-01", service="amex", subscriptionID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", subscriptionName="[xxxxx] XXXXX", timespan="PT1M", unit="Count"}

--> dimension:"2xx"

is it possible to enhance it with

  • httpstatusgroup="2xx"
  • backendpool=""

ex:

- azure_metrics_name{aggregation="average", container="azure-metrics-exporter", **httpstatusgroup="2xx", backendpool="<backendpoolname>"**, endpoint="http-metrics", instance="xxx.xxx.xxx.xxx:8080", interval="PT1M", job="amex", metric="BackendResponseStatus", namespace="k8s-system", pod="xxxxxxxxx-tnskx", resourceGroup="xxxxxx-rg", resourceID="/subscriptions/xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/xxxxxxx-rg/providers/microsoft.network/applicationgateways/xxxxxxxxx-agw-01", resourceName="xxxxxxxxxxxx-agw-01", service="amex", subscriptionID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", subscriptionName="[xxxxx] XXXXX", timespan="PT1M", unit="Count"}

so its possible to create metrics more "flexible" but can be filtered

or create a "dimension" selector to select one or more dimension(s) to export

@chris8205
Copy link
Author

info: possible microsoft doesn't return all dimensions per default no dimensions can be retourned.
and if metricsFilter is set only one of these filters are returned as "dimension" so "decode" steps only in "single-dimension" and returns the value as ' dimension="" '

i suggest to remove the "dimension" prefix and return always the key-name without any pre- or suffix

@mblaschke
Copy link
Member

you can query mutiple dimensions using ["HttpStatusGroup eq '*' and BackendPool eq '*'"]. that's the format of the Azure Metrics API.

Keep in mind that you set metricTop to a higher value as you might get many results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants