|
Download tasks/data/reverse/abdelstark__guts.8876fcf/environment/docs/monitoring.md from Lego-X/ProgramGen: direct link, hf CLI and curl.
- Browser
- Download file 3.7 kB
-
https://huggingface.co/datasets/Lego-X/ProgramGen/resolve/main/tasks/data/reverse/abdelstark__guts.8876fcf/environment/docs/monitoring.md
- Command line
-
hf download hf://datasets/Lego-X/ProgramGen/tasks/data/reverse/abdelstark__guts.8876fcf/environment/docs/monitoring.md
-
curl -L -o monitoring.md https://huggingface.co/datasets/Lego-X/ProgramGen/resolve/main/tasks/data/reverse/abdelstark__guts.8876fcf/environment/docs/monitoring.md
3.7 kB
Monitoring Guide
Set up comprehensive monitoring for Guts nodes.
Overview
Guts nodes expose Prometheus metrics that can be scraped and visualized with Grafana. This guide covers setting up a complete monitoring stack.
Metrics Endpoint
By default, metrics are exposed at http://localhost:9090/metrics:
Available Metrics
HTTP Metrics
| Metric | Type | Description |
|---|---|---|
guts_http_requests_total |
Counter | Total HTTP requests by method, path, status |
guts_http_request_duration_seconds |
Histogram | Request latency distribution |
guts_http_requests_in_flight |
Gauge | Currently processing requests |
guts_http_request_size_bytes |
Histogram | Request body size |
guts_http_response_size_bytes |
Histogram | Response body size |
P2P Metrics
| Metric | Type | Description |
|---|---|---|
guts_p2p_peers_connected |
Gauge | Number of connected peers |
guts_p2p_messages_sent_total |
Counter | Messages sent by type |
guts_p2p_messages_received_total |
Counter | Messages received by type |
guts_p2p_message_latency_seconds |
Histogram | P2P message latency |
guts_p2p_bytes_sent_total |
Counter | Bytes sent |
guts_p2p_bytes_received_total |
Counter | Bytes received |
Storage Metrics
| Metric | Type | Description |
|---|---|---|
guts_storage_objects_total |
Gauge | Objects by type (blob, tree, commit) |
guts_storage_size_bytes |
Gauge | Total storage size |
guts_storage_operation_duration_seconds |
Histogram | Storage operation latency |
guts_storage_cache_hits_total |
Counter | Cache hits |
guts_storage_cache_misses_total |
Counter | Cache misses |
Consensus Metrics
| Metric | Type | Description |
|---|---|---|
guts_consensus_block_height |
Gauge | Current block height |
guts_consensus_validators_total |
Gauge | Number of validators |
guts_consensus_commits_total |
Counter | Total committed blocks |
guts_consensus_proposals_total |
Counter | Blocks proposed |
guts_consensus_round |
Gauge | Current consensus round |
guts_consensus_mempool_size |
Gauge | Pending transactions |
Business Metrics
| Metric | Type | Description |
|---|---|---|
guts_repositories_total |
Gauge | Total repositories |
guts_pull_requests_total |
Gauge | PRs by state |
guts_issues_total |
Gauge | Issues by state |
guts_organizations_total |
Gauge | Organizations |
guts_users_total |
Gauge | Registered users |
Prometheus Setup
Configuration
Create prometheus.yml:
Docker Compose
Kubernetes (Prometheus Operator)
Grafana Dashboards
Dashboard: Node Overview
Import this dashboard for a quick node health overview:
Dashboard: Consensus Health
For validator networks:
Key Queries
Request Performance
P2P Health
Consensus Health
Storage Health
SLO/SLI Definitions
Service Level Indicators
| SLI | Target | Query |
|---|---|---|
| Availability | 99.9% | avg_over_time(up{job="guts-node"}[30d]) |
| Latency (p99) | < 100ms | histogram_quantile(0.99, rate(guts_http_request_duration_seconds_bucket[5m])) |
| Error Rate | < 0.1% | sum(rate(guts_http_requests_total{status=~"5.."}[5m])) / sum(rate(guts_http_requests_total[5m])) |
| Sync Lag | < 1 min | time() - guts_last_block_time |