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

feature request: Export Prometheus metrics #40

Closed
Razgoldenberg1 opened this issue Aug 30, 2023 · 10 comments · Fixed by #87
Closed

feature request: Export Prometheus metrics #40

Razgoldenberg1 opened this issue Aug 30, 2023 · 10 comments · Fixed by #87
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Razgoldenberg1
Copy link

Summary
I would like to suggest that the Kor project be updated to support Prometheus metrics.
CLI is very useful but allows users to collect and monitor Kor's metrics using Prometheus giving consistent visibility to the Kubernetes Orphaned Resources on your cluster.

@Razgoldenberg1 Razgoldenberg1 changed the title Export Prometheus metrics feature request: Export Prometheus metrics Aug 30, 2023
@yonahd
Copy link
Owner

yonahd commented Aug 30, 2023

Hi @Razgoldenberg1
What kind of metrics do you propose to export?

@Razgoldenberg1
Copy link
Author

Razgoldenberg1 commented Aug 30, 2023

Hi @yonahd thanks for the quick response,
At the start, I would like to get the same output as on the CLI .
if we could get the name of the resource, namespace, and kind it would be very nice:
something like that:
Kubernetes_Orphaned_Resources{kind="configmap", namespace="default" ,name="my_configmap", age="265days"}

@yonahd
Copy link
Owner

yonahd commented Aug 30, 2023

Interesting proposal.
Will look into this.

@yonahd yonahd added the Backlog Not for execution now label Sep 5, 2023
@loaynaser3
Copy link
Contributor

@yonahd have a look at this commit
may be helpful for this issue |output example:

Kubernetes_Orphaned_Resources{kind="Service",namespace="okteto",resourceName="rafiki"} 0
Kubernetes_Orphaned_Resources{kind="Secret",namespace="prometheus",resourceName="grafana-tls-certificate"} 0

regarding adding the age of the resource still not available

@yonahd
Copy link
Owner

yonahd commented Sep 5, 2023

Thanks!
This feature doesn't make so much sense as this is just a cli tool at this point.
This feature will be useful down the road when we support running this as a server. But for now this is in the backlog.

@yonahd yonahd added enhancement New feature or request and removed Backlog Not for execution now labels Sep 12, 2023
@yonahd
Copy link
Owner

yonahd commented Sep 17, 2023

@loaynaser3 this is now more relevant.
Would you like it assigned to you?

@Yuni-sa
Copy link
Contributor

Yuni-sa commented Sep 18, 2023

I can also help with this if needed, would be better to start working on it after #78 is merged.
we can also have two ways of implementing this, one with a deployment with an open metrics endpoint and one with a cronjob pushing to a prometheus Pushgateway.

@yonahd
Copy link
Owner

yonahd commented Sep 18, 2023

Thanks @Yuni-sa!
I'll create a release(with a docker image) and then we can move forward with the Helm chart.

Regarding the metrics I don't see a reason to complicate with the push gateway. We can have the deployment offer metrics or/and slack messages, While the cron will only offer slack.

@loaynaser3
Copy link
Contributor

@loaynaser3 this is now more relevant. Would you like it assigned to you?

yea sure, you can assign it

@yonahd
Copy link
Owner

yonahd commented Sep 20, 2023

@loaynaser3 this is now more relevant. Would you like it assigned to you?

yea sure, you can assign it

Assigned. I beleive @Yuni-sa can assist or take it if you need

@yonahd yonahd added this to the v0.3.0 milestone Sep 20, 2023
@yonahd yonahd linked a pull request Sep 24, 2023 that will close this issue
@yonahd yonahd closed this as completed in #87 Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants