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

Leverage the inventory control stream to report updater metrics #38654

Merged
merged 4 commits into from
Feb 29, 2024

Conversation

bernardjkim
Copy link
Contributor

@bernardjkim bernardjkim commented Feb 26, 2024

This PR modifies how the metrics for total_instances, enrolled_in_upgrades, and upgrader_counts are collected.

The current method of iterating over the instances results in some inconsistent metrics.
Ex: At certain points, one of our Cloud tenants reports ~11000 registered_servers but ~18000 total_instances. I'm guessing this issue might be due to agents being frequently cycled and the TTL for the list of instances being a little too long.

The change iterates over the inventory instead to collect the above metrics. This is the same method that is used to collect the registered_servers metrics.

changelog: Fixes an issue with over counting of reported Teleport updater metrics

Copy link

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

Copy link
Collaborator

@zmb3 zmb3 left a comment

Choose a reason for hiding this comment

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

Looks good but did we lose all of our test coverage?

Copy link

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@bernardjkim
Copy link
Contributor Author

Reusing the instanceMetricsPeriodic struct, but modified to iterate over the inventory control stream. This should allow us to reuse the existing tests.

@bernardjkim bernardjkim requested a review from zmb3 February 27, 2024 21:19
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from Joerger February 28, 2024 22:51
@bernardjkim bernardjkim added this pull request to the merge queue Feb 29, 2024
Merged via the queue into master with commit e6c2aeb Feb 29, 2024
36 of 38 checks passed
@bernardjkim bernardjkim deleted the bernard/upgrader-metrics branch February 29, 2024 02:55
@public-teleport-github-review-bot

@bernardjkim See the table below for backport results.

Branch Result
branch/v13 Failed
branch/v14 Failed
branch/v15 Create PR

bernardjkim added a commit that referenced this pull request Mar 1, 2024
* Leverage the inventory control stream to report updater metrics

* Remove periodic instance metrics

* Reuse instanceMetricsPeriod
bernardjkim added a commit that referenced this pull request Mar 1, 2024
* Leverage the inventory control stream to report updater metrics

* Remove periodic instance metrics

* Reuse instanceMetricsPeriod
github-merge-queue bot pushed a commit that referenced this pull request Mar 1, 2024
…) (#38832)

* Leverage the inventory control stream to report updater metrics

* Remove periodic instance metrics

* Reuse instanceMetricsPeriod
github-merge-queue bot pushed a commit that referenced this pull request Mar 2, 2024
…) (#38833)

* Leverage the inventory control stream to report updater metrics

* Remove periodic instance metrics

* Reuse instanceMetricsPeriod
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.

4 participants