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

Fix hostname override and type for status_report.count metrics #2372

Merged
merged 1 commit into from
Oct 11, 2018

Conversation

xvello
Copy link
Contributor

@xvello xvello commented Oct 10, 2018

What does this PR do?

The hostname of the .container.status_report.count.waiting and .container.status_report.count.terminated metrics was not extracted from the label join map.

Add the OpenMetricsScraperMixin.get_hostname_for_sample public method to expose the information to checks, and use it for these two metrics.

Also, set the metric type as gauge, as count bring erroneous values (counted by the app as the number of count calls per minutes, instead of per check run). As the timeseries are container cardinality (pod and kube_container_name tags), no client-side aggregation is needed for gauges.

Motivation

What inspired you to submit this pull request?

Review checklist

  • PR has a meaningful title or PR has the no-changelog label attached
  • Feature or bugfix has tests
  • Git history is clean
  • If PR impacts documentation, docs team has been notified or an issue has been opened on the documentation repo

Additional Notes

Anything else we should know when reviewing?

@xvello xvello merged commit 419e173 into master Oct 11, 2018
@xvello xvello deleted the xvello/ksm-hostname branch October 11, 2018 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants