upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-04 15:17:04 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-04 15:24:19 +0000
commitfd0c87c787d0626b3546fa571541c9c809711821 (patch)
tree934f20d973127f380b807d2bd44b25c197cf349c /README.md
parent762cd8e815e797f173f541795de774fbbf978fc3 (diff)
add prometheus metrics
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 20 insertions, 2 deletions
diff --git a/README.md b/README.md
index 980526c..b63c5b1 100644
--- a/README.md
+++ b/README.md
@@ -94,9 +94,27 @@ Why this is useful:
94 94
95dedupe git data = shared object database or (GIT_ALTERNATE_OBJECT_DIRECTORIES or .git/objects/info/alternates) 95dedupe git data = shared object database or (GIT_ALTERNATE_OBJECT_DIRECTORIES or .git/objects/info/alternates)
96 96
97### Logging 97### Monitoring
98 98
99See [docs/explanation/monitoring-strategy.md](docs/monitoring-strategy.md). Note: this needs refinement. 99ngit-grasp exposes Prometheus metrics at `/metrics` for connection tracking, Git operations, and Nostr events.
100
101**Configuration Options:**
102
103| Option | CLI Flag | Environment Variable | Default |
104|--------|----------|---------------------|---------|
105| Metrics enabled | `--metrics-enabled` | `NGIT_METRICS_ENABLED` | `true` |
106| Connection abuse threshold | `--metrics-connection-per-ip-abuse-threshold` | `NGIT_METRICS_CONNECTION_PER_IP_ABUSE_THRESHOLD` | `10` |
107| Top N repos | `--metrics-top-n-repos` | `NGIT_METRICS_TOP_N_REPOS` | `10` |
108
109**Key Metrics:**
110- WebSocket connections (active, unique IPs, flagged abusers)
111- Git operations (clone/fetch/push rates, bandwidth, authorization results)
112- Nostr events (received, stored, rejected by kind)
113- Top N repositories by bandwidth
114
115**Privacy:** IP addresses are never exposed in metrics - only aggregate counts.
116
117See [Monitoring Overview](docs/explanation/monitoring.md) and [Prometheus Setup Guide](docs/how-to/prometheus-setup.md) for deployment.
100 118
101### Delete Events 119### Delete Events
102 120