Skip to content

Expose instance AZ in ring via Prometheus metric #4681

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

roystchiang
Copy link
Contributor

What this PR does:

Add a new metric cortex_ring_availability_zone for displaying which availability zone an instance is configured to run in. This helps with monitoring via Prometheus, and can help detect if there's an unbalance in AZ distribution.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Name: "ring_availability_zone",
Help: "The availability zone of the instance",
}, []string{"az"})
zoneInfo.WithLabelValues(zone).Set(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no zone (i.e. zone is empty string) should we skip on emitting this metric?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I agree

@stale
Copy link

stale bot commented Jul 10, 2022

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 10, 2022
@stale stale bot closed this Aug 12, 2022
@friedrichg friedrichg reopened this Aug 12, 2022
@stale stale bot closed this Sep 21, 2022
@alvinlin123 alvinlin123 reopened this Sep 21, 2022
@stale stale bot removed the stale label Sep 21, 2022
@alvinlin123 alvinlin123 added the keepalive Skipped by stale bot label Sep 21, 2022
@CharlieTLe
Copy link
Member

Hello @roystchiang, thank you for opening this PR.

There is a release in progress. As such, please rebase your CHANGELOG entry on top of the master branch and move the CHANGELOG entry to the top under ## master / unreleased.

Thanks,
Charlie

@danielblando
Copy link
Contributor

We are adding something similar with #6900

@roystchiang do you still wanna work on this or can we close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keepalive Skipped by stale bot size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants