Skip to content

πŸ“– docs: monitoring a hive with Prometheus and Grafana - #15497

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-15440
Oct 29, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-15440

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #15440

Adds an operator page covering metrics enablement (fail-closed /metrics), the monitoring overlay component, metric families, alert runbook anchors, and plain scrape_config without Prometheus Operator; linked from operator-reference and env-vars.

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@onkar717

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: onkar717 <144542684+onkar717@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 29, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15527 πŸ› fix(crux): confine agentsmd.ParseNearest to repoRoot before the first stat same files changelog.d/added-monitoring-docs.md
src/deploy/k8s/deployment.yaml
src/docs/README.md
src/docs/env-vars.md
src/docs/monitoring.md
src/docs/operator-reference.md
#15525 πŸ› fix(test): make TestStartPRRequestWatcher_DispatchesQueuedRequest deterministic same files changelog.d/added-monitoring-docs.md
src/deploy/k8s/deployment.yaml
src/docs/README.md
src/docs/env-vars.md
src/docs/monitoring.md
src/docs/operator-reference.md
#15405 πŸ› fix: require verified signature for email-only hive commit identity match same files changelog.d/added-monitoring-docs.md
src/deploy/k8s/deployment.yaml
src/docs/README.md
src/docs/env-vars.md
src/docs/monitoring.md
src/docs/operator-reference.md
#15509 πŸ› fix(github): ignore cross-repo PRs in closedByPullRequestsReferences same files changelog.d/added-monitoring-docs.md
src/deploy/k8s/deployment.yaml
src/docs/README.md
src/docs/env-vars.md
src/docs/monitoring.md
src/docs/operator-reference.md
#15496 πŸ› fix(stagelabels): bound retention of trust-promotion records in Prune same files changelog.d/added-monitoring-docs.md
src/deploy/k8s/deployment.yaml
src/docs/README.md
src/docs/env-vars.md
src/docs/monitoring.md
src/docs/operator-reference.md
#15499 πŸ› fix: keep merge queue position visible during sweeps same files changelog.d/added-monitoring-docs.md
src/deploy/k8s/deployment.yaml
src/docs/README.md
src/docs/env-vars.md
src/docs/monitoring.md
src/docs/operator-reference.md
#15343 πŸ“– docs: remove duplicate README run routes same files src/docs/README.md
#15516 πŸ“– docs: split the operator reference CONFLICT src/docs/operator-reference.md

@github-actions

Copy link
Copy Markdown
Contributor

Docs map: this PR adds page(s) under src/docs/ that
src/docs/documentation-map.md does not link:

  • monitoring.md

A page missing from the map is one readers do not find. Please add a
line in the section a reader would actually look in, matching the
format of its neighbours.

If the page is indexed from a subdirectory README, or is deliberately
unlisted for now, ignore this. It is a reminder, not a gate; it never
blocks a merge.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) labels Oct 29, 2026
@hivecommons-hive hivecommons-hive Bot added the stage/stalled In its current stage longer than expected label Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 080-awaiting-merge-admission: no activity for 30m0s: merge-train:queued-behind#15405:2/2:0/0:operator-reference.md

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correctness review (read at head 579dc9e).

In-scope β€” monitoring.md "Turning metrics on" does not actually turn metrics on in the k8s deployment. src/docs/monitoring.md:9-18 says to set HIVE_METRICS_ENABLED=1, put HIVE_METRICS_TOKEN in the hive-secrets Secret (kubectl patch secret …) and "roll the hive pod afterwards so the environment is re-read". But src/deploy/k8s/deployment.yaml:161-184 only maps specific keys via secretKeyRef (HIVE_GITHUB_TOKEN, HIVE_DASHBOARD_TOKEN, DASHBOARD_AUTH_TOKEN, …) β€” there is no envFrom, no HIVE_METRICS_TOKEN/HIVE_METRICS_ENABLED entry, and the Secret is otherwise only mounted as files at /secrets (deployment.yaml:190-192, 239-242) which entrypoint.sh never exports as env. metricsToken() reads os.Getenv("HIVE_METRICS_TOKEN") (src/pkg/dashboard/metrics_prometheus.go:33-35), so following the page as written leaves the route unregistered (404) β€” or, if an operator sets HIVE_METRICS_ENABLED some other way, fail-closed 403 forever with the server.go:1615-1616 warning. The page also never says how to set HIVE_METRICS_ENABLED on the k8s Deployment. Fix: add the env: patch operators need (a Kustomize patches: entry adding HIVE_METRICS_ENABLED: "1" and HIVE_METRICS_TOKEN via secretKeyRef {name: hive-secrets, key: HIVE_METRICS_TOKEN}), or wire these two vars into deployment.yaml (optional: true) and keep the Secret-patch recipe.

Advisory (low): monitoring.md:66-72 "Alert reference" is an empty stub, while #15438 already names the three alerts (HiveMetricsDown, HiveCostBurnHigh, HiveStageTransitionAnomalies) and their conditions; pre-seeding those subsections would satisfy the issue's "what each alert means and what to do" item and give #15438 stable runbook_url anchors on day one.

Verified OK against head: 200/401/403/404 table vs metrics_prometheus.go:83-92 + server.go:1613-1618; Service hive, port dashboard/3002 (src/deploy/k8s/service.yaml); metric family names/labels vs metrics_prometheus.go:49-73.

β€” hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

Hive-Fix-Attempt: 1/6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: guide <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 29, 2026
@hivecommons-hive hivecommons-hive Bot removed the stage/stalled In its current stage longer than expected label Oct 29, 2026
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
37b0583

ℹ️ Sentinel notice β€” informational; author is trusted (hive agent), merge is not blocked

Hive flagged this PR (author @hivecommons-hive[bot], head 37b058348d12) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation β€” a maintainer should confirm the change is intended before it merges.

  • sensitive_path β€” changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • src/deploy/k8s/deployment.yaml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive
hivecommons-hive Bot merged commit 9436f04 into v5 Oct 29, 2026
84 of 87 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-15440 branch October 29, 2026 21:27
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#1549737b0583` sha256:76b32fe95f0986d6b7a29dae6c39039c55c12a08036292a134abb08cbcaa93bb β€” download from the dashboard or `hivectl review evidence #15497`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR conflicts-with-open-pr Open PR has a merge conflict with another open PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v6] πŸ“– docs: monitoring a hive with Prometheus and Grafana

0 participants