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 metrics relation #261

Merged
merged 5 commits into from
Aug 7, 2024
Merged

Add metrics relation #261

merged 5 commits into from
Aug 7, 2024

Conversation

rgildein
Copy link
Contributor

@rgildein rgildein commented Aug 5, 2024

Expose metrics port and provide metrics-endpoint relation. With these changes, charm can be monitored with Prometheus.

How it can be tested:

$ tox -e integration -- --model kubeflow --keep-models
$ juju exec --unit grafana-agent-k8s/0 -- curl localhost:12345/agent/api/v1/metrics/targets | jq '.data.[] | select(.labels.juju_charm == "kserve-controller") | .endpoint'
# using endpoint obtained from previous command
$ juju exec --unit grafana-agent-k8s/0 -- curl http://10.1.23.229:8080/metrics
# HELP certwatcher_read_certificate_errors_total Total number of certificate read errors
# TYPE certwatcher_read_certificate_errors_total counter
certwatcher_read_certificate_errors_total 0
# HELP certwatcher_read_certificate_total Total number of certificate reads
# TYPE certwatcher_read_certificate_total counter
certwatcher_read_certificate_total 1
...
workqueue_work_duration_seconds_count{name="inferenceservice"} 385
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="1e-08"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="1e-07"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="1e-06"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="9.999999999999999e-06"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="9.999999999999999e-05"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="0.001"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="0.01"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="0.1"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="1"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="10"} 0
workqueue_work_duration_seconds_bucket{name="trainedmodel",le="+Inf"} 0
workqueue_work_duration_seconds_sum{name="trainedmodel"} 0
workqueue_work_duration_seconds_count{name="trainedmodel"} 0

Expose metrics port and provide metrics-endpoint relation. With these
changes, charm can be monitored with Prometheus.
@rgildein rgildein added the enhancement New feature or request label Aug 5, 2024
@rgildein rgildein self-assigned this Aug 5, 2024
@rgildein rgildein requested a review from a team as a code owner August 5, 2024 10:25
Copy link
Contributor

@orfeas-k orfeas-k left a comment

Choose a reason for hiding this comment

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

Good job @rgildein !

@rgildein rgildein merged commit cde23b0 into main Aug 7, 2024
7 checks passed
@rgildein rgildein deleted the feat/KF-6005/metrics branch August 7, 2024 07:03
rgildein added a commit that referenced this pull request Aug 15, 2024
Expose metrics port and provide metrics-endpoint relation. With these
changes, charm can be monitored with Prometheus.
rgildein added a commit that referenced this pull request Aug 22, 2024
Expose metrics port and provide metrics-endpoint relation. With these
changes, charm can be monitored with Prometheus.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants