-
Notifications
You must be signed in to change notification settings - Fork 69
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
Some improvements .... #1
base: master
Are you sure you want to change the base?
Conversation
Thanks for improving the azure-metrics-exporter! Can you explain what your improvements are? :) |
Hi Conor, I updated the description of the PR with the changes. |
On my fork I added support for Docker ... if you are interested only change the path of the repository in the docker-build.sh and Dockerfile files. |
I'll try get to testing this sometime this week. Would you be able to separate this into two separate PRs? Thanks! |
…on expíres after some minutes ...
I'm using metrics-exporter to scan all azure resource providers and I noticed that in some cases the values returned null, this generated an exception, so I put two "if's" to check if these data were null, avoiding the exception .
Another change is related to labels that are not being inserted correctly, generating the exception "was collected before with the same name and label values", also adds a new label called "resource_type" referencing the name of the resource provider.
I also inserted some string formatting, because some metrics incline the character "-" this caused failure in prometheus "no token found" ...
And lastly I added a part of the resource provider name to the metric name, removing only the name "Microsoft" to make it easier to identify within prometheus.
Example:
Compute_percentage_cpu {instance = "Azure-Compute: 9090", job = "Azure-Compute", resource_group = "Development", resource_name = "vmdtscience", resource_type = "Microsoft.Compute"}