Skip to content

Add metrics explorer sub-command - #13

Merged
josefkarasek merged 2 commits into
mainfrom
metrics-explorer
Aug 11, 2026
Merged

josefkarasek merged 2 commits into
mainfrom
metrics-explorer

Conversation

@jkremser

@jkremser jkremser commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

TL;DR

Add the new kedify metrics sub-command for interactively exploring Prometheus metrics and generating autoscaling resources.

Highlights

  • Discover Prometheus services from Kubernetes or connect directly using --server.
  • Support automated discovery and port-forwarding with --disco.
  • Support custom Kubernetes configuration through --context and --kubeconfig.
  • Discover Grafana Mimir gateways using their Kubernetes labels.
    • Route Mimir requests through /prometheus.
    • Include X-Scope-OrgID: kedify-agent with every Mimir API request.
  • Filter metrics interactively or prefill the filter using --filter.
  • Supply PromQL directly through --query.
  • Control visualization using --visualize and --horizon.
  • Visualize 6-hour, 1-day, 3-day, 1-week, and 1-month ranges with appropriate query resolutions.
  • Render cyan ASCII graphs and display memory metrics in MiB.

Resource generation and safety

  • Generate ScaledObject, MetricPredictor, or both.
  • Print generated YAML by default.
  • Allow skipping the YAML editing prompt with --print.
  • Before creating resources:
    • Show the complete YAML.
    • Show the active Kubernetes context and target namespace.
    • Require an explicit confirmation that defaults to No.
  • Forward the selected context and kubeconfig to discovery, port-forwarding, and resource creation commands.

Automation options

  • --disco
  • --filter
  • --query
  • --visualize
  • --horizon
  • --print
  • --context
  • --kubeconfig
  • --namespace
  • --server

asciicast

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
@jkremser
jkremser requested a review from a team as a code owner July 28, 2026 15:24
Copilot AI review requested due to automatic review settings July 28, 2026 15:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
Copilot AI review requested due to automatic review settings July 28, 2026 15:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@josefkarasek
josefkarasek merged commit 237e4a7 into main Aug 11, 2026
2 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.

3 participants