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

Support for application-specific metrics tracking #1220

Open
Tracked by #683
devdattakulkarni opened this issue Apr 16, 2024 · 2 comments
Open
Tracked by #683

Support for application-specific metrics tracking #1220

devdattakulkarni opened this issue Apr 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@devdattakulkarni
Copy link
Contributor

devdattakulkarni commented Apr 16, 2024

Currently, KubePlus tracks the following metrics by default: CPU, memory, ingress network, egress network, and storage. We should support the ability to track application-specific metrics through ResourceMonitor CRD. The assumption here will be that the application exposes such metrics at some endpoint that KubePlus is able to scrape and surface out for ingesting into Prometheus.

@devdattakulkarni devdattakulkarni mentioned this issue Apr 16, 2024
6 tasks
@devdattakulkarni
Copy link
Contributor Author

The changes would be to following:

  • Adding a field to ResourceMonitor to define the application endpoint.
  • Updating the kubectl-metrics plugin to query this endpoint for the input Kind/Instance, and surface it in the output.

To test this functionality we will need to create an application that collects some metrics and exposes them on such an endpoint.

@devdattakulkarni devdattakulkarni added the enhancement New feature or request label Apr 16, 2024
@devdattakulkarni devdattakulkarni changed the title Support for application-specific metrics tracking. Support for application-specific metrics tracking Apr 16, 2024
@devdattakulkarni devdattakulkarni changed the title Support for application-specific metrics tracking Add support for application-specific metrics tracking Apr 16, 2024
@devdattakulkarni devdattakulkarni changed the title Add support for application-specific metrics tracking Support for application-specific metrics tracking May 14, 2024
@devdattakulkarni
Copy link
Contributor Author

The ResourceMonitor spec looks like this:
resmonitor: apiVersion: workflows.kubeplus/v1alpha1 kind: ResourceMonitor metadata: name: hello-world-service-monitor spec: resource: kind: HelloWorldService group: platformapi.kubeplus version: v1alpha1 # This attribute indicates that Pods that are reachable through all the relationships should be used # as part of calculating the monitoring statistics. monitorRelationships: all

We can add an endpoints array to it, as follows:

resmonitor: apiVersion: workflows.kubeplus/v1alpha1 kind: ResourceMonitor metadata: name: hello-world-service-monitor spec: resource: kind: HelloWorldService group: platformapi.kubeplus version: v1alpha1 # This attribute indicates that Pods that are reachable through all the relationships should be used # as part of calculating the monitoring statistics. monitorRelationships: all app_endpoints: []

The app_endpoints will need to be accessible on the app_urls for every app instance.

kubectl metrics plugin can check if app_endpoints have been defined for the ResourceMonitor object. If there is, then it will need to get the app's url and then invoke the endpoints to get the app-specific metrics.

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

No branches or pull requests

1 participant