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

Add recording rules that will be federated by aggregate prometheus and garden-prometheus #169

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

ialidzhikov
Copy link
Member

@ialidzhikov ialidzhikov commented Mar 12, 2024

How to categorize this PR?

/area monitoring
/kind enhancement

What this PR does / why we need it:
This PR adds recording rules to federate the registry_proxy_pushed_bytes_total, registry_proxy_pulled_bytes_total metrics in the Seed cluster's aggregate prometheus and in then also in the prometheus in the runtime cluster.

The motivation for this PR is that currently it is not possible to fetch check the above-mentioned metrics for several clusters. We only have the Registry Cache dashboard and we display the "delta" (pushed to clients - pulled from upstream) there. However, to conclude on the improvements by the registry-cache extensions, it would be nice to be able to fetch the metrics for given set of Shoots. For example, to be able to do queries like: fetch the "delta" for all Shoots in given Project, or fetch the "delta" for all Shoots in the landscape.

Which issue(s) this PR fixes:
Part of #3

Special notes for your reviewer:
These are the recording rules that are present in the aggregate prometheus:
Screenshot 2024-03-12 at 15 02 03

A prometheus query that can be used to fetch the "delta":

  (sum_over_time((shoot:registry_proxy_pushed_bytes_total:sum)[1d:1m]) * 60)
-
  (sum_over_time((shoot:registry_proxy_pulled_bytes_total:sum)[1d:1m]) * 60)

Many thanks to @istvanballok for the help with this task.

Release note:

The registry-cache extension defines recording rules (`shoot:registry_proxy_pushed_bytes_total:sum` and `shoot:registry_proxy_pulled_bytes_total:sum`) that are federated in the Seed cluster's aggregate prometheus and also in the prometheus in the runtime cluster. These rules make possible to query registry-cache related metrics from the prometheus in the runtime cluster and in this way get an overview for given set of Shoot clusters.

…d garden-prometheus

Co-authored-by: dimitar-kostadinov <dimitar.kostadinov@sap.com>
Co-authored-by: istvanballok <istvan.zoltan.ballok@sap.com>
@gardener-prow gardener-prow bot added area/monitoring Monitoring (including availability monitoring and alerting) related kind/enhancement Enhancement, improvement, extension labels Mar 12, 2024
@gardener-prow gardener-prow bot added cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 12, 2024
@dimitar-kostadinov dimitar-kostadinov self-assigned this Mar 13, 2024
Copy link
Contributor

@dimitar-kostadinov dimitar-kostadinov left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 13, 2024
Copy link
Contributor

gardener-prow bot commented Mar 13, 2024

LGTM label has been added.

Git tree hash: 4288ae133e9e909b9733c559c951b4426d9871fd

Copy link
Contributor

gardener-prow bot commented Mar 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dimitar-kostadinov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 13, 2024
@gardener-prow gardener-prow bot merged commit f3c8ff4 into gardener:main Mar 13, 2024
6 checks passed
@ialidzhikov ialidzhikov deleted the enh/recording-rules branch March 13, 2024 11:44
@JordanJordanov JordanJordanov added area/ipcei IPCEI (Important Project of Common European Interest) ipcei/registry-cache-extension Registry Cache Extension labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ipcei IPCEI (Important Project of Common European Interest) area/monitoring Monitoring (including availability monitoring and alerting) related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. ipcei/registry-cache-extension Registry Cache Extension kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants