GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support prom discovery by lujiajing1126 · Pull Request #93 · robusta-dev/krr

Conversation

@lujiajing1126

@lujiajing1126 lujiajing1126 commented Jul 3, 2023

Copy link
Copy Markdown

Closes #59

According to the discussion in the thread, an extra option is added,

--discovery-method           TEXT  Method to discover workload in the cluster. [default: api-server]

The default mode is api-server but can be switched to prometheus.

Currently, the following entity is supported,

  • Deployment
  • STS
  • ...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

LeaveMyYard and danielhass reacted with thumbs up emoji LeaveMyYard reacted with rocket emoji
All reactions
  • 👍 2 reactions
  • 🚀 1 reaction
lujiajing1126 added 8 commits July 3, 2023 10:48
@lujiajing1126
first commit
d756d49
@lujiajing1126
fix all bugs
67f264c
@lujiajing1126
support labels in the table
180b19a
@lujiajing1126
fix None cluster issue
9279ce8
@lujiajing1126
fix name
28bf5a9
@lujiajing1126
abstract workload discovery
8bb2857
@lujiajing1126
revert BaseFilteredMetricLoader
88b98f8
@lujiajing1126
revert table format
85c62d5
lujiajing1126
lujiajing1126 commented Jul 3, 2023
View reviewed changes
Comment thread robusta_krr/core/runner.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

LeaveMyYard
LeaveMyYard reviewed Jul 5, 2023
View reviewed changes
Comment thread robusta_krr/core/models/config.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

lujiajing1126 and others added 7 commits July 8, 2023 10:07
@lujiajing1126
fix Literal
325274b
@lujiajing1126
Merge branch 'main' into support-prom-discovery
308edf6
@LeaveMyYard
Merge branch 'main' into support-prom-discovery
c301571
@lujiajing1126
Merge branch 'main' into support-prom-discovery
dc97454
@lujiajing1126
remove coroutine limit
e4b443b
@lujiajing1126
remove labels
f4267f5
@lujiajing1126
Merge branch 'main' into support-prom-discovery
f6268c5
@LeaveMyYard

LeaveMyYard commented Sep 4, 2023

Copy link
Copy Markdown
Contributor

Planned to merge in 1.7

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danielhass

danielhass commented Mar 17, 2024

Copy link
Copy Markdown

@LeaveMyYard this apparently didn't make it into 1.7. Can you guys share the current plans for this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aantn

aantn commented Mar 28, 2024

Copy link
Copy Markdown
Contributor

We're looking into this! It needs some updating for the current codebase and is currently incomplete.

So we can't commit to a timeline yet, but it is something we want to merge in principle.

There are two scenarios we're familiar with where this would be useful:

  1. For people who don't have kubectl access to the cluster
  2. For ephemeral workloads that no longer exist at the time of the scan (e.g. gitlab runners)

Just to confirm we're on the right track with this, is your use case one of those two?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aantn

aantn commented Mar 28, 2024

Copy link
Copy Markdown
Contributor

And if there are any volunteers for updating this PR to the current version of Robusta and completing it - that would definitely accelerate how fast we can merge it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danielhass

danielhass commented Mar 28, 2024

Copy link
Copy Markdown

@aantn thanks for providing this feedback here!

Our use case falls into these cases and extends beyond I would say: we too don't want to require kubectl to the scanned cluster to run krr. Additionally in our landscape we consolidate our metrics on multiple central "infrastructure clusters" via Prom remote-writes. These infra clusters also store metrics with a much larger retention than the local Prom instances in the source/workload clusters. Running krr on these infra clusters would allow us to fit the tool much better in the centralized metrics approach we chose and possibly lead to better results as we have much more data (larger metrics retention) available there.

Does this makes sense?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aantn

aantn commented Apr 1, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Yep, makes sense.

You may be able to do that today without waiting for the PR. You can pass an explicit Prometheus url with -p and use --prometheus-label and -l to specify which metrics belong to each cluster. See "Scanning with a Centralized Prometheus" in this part of the README.

Let me know if that works for your case?

edit: To clarify, you'll still need kubectl access to each cluster, so it wont solve that problem. But I think it will solve the second goal of letting krr use the centralized metrics with larger retention.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danielhass

danielhass commented Apr 9, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

@aantn we could reproduce your edited findings 💯 on our side.

We were indeed able to make use of the larger retention on the central Prom instance with mentioned parameters. However krr failed as soon as we removed the kubectl access to the target cluster as this connection was always used for workload discovery.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aantn

aantn commented Apr 10, 2024

Copy link
Copy Markdown
Contributor

Thank you for the update! That makes sense.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

LeaveMyYard added a commit that referenced this pull request Apr 22, 2024
@LeaveMyYard @lujiajing1126
Moved the logic from #93 for a new refined structure
c7ad1cd
Co-authored-by: Megrez Lu <[email protected]>
@LeaveMyYard

LeaveMyYard commented Apr 26, 2024

Copy link
Copy Markdown
Contributor

Closing this one, as #266 is now a successor, updated for a new code version
Thanks @lujiajing1126 for the work done, it helped a lot

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@LeaveMyYard LeaveMyYard closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@LeaveMyYard LeaveMyYard LeaveMyYard left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support metrics-based workload discovery

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@lujiajing1126 @LeaveMyYard @danielhass @aantn
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.