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
feat(centraldashboard): Displaying metrics from Prometheus #7116
Merged
google-oss-prow
merged 3 commits into
kubeflow:master
from
axel7083:feature/prometheus-metrics-service
Jun 13, 2023
Merged
feat(centraldashboard): Displaying metrics from Prometheus #7116
google-oss-prow
merged 3 commits into
kubeflow:master
from
axel7083:feature/prometheus-metrics-service
Jun 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adding /api/metrics endpoint for `resourceChartsLink` and `resourceChartsLinkText` field. Adding PrometheusMetricsService class implementing MetricsService Adding `prometheus-query` package ## MetricsService Adding `getChartsLink(): MetricsInfo` to MetricsService. It will be used to send client the info about the metrics (resourceChartsLink and resourceChartsLinkText). ## env - PROMETHEUS_URL: url for prometheus query - METRICS_DASHBOARD: if defined, will add a button under graphs to go to the url defined ## Prometheus query - getNodeCpuUtilization: `sum(rate(node_cpu_seconds_total[5m])) by (instance)` - getPodCpuUtilization: `sum(rate(container_cpu_usage_seconds_total[5m]))` - getPodMemoryUsage: `sum(container_memory_usage_bytes)` # frontend Adding iron-ajax to `/api/metrics`. Adding `metrics` properties to main-page and dashboard-view. Making footer of `ressource-chart.js` hidden if resourceChartsLink is undefined.
google-oss-prow
bot
requested review from
kimwnasptd,
SachinVarghese and
thesuperzapper
May 2, 2023 12:54
axel7083
changed the title
centraldashboard: Displaying metrics from Prometheus
feat(centraldashboard): Displaying metrics from Prometheus
Jun 8, 2023
Looks great @axel7083! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kimwnasptd The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
tzstoyanov
pushed a commit
to tzstoyanov/kubeflow
that referenced
this pull request
Jun 14, 2023
…7116) * # backend Adding /api/metrics endpoint for `resourceChartsLink` and `resourceChartsLinkText` field. Adding PrometheusMetricsService class implementing MetricsService Adding `prometheus-query` package ## MetricsService Adding `getChartsLink(): MetricsInfo` to MetricsService. It will be used to send client the info about the metrics (resourceChartsLink and resourceChartsLinkText). ## env - PROMETHEUS_URL: url for prometheus query - METRICS_DASHBOARD: if defined, will add a button under graphs to go to the url defined ## Prometheus query - getNodeCpuUtilization: `sum(rate(node_cpu_seconds_total[5m])) by (instance)` - getPodCpuUtilization: `sum(rate(container_cpu_usage_seconds_total[5m]))` - getPodMemoryUsage: `sum(container_memory_usage_bytes)` # frontend Adding iron-ajax to `/api/metrics`. Adding `metrics` properties to main-page and dashboard-view. Making footer of `ressource-chart.js` hidden if resourceChartsLink is undefined. * Fixing package-lock.json * Adding Unit Tests and Improvements
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Through the
MetricsService
1, the central dashboard support showing cluster metrics from the google api. The aim of this PR is to add support for Prometheus.Changes
Backend
resourceChartsLink
andresourceChartsLinkText
field.prometheus-query
packageMetricsService interface
getChartsLink(): MetricsInfo
to MetricsService. It will be used to send client the info about the metrics (resourceChartsLink and resourceChartsLinkText).env
This PR add two environment variable
Prometheus query
The query used for each function specified by the MetricsService interface.
sum(rate(node_cpu_seconds_total[5m])) by (instance)
sum(rate(container_cpu_usage_seconds_total[5m]))
sum(container_memory_usage_bytes)
Frontend
/api/metrics
.metrics
properties to main-page and dashboard-view.ressource-chart.js
hidden if resourceChartsLink is undefined.Issue(s)
The current version does not support authentication with Prometheus. Considering it is private and use Istio in kubeflow.
Footnotes
metrics_service.ts ↩