Memory Management

Manage the Network Guardian's memory systems to adjust anomaly detection sensitivity and rules.

Semantic Memory

Semantic memory stores network topology and baseline metrics for normal operations.

Loading...
Episodic Memory

Episodic memory stores historical events and past incidents to improve correlation and diagnosis.

Loading...
Procedural Memory

Procedural memory stores diagnostic procedures and resolution steps for different types of network issues.

Loading...
Anomaly Detection Rules
60% (Sensitive) 80% 95% (Tolerant)
70% (Sensitive) 85% 95% (Tolerant)
1.5x (Sensitive) 2.5x 5x (Tolerant)
2x (Sensitive) 5x 10x (Tolerant)
Current Detection Logic
# Pseudo-code for anomaly detection

def detect_anomalies(metrics, baselines):
    anomalies = []
    
    for component_id, component_metrics in metrics.items():
        # Get baseline values for this component type
        component_baselines = baselines.get(component_type)
        
        # CPU load check
        if component_metrics.cpu_load > 80:
            anomalies.append({
                "component_id": component_id,
                "metric": "cpu_load",
                "value": component_metrics.cpu_load,
                "baseline": component_baselines.cpu_load,
                "severity": calculate_severity(component_metrics.cpu_load, 80)
            })
            
        # Memory usage check
        if component_metrics.memory_used_percent > 85:
            anomalies.append({
                "component_id": component_id,
                "metric": "memory_used_percent",
                "value": component_metrics.memory_used_percent,
                "baseline": component_baselines.memory_used_percent,
                "severity": calculate_severity(component_metrics.memory_used_percent, 85)
            })
            
        # Latency check (if applicable)
        if hasattr(component_metrics, "latency_ms"):
            if component_metrics.latency_ms > component_baselines.latency_ms * 2.5:
                anomalies.append({
                    "component_id": component_id,
                    "metric": "latency_ms",
                    "value": component_metrics.latency_ms,
                    "baseline": component_baselines.latency_ms,
                    "severity": calculate_severity(
                        component_metrics.latency_ms,
                        component_baselines.latency_ms * 2.5
                    )
                })
                
        # Error rate check (if applicable)
        if hasattr(component_metrics, "error_rate"):
            if component_metrics.error_rate > component_baselines.error_rate * 5:
                anomalies.append({
                    "component_id": component_id,
                    "metric": "error_rate",
                    "value": component_metrics.error_rate,
                    "baseline": component_baselines.error_rate,
                    "severity": calculate_severity(
                        component_metrics.error_rate,
                        component_baselines.error_rate * 5
                    )
                })
                
    return anomalies