feat: add Grafana Mimir metrics infrastructure#41
Closed
gsanchietti wants to merge 5 commits intomainfrom
Closed
Conversation
Contributor
|
🔗 Redirect URIs Added to Logto The following redirect URIs have been automatically added to the Logto application configuration: Redirect URIs:
Post-logout redirect URIs:
These will be automatically removed when the PR is closed or merged. |
Contributor
🤖 My API structural change detectedStructural change detailsAdded (4)
Powered by Bump.sh |
ac6a0c7 to
8fc771b
Compare
8fc771b to
9d4c71a
Compare
9d4c71a to
377ad48
Compare
377ad48 to
d4d191b
Compare
d4d191b to
7d47600
Compare
7d47600 to
55956c8
Compare
f4a49d6 to
9a9c621
Compare
- Add Mimir 2-node cluster (memberlist gossip, replication_factor:2)
- Add Grafana dashboard service with sub-path routing (/grafana/)
- Add authenticated metrics proxy endpoint (ANY /api/mimir/*)
- HTTP Basic Auth: system_key + system_secret (no JWT)
- Adds X-Scope-OrgID = organization_id for multi-tenancy
- Streaming proxy (no buffering) for large metric payloads
- Add MIMIR_URL config field (default: http://localhost:9009)
- Update nginx to route /mimir/ -> backend and /grafana/ -> Grafana
- Add mimir/docker-compose.yml for dedicated metrics VM (Server B)
- Remove mimir/grafana from main docker-compose (moved to mimir/)
- Update render.yaml: pserv mimir1+mimir2 (prod+qa), Grafana web service
- Add OpenAPI documentation for /api/mimir/{path} endpoint
- Add user documentation (EN+IT) and operator README
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9a9c621 to
357ce22
Compare
Member
Author
|
Replaced by #42 |
Contributor
|
🗑️ Redirect URIs Removed from Logto The following redirect URIs have been automatically removed from the Logto application configuration: Redirect URIs:
Post-logout redirect URIs:
Cleanup completed for PR #41. |
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
Integrates Grafana Mimir (metrics storage) and Grafana (dashboards) into the MY platform, enabling NethServer/NethSecurity systems to push Prometheus metrics via remote_write with per-organization isolation.
Architecture
Changes
Backend:
backend/methods/mimir.go— wildcard proxy handler (ANY /api/mimir/*): HTTP Basic Auth (system_key + system_secret), Argon2id secret verification, X-Scope-OrgID injection, streaming reverse proxy with load balancingMetrics stack:
Configuration (already in main):
proxy/nginx.conf+nginx.conf.local—/mimir/(→ backend,proxy_request_buffering off) and/grafana/location blocksTesting
Check for readiness:
Write:
Query:
Grafana dashboard: https://my-grafana-qa.onrender.com/grafana
TODO
Possibile improvements:
NethServer 8 integration
Changes for ns8-metrics:
NethSecurity integration
It requires telegraf binary with http and prometheusremotewrite plugins.
Config for telegraph:
🚀 Testing Environment
To trigger a fresh deployment of all services in the PR preview environment, comment:
Automatic PR environments:
✅ Merge Checklist
Code Quality:
Builds: