-
Notifications
You must be signed in to change notification settings - Fork 617
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
cloud-controller-manager metrics port and address is not accessible or documented #912
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@bgagnon I've not been running the in-tree CCM and i have no idea what it exposed in regards to metrics but there's a couple of metrics you can get out of the OpenStack (external) CCM. I think there's room for improvement here, not only as far as the docs go but also code-wise. With code-wise i mean exporting more metrics (if feasible). The OCCM is assigned port I did some local tests in a one of our clusters (
There should actually be two other metrics registered with the OCCM:
They're not in the list above, and i can see that this function: cloud-provider-openstack/pkg/cloudprovider/providers/openstack/openstack_metrics.go Line 50 in a4ac35b
should register these metrics and the init() here:
should've triggered a call to the RegisterMetrics() function. Not sure what's going on there, i'll have to test some in our environments or if someone else have any idea? I can definitely try to bump the docs with information on how to monitor the OCCM.
Hopefully that clears things up a bit, and thanks for noticing! |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen We can see that the metrics code was added in this PR kubernetes/kubernetes#46008 Observing times or incrementing counters were implemented here: The time measurement of the API call was implemented here: Due to volumes related code being removed, these metrics are not present anymore. Metrics only get exposed, if a value exists. Now it would be desirable to create new metrics similar to the implementation that already existed. We propose changing package openstack
import (
"sync"
"k8s.io/component-base/metrics"
"k8s.io/component-base/metrics/legacyregistry"
)
const (
openstackSubsystem = "openstack"
openstackOperationKey = "cloudprovider_openstack_api_request_duration_seconds"
openstackOperationErrorKey = "cloudprovider_openstack_api_request_errors"
)
var (
openstackOperationsLatency = metrics.NewHistogramVec(
&metrics.HistogramOpts{
Subsystem: openstackSubsystem,
Name: openstackOperationKey,
Help: "Latency of openstack api call",
},
[]string{"request"},
)
openstackAPIRequestErrors = metrics.NewCounterVec(
&metrics.CounterOpts{
Subsystem: openstackSubsystem,
Name: openstackOperationErrorKey,
Help: "Cumulative number of openstack Api call errors",
},
[]string{"request"},
)
)
var registerMetrics sync.Once
// RegisterMetrics registers EndpointSlice metrics.
func RegisterMetrics() {
registerMetrics.Do(func() {
legacyregistry.MustRegister(openstackOperationsLatency)
legacyregistry.MustRegister(openstackAPIRequestErrors)
})
} A PR might follow for metrics related to openstack_loadbalancer.go Sean Schneeweiss [email protected], Daimler TSS GmbH, legal info/Impressum |
/reopen |
@seanschneeweiss: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@lingxiankong: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Is this a BUG REPORT or FEATURE REQUEST?: Feature
/kind feature
The binaries affected:
What happened:
I wanted to access the internal metrics of the CCM, just like the in-tree controller-manager which previously served these metrics.
What you expected to happen:
Similar metrics (and more) as the standard controller-manager.
Anything else we need to know?:
It is not clear how to access the Prometheus metrics for the
openstack-cloud-controller-manager
binary. There are no documented flags or port number.The text was updated successfully, but these errors were encountered: