Dieser Commit ist enthalten in:
2025-06-21 22:57:18 +02:00
Ursprung 0a994fa648
Commit 75c2f0dfe4

Datei anzeigen

@@ -93,7 +93,7 @@ def unified_monitoring():
COUNT(*) as total_validations,
COUNT(DISTINCT hardware_id) as unique_devices,
COUNT(DISTINCT ip_address) as unique_ips,
AVG(CASE WHEN response_time IS NOT NULL THEN response_time ELSE 0 END) as avg_response_time
0 as avg_response_time
FROM license_heartbeats
WHERE timestamp > NOW() - INTERVAL '5 minutes'
""")
@@ -239,12 +239,11 @@ def unified_monitoring():
cur.execute("""
SELECT
DATE_TRUNC('minute', timestamp) as minute,
AVG(response_time) as avg_response_time,
MAX(response_time) as max_response_time,
0 as avg_response_time,
0 as max_response_time,
COUNT(*) as request_count
FROM license_heartbeats
WHERE timestamp > NOW() - INTERVAL '30 minutes'
AND response_time IS NOT NULL
GROUP BY minute
ORDER BY minute DESC
""")
@@ -282,7 +281,7 @@ def unified_monitoring():
except Exception as e:
logger.error(f"Error in unified monitoring: {str(e)}")
return render_template('error.html',
error_message='Fehler beim Laden des Monitorings',
error='Fehler beim Laden des Monitorings',
details=str(e))
@monitoring_bp.route('/live-dashboard')
@@ -382,7 +381,7 @@ def analytics():
except Exception as e:
logger.error(f"Error in analytics: {str(e)}")
return render_template('error.html',
error_message='Fehler beim Laden der Analytics',
error='Fehler beim Laden der Analytics',
details=str(e))