mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-18 08:31:55 +08:00
- Added new performance monitoring settings in the configuration, including maximum requests per minute and data transfer limits. - Introduced validation parameters for metrics, ensuring data integrity and consistency checks during collection. - Refactored the metrics collector to streamline initialization and improve error handling. - Removed deprecated database-related code and optimized metrics saving processes. - Enhanced historical data management with regular clean-up routines to maintain performance. These changes improve the configurability and reliability of the metrics system, ensuring accurate data handling and enhanced monitoring capabilities.
70 lines
1.6 KiB
JSON
70 lines
1.6 KiB
JSON
{
|
|
"MAP": {
|
|
"/path1": {
|
|
"DefaultTarget": "https://path1.com/path/path/path",
|
|
"ExtensionMap": {
|
|
"jpg,png,avif": "https://path1-img.com/path/path/path",
|
|
"mp4,webm": "https://path1-video.com/path/path/path"
|
|
},
|
|
"SizeThreshold": 204800
|
|
},
|
|
"/path2": "https://path2.com",
|
|
"/path3": {
|
|
"DefaultTarget": "https://path3.com",
|
|
"SizeThreshold": 512000
|
|
}
|
|
},
|
|
"Compression": {
|
|
"Gzip": {
|
|
"Enabled": false,
|
|
"Level": 6
|
|
},
|
|
"Brotli": {
|
|
"Enabled": false,
|
|
"Level": 4
|
|
}
|
|
},
|
|
"FixedPaths": [
|
|
{
|
|
"Path": "/cdnjs",
|
|
"TargetHost": "cdnjs.cloudflare.com",
|
|
"TargetURL": "https://cdnjs.cloudflare.com"
|
|
},
|
|
{
|
|
"Path": "/jsdelivr",
|
|
"TargetHost": "cdn.jsdelivr.net",
|
|
"TargetURL": "https://cdn.jsdelivr.net"
|
|
}
|
|
],
|
|
"Metrics": {
|
|
"Password": "admin123",
|
|
"TokenExpiry": 86400,
|
|
"FeishuWebhook": "https://open.feishu.cn/open-apis/bot/v2/hook/****",
|
|
"Alert": {
|
|
"WindowSize": 12,
|
|
"WindowInterval": "5m",
|
|
"DedupeWindow": "15m",
|
|
"MinRequests": 10,
|
|
"ErrorRate": 0.8,
|
|
"AlertInterval": "24h"
|
|
},
|
|
"Latency": {
|
|
"SmallFileSize": 1048576,
|
|
"MediumFileSize": 10485760,
|
|
"LargeFileSize": 104857600,
|
|
"SmallLatency": "3s",
|
|
"MediumLatency": "8s",
|
|
"LargeLatency": "30s",
|
|
"HugeLatency": "300s"
|
|
},
|
|
"Performance": {
|
|
"MaxRequestsPerMinute": 1000,
|
|
"MaxBytesPerMinute": 104857600,
|
|
"MaxSaveInterval": "15m"
|
|
},
|
|
"Validation": {
|
|
"max_error_rate": 0.8,
|
|
"max_data_deviation": 0.01
|
|
}
|
|
}
|
|
} |