| name | description |
|---|---|
freenet-telemetry-monitor |
Access and analyze Freenet peer telemetry from the central OpenTelemetry collector on nova.locut.us. This skill should be used when debugging network issues, analyzing peer behavior, investigating operation failures, or monitoring network health across the Freenet network. Invoke when the user asks about network telemetry, peer events, operation traces, or needs to debug issues like LEDBAT death spiral, connection problems, or contract operation failures. |
This skill provides access to the centralized Freenet telemetry system for debugging network issues and monitoring peer behavior.
Freenet peers send operation events to a central OpenTelemetry collector. This enables debugging distributed issues by correlating events across multiple peers.
- Host: nova.locut.us (5.9.111.215)
- OTLP/HTTP endpoint: port 4318 (used by peers)
- Health check: port 13133
- Service:
freenet-telemetry.service(systemd) - Log directory:
/mnt/media/freenet-telemetry/(primary, where otel collector writes) - Legacy log directory:
/var/log/freenet-telemetry/(stale — no longer written to since config change)
curl http://5.9.111.215:13133/healthNote: If running on nova already, use local commands. Otherwise use SSH.
Log files are owned by freenet user/group with 640 permissions. Members of the freenet group (ian, nacho) can read them directly:
# List log files (on nova)
ls -la /mnt/media/freenet-telemetry/
# View recent logs (logs.jsonl is the main file)
tail -100 /mnt/media/freenet-telemetry/logs.jsonl
# If accessing remotely via SSH:
ssh nova "tail -100 /mnt/media/freenet-telemetry/logs.jsonl"Logs are in OTLP JSON Lines format. Each line is a batch of log records with this structure:
{
"resourceLogs": [{
"resource": {"attributes": [{"key": "service.name", "value": {"stringValue": "freenet-peer"}}]},
"scopeLogs": [{
"scope": {"name": "freenet.telemetry"},
"logRecords": [
{
"timeUnixNano": 1735500000000000000,
"body": {"stringValue": "{...event_data...}"},
"attributes": [
{"key": "peer_id", "value": {"stringValue": "4abc123..."}},
{"key": "transaction_id", "value": {"stringValue": "01ABC..."}},
{"key": "event_type", "value": {"stringValue": "put_request"}}
]
}
]
}]
}]
}connect- Peer connection events (start_connection, connected, finished)disconnect- Peer disconnection
-
put_request- PUT operation initiated -
put_success- PUT completed successfully -
put_broadcast_emitted- PUT broadcast sent to subscribers -
put_broadcast_received- PUT broadcast received -
get_success- GET operation completed -
update_request- UPDATE operation initiated -
update_success- UPDATE completed successfully -
update_broadcast_emitted- UPDATE broadcast sent -
update_broadcast_received- UPDATE broadcast received -
subscribed- Subscription registered
timeout- Operation timed outroute- Routing eventsignored- Ignored events
ssh nova "cat /mnt/media/freenet-telemetry/logs.jsonl | jq -c '.resourceLogs[].scopeLogs[].logRecords[] | select(.attributes[] | select(.key==\"transaction_id\" and .value.stringValue==\"01ABC123...\"))'"ssh nova "cat /mnt/media/freenet-telemetry/logs.jsonl | jq -r '.resourceLogs[].scopeLogs[].logRecords[].attributes[] | select(.key==\"event_type\") | .value.stringValue' | sort | uniq -c | sort -rn"ssh nova "cat /mnt/media/freenet-telemetry/logs.jsonl | jq -c '.resourceLogs[].scopeLogs[].logRecords[] | select(.attributes[] | select(.key==\"peer_id\" and (.value.stringValue | contains(\"4abc\"))))'"ssh nova "grep '\"event_type\":\"timeout\"' /mnt/media/freenet-telemetry/logs.jsonl | jq ."# Get events from last 10 minutes (adjust timestamp calculation)
ssh nova "cat /mnt/media/freenet-telemetry/logs.jsonl | jq -c '.resourceLogs[].scopeLogs[].logRecords[] | select(.timeUnixNano > (now * 1000000000 - 600000000000))'"To diagnose stuck operations, look for request events without corresponding success events by transaction ID.
A convenience script is provided for common queries:
# Run the analysis script
/home/ian/.claude/skills/freenet-telemetry-monitor/scripts/analyze-telemetry.sh <command> [args]
# Commands:
# health - Check server health
# recent [N] - Show last N events (default 20)
# count - Count events by type
# tx <id> - Find events for transaction ID
# peer <prefix> - Find events for peer ID prefix
# timeouts - List timeout eventsThe telemetry log accumulates ALL events since collection started. When analyzing network state, you MUST filter to recent data or you will get wildly misleading results.
# WRONG - analyzes ALL historical data (could show 1000+ "peers" that are long gone)
ssh nova "cat /mnt/media/freenet-telemetry/logs.jsonl | grep 'some_contract'"
# RIGHT - filter to recent data first
ssh nova "tail -5000 /mnt/media/freenet-telemetry/logs.jsonl | grep 'some_contract'"-
Always determine current network size first: Query recent events to find how many peers are CURRENTLY active (seen in last 10-15 minutes)
-
Filter by timestamp: Events have a
timestampfield in the body. Filter to recent timeframes:import time now = time.time() if now - event_timestamp < 3600: # Last hour only process(event)
-
Use
tailnotcat: Start withtail -Nto get recent logs, not the full historical file -
Validate peer counts: Freenet typically has 10-25 active peers. If your analysis shows hundreds or thousands of peers, you're looking at cumulative historical data, not current state.
# Find currently active peers (last 10 minutes)
ssh nova "tail -5000 /mnt/media/freenet-telemetry/logs.jsonl" | python3 -c "
import json, sys, time
peers = {}
now = time.time()
for line in sys.stdin:
# ... parse and filter to now - timestamp < 600
"- Get the transaction ID from peer logs or error messages
- Query telemetry for all events with that transaction ID
- Trace the operation path: request -> forwarding -> success/failure
- Check for timeouts or missing response events
- Filter for connect/disconnect events
- Look for patterns: rapid connect/disconnect cycles, specific peer failures
- Correlate with LEDBAT or transport layer issues
- Find the initial put_request event
- Trace broadcast_emitted and broadcast_received events
- Verify the subscription tree is properly receiving updates
- Check for missing nodes in the broadcast chain
Telemetry includes:
- Peer addresses (public info - needed for debugging)
- Contract keys (not contract content)
- Operation timing
Telemetry does NOT include:
- Contract state/delta content
- Private keys or addresses
- freenet-telemetry-dashboard: Web dashboard at nova.locut.us:3133 for visual real-time monitoring. Use this for interactive exploration, topology visualization, and time-travel through events. This skill (telemetry-monitor) is for command-line access to raw logs.
- freenet-diagnostic-reports: Handle user diagnostic reports from
freenet service report. Different data source (user-submitted reports vs. network telemetry).