Skip to content

Conversation

@carlozleite
Copy link

@carlozleite carlozleite commented Nov 22, 2017

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"}

@conr
Copy link
Contributor

conr commented Nov 22, 2017

Thanks for improving the azure-metrics-exporter!

Can you explain what your improvements are? :)

@carlozleite
Copy link
Author

Hi Conor, I updated the description of the PR with the changes.

@carlozleite
Copy link
Author

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.

@conr
Copy link
Contributor

conr commented Nov 22, 2017

I'll try get to testing this sometime this week.

Would you be able to separate this into two separate PRs?
One for the docker stuff and one of the code changes.

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants