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

fix: add prometheus metric label "k8sgpt" #364

Merged

Conversation

JuHyung-Son
Copy link
Contributor

Closes #363

πŸ“‘ Description

add prometheus metric label to distinguish clusters.

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

β„Ή Additional Information

i set label name as k8sgpt. and its value is k8sgpt.metadata.name. if there is more appropriate label name, please suggest.

example metric

# TYPE k8sgpt_reconcile_error_count counter
k8sgpt_reconcile_error_count{k8sgpt="gangnam1"} 13

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>
@JuHyung-Son JuHyung-Son requested review from a team as code owners March 1, 2024 04:04
@arbreezy
Copy link
Member

arbreezy commented Mar 1, 2024

I am wondering @JuHyung-Son if we have to update also chart's dashboard to include the filtering

AlexsJones
AlexsJones previously approved these changes Mar 1, 2024
@JuHyung-Son
Copy link
Contributor Author

oh yes. it need to be updated.

@JuHyung-Son
Copy link
Contributor Author

i added label on promql. but it needs to be tested.
since operator runs on local, not minikube, prometheus can not scrape new metrics.

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>
@arbreezy
Copy link
Member

arbreezy commented Mar 1, 2024

It's a small change, it's fine I believe lets get it merged

@arbreezy arbreezy merged commit 4deaf1f into k8sgpt-ai:main Mar 1, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Question]: prometheus metric collect by k8sgpt.metadata.name
3 participants