sync
This commit is contained in:
@@ -31,6 +31,39 @@ The following state variables are persisted to Consul:
|
||||
#### Stability Tracking (`stability/`)
|
||||
- `start_time`: When stability timer started (for 1-hour requirement)
|
||||
|
||||
#### VPN State (`vpn/`)
|
||||
- `vpn_status`: Current VPN status ('running', 'stopped', 'error', 'unknown')
|
||||
- `last_vpn_status_change`: Timestamp of last VPN status change
|
||||
- `public_ip`: Current public IP address
|
||||
- `last_public_ip_change`: Timestamp of last public IP change
|
||||
- `public_ip_details`: Geographic and organizational details about the public IP
|
||||
|
||||
## VPN Monitoring Features
|
||||
|
||||
The connection monitor now includes comprehensive VPN server monitoring with the following capabilities:
|
||||
|
||||
### VPN Status Monitoring
|
||||
- **Endpoint**: `http://192.168.4.36:8000/v1/vpn/status`
|
||||
- **Checks**: VPN service status (returns `{"status":"running"}`)
|
||||
- **Frequency**: Every monitoring cycle (default: 30 seconds)
|
||||
- **Error Handling**: Retry logic with exponential backoff
|
||||
- **State Persistence**: VPN status is tracked in Consul
|
||||
|
||||
### Public IP Monitoring
|
||||
- **Endpoint**: `http://192.168.4.36:8000/v1/publicip/ip`
|
||||
- **Checks**: Public IP address and geographic information
|
||||
- **Features**:
|
||||
- IP change detection with warning logs
|
||||
- Geographic location tracking (city, region, country)
|
||||
- Organization/ISP information
|
||||
- Automatic state persistence
|
||||
|
||||
### Integration Points
|
||||
- VPN status is checked during each monitoring cycle
|
||||
- Public IP changes trigger warning-level logs
|
||||
- All VPN/IP data is included in debug metrics
|
||||
- State is persisted to Consul for continuity
|
||||
|
||||
## Implementation Details
|
||||
|
||||
### State Persistence Points
|
||||
|
||||
166319
connection_monitor.log
166319
connection_monitor.log
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user