Repository navigation
feat: turn Prometheus and Grafana on from the web app - #337
Merged
Merged
Conversation
A "Charts and history" switch on System health and in Settings → Telemetry asks the host upgrade agent to add or remove the monitoring compose profile and start or stop Prometheus, node-exporter and Grafana. Turning it on also turns /metrics on with a generated scrape token, which Prometheus reads from the control folder, and links System health to Grafana on this host. API: GET/PUT /admin/monitoring; MCP: monitoring, set_monitoring. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XCh396xzDRUrSuH1xohcXR
…anions Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XCh396xzDRUrSuH1xohcXR
…-kxit86 # Conflicts: # threat-model.yaml
…-kxit86 # Conflicts: # fastapi_backend/app/api/mcp_tools.py # fastapi_backend/tests/api/test_mcp.py
17 of 19 tasks
adeelahmad
added a commit
that referenced
this pull request
Oct 11, 2026
…349) "Stay private and safe" now covers flagging instruction-like text (patterns or the optional local classifier, #329, #347), asking before the browser acts on what the assistant wrote (#333), breaking up links in chat-room answers (#338), the archive as data over MCP (#343) and the audit log of what was caught (#344). "See what it costs" adds the overall budget asked for in setup (#281). "In progress" drops what merged and adds #337, #341 and #346. Claude-Session: https://claude.ai/code/session_01HDx7PPUauyjMn1LZs8JAsS Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
adeelahmad
added a commit
that referenced
this pull request
Oct 11, 2026
…monitoring switch as built (#351) "Ask" names the built-in Telegram bot (#293) and Slack app (#287); "Connect your agents" adds mounting the graph's files read-only over S3, WebDAV, NFS or SMB (#324, #295, #305) and copying the MCP address from the account menu (#340); "Watch it run" says one switch in the web app starts Prometheus and Grafana (#337); "Light by default" adds the cloud model presets (#334). The docs index gains the NFS and SMB pages, and "In progress" keeps only open PRs. Claude-Session: https://claude.ai/code/session_01HDx7PPUauyjMn1LZs8JAsS Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
This file contains hidden or 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
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.
Description
Before: running Prometheus, node-exporter and Grafana meant editing
.env(COMPOSE_PROFILES=monitoring, a scrape token, the Grafana address) and runningdocker composein a terminal.After: one Charts and history switch, on Admin → System health and in Settings → Telemetry → Prometheus. Lens turns
/metricson, generates a scrape token if there is none, and the host upgrade agent addsmonitoringtoCOMPOSE_PROFILESin.envand starts the three containers. The page shows how it is going, then links to Grafana on the host you opened Lens at (:3001, or the port inLENS_GRAFANA_PORT). Off stops and removes them, and turns/metricsoff again if this switch was what turned it on.How: the request goes in
.lens-control/inbox/upgradewithaction=services, because that is the file every installed agent already watches, so existing installs need no new systemd or launchd unit.lens-upgrade.shhandles onlymonitoring=on|off(it never installs anything for that request) and writesservices-statusandservices.log. Prometheus reads the token from.lens-control/prometheus-token(kept in step with Settings), or fromLENS_PROMETHEUS_TOKENwhen that is set. Without an agent, the switch shows the one line to run on the machine.API:
GET/PUT /api/v1/admin/monitoring. MCP:monitoring,set_monitoring.Motivation and Context
Adeel's rule: no terminal and no
.envediting; every setting lives in the web app.Types of changes
!in the title)Checklist:
tests/api/test_monitoring.py, which also runs the agent script against a stand-in docker; MCP test;__tests__/monitoring-switch.test.ts).docs/accordingly (prometheus.md,updates.md;mkdocs build --strictclean).Done questions (AGENTS.md)
.envedit.app_service:monitoringrow is created on first use.make openapi) updated.🤖 Generated with Claude Code
https://claude.ai/code/session_01XCh396xzDRUrSuH1xohcXR
Generated by Claude Code