Security (Desktop Wallet): - Implement BIP39 mnemonic generation with cryptographic RNG - Add Argon2id password-based key derivation (64MB, 3 iterations) - Add ChaCha20-Poly1305 authenticated encryption for seed storage - Add mnemonic auto-clear (60s timeout) and clipboard auto-clear (30s) - Add sanitized error logging to prevent credential leaks - Strengthen CSP with object-src, base-uri, form-action, frame-ancestors - Clear sensitive state on component unmount Explorer (Gas Estimator): - Add Gas Estimation page with from/to/amount/data inputs - Add bech32 address validation (synor1/tsynor1 prefix) - Add BigInt-based amount parsing to avoid floating point errors - Add production guard for mock mode (cannot enable in prod builds) Monitoring (30-day Testnet): - Add Prometheus config with 30-day retention - Add comprehensive alert rules for node health, consensus, network, mempool - Add Alertmanager with severity-based routing and inhibition rules - Add Grafana with auto-provisioned datasource and dashboard - Add Synor testnet dashboard with uptime SLA tracking Docker: - Update docker-compose.testnet.yml with monitoring profile - Fix node-exporter for macOS Docker Desktop compatibility - Change Grafana port to 3001 to avoid conflict
102 lines
3.3 KiB
YAML
102 lines
3.3 KiB
YAML
# Prometheus Configuration for Synor Testnet Monitoring
|
|
# 30-day retention configured in docker-compose
|
|
|
|
global:
|
|
scrape_interval: 15s
|
|
evaluation_interval: 15s
|
|
external_labels:
|
|
cluster: 'synor-testnet'
|
|
environment: 'testnet'
|
|
|
|
# Alertmanager configuration
|
|
alerting:
|
|
alertmanagers:
|
|
- static_configs:
|
|
- targets:
|
|
- alertmanager:9093
|
|
|
|
# Load alert rules
|
|
rule_files:
|
|
- /etc/prometheus/alerts.yml
|
|
|
|
# Scrape configurations
|
|
scrape_configs:
|
|
# ==========================================================================
|
|
# Prometheus Self-Monitoring
|
|
# ==========================================================================
|
|
- job_name: 'prometheus'
|
|
static_configs:
|
|
- targets: ['localhost:9090']
|
|
labels:
|
|
service: 'prometheus'
|
|
|
|
# ==========================================================================
|
|
# Synor Seed Nodes
|
|
# ==========================================================================
|
|
- job_name: 'synor-nodes'
|
|
scrape_interval: 10s
|
|
static_configs:
|
|
- targets:
|
|
- 'seed1:17110' # Seed 1 RPC (metrics endpoint assumed at /metrics)
|
|
- 'seed2:17110' # Seed 2
|
|
- 'seed3:17110' # Seed 3
|
|
labels:
|
|
network: 'testnet'
|
|
metrics_path: /metrics
|
|
# If no /metrics endpoint, use blackbox exporter pattern below
|
|
|
|
# ==========================================================================
|
|
# Synor Node Health Checks (via HTTP probe)
|
|
# ==========================================================================
|
|
- job_name: 'synor-health'
|
|
scrape_interval: 30s
|
|
metrics_path: /probe
|
|
params:
|
|
module: [http_2xx]
|
|
static_configs:
|
|
- targets:
|
|
- 'http://seed1:17110/health'
|
|
- 'http://seed2:17110/health'
|
|
- 'http://seed3:17110/health'
|
|
labels:
|
|
network: 'testnet'
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
target_label: __param_target
|
|
- source_labels: [__param_target]
|
|
target_label: instance
|
|
- target_label: __address__
|
|
replacement: blackbox-exporter:9115 # If using blackbox exporter
|
|
|
|
# ==========================================================================
|
|
# RPC Endpoint Monitoring (custom metrics via script)
|
|
# ==========================================================================
|
|
- job_name: 'synor-rpc-stats'
|
|
scrape_interval: 30s
|
|
static_configs:
|
|
- targets:
|
|
- 'seed1:17110'
|
|
- 'seed2:17110'
|
|
- 'seed3:17110'
|
|
metrics_path: /api/v1/stats
|
|
# Note: This assumes the /stats endpoint returns Prometheus-compatible format
|
|
# If not, we'll use a custom exporter
|
|
|
|
# ==========================================================================
|
|
# Node Exporter (System Metrics)
|
|
# ==========================================================================
|
|
- job_name: 'node-exporter'
|
|
static_configs:
|
|
- targets: ['node-exporter:9100']
|
|
labels:
|
|
service: 'node-exporter'
|
|
|
|
# ==========================================================================
|
|
# Explorer API
|
|
# ==========================================================================
|
|
- job_name: 'explorer-api'
|
|
static_configs:
|
|
- targets: ['explorer-api:3000']
|
|
labels:
|
|
service: 'explorer'
|
|
metrics_path: /health
|