nudgebee / nudgebee/k8s-agent

Add VictoriaMetrics / Grafana Mimir support to the Prometheus backend

Open
#476 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Go
Stars
1
Forks
0
Avg merge
14h 57m
Merged PRs (30d)
32

Description

VictoriaMetrics and Grafana Mimir both speak the Prometheus query API, but with small differences (URL base path and multi-tenancy headers such as `AccountID`/`X-Scope-OrgID`). Today the agent's Prometheus backend assumes vanilla Prometheus, so users running VM or Mimir can't point the agent at them cleanly.

### Goal
Make the existing Prometheus observability backend work against VictoriaMetrics and Mimir, either via config knobs on the existing client or a thin backend variant.

### Scope
- Support a configurable base path / URL prefix (e.g. VM's `/select/0/prometheus`, Mimir's `/prometheus`).
- Support an optional tenant header (`X-Scope-OrgID` for Mimir, `AccountID`/tenant for VM).
- Surface these as `values.yaml` config on the runner.
- Unit test covering the path + header difference using `httptest.Server`.
- Add a `values.yaml` example and a short docs note.

### Pointers
- `runner/pkg/observability/prometheus/`
- `runner/docs/development.md` → "Adding a new action"
- `runner/docs/configuration.md` for the env-var surface

### Acceptance
- `make test` passes with new coverage for the tenant-header / base-path handling.
- A documented config example lets a user target VM or Mimir without code changes.

Contributor guide

Open the contributing guide

Research direction

Start in runner/pkg/observability/prometheus/ and review the existing backend configuration, then read runner/docs/configuration.md for the env-var surface. Add the requested values.yaml configuration and unit coverage with httptest.Server for base paths and tenant headers, plus the documented example and docs note. Run make test; done means VM or Mimir can be targeted without code changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, grafana
Domain
backend, documentation, observability, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.