1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| $monitor = Monitor-SystemResources -MonitorID "MONITOR001" ` -ResourceTypes @("CPU", "Memory", "Disk", "Network") ` -MonitorMode "RealTime" ` -MonitorConfig @{ "CPU" = @{ "Threshold" = 80 "Interval" = 60 "Alert" = $true "Retention" = 7 } "Memory" = @{ "Threshold" = 85 "Interval" = 60 "Alert" = $true "Retention" = 7 } "Disk" = @{ "Threshold" = 90 "Interval" = 300 "Alert" = $true "Retention" = 7 } "Network" = @{ "Threshold" = 70 "Interval" = 60 "Alert" = $true "Retention" = 7 } } ` -LogPath "C:\Logs\resource_monitoring.json"
$analyzer = Analyze-SystemPerformance -AnalysisID "ANALYSIS001" ` -AnalysisTypes @("Application", "Database", "System") ` -AnalysisMode "Trend" ` -AnalysisConfig @{ "Application" = @{ "Period" = "7d" "Metrics" = @("ResponseTime", "Throughput", "Errors") "Threshold" = 0.95 "Report" = $true } "Database" = @{ "Period" = "7d" "Metrics" = @("QueryTime", "Connections", "Cache") "Threshold" = 0.95 "Report" = $true } "System" = @{ "Period" = "7d" "Metrics" = @("Load", "IOPS", "Network") "Threshold" = 0.95 "Report" = $true } } ` -ReportPath "C:\Reports\performance_analysis.json"
$alerts = Manage-PerformanceAlerts -AlertID "ALERT001" ` -AlertTypes @("Critical", "Warning", "Info") ` -AlertMode "Threshold" ` -AlertConfig @{ "Critical" = @{ "Threshold" = 90 "Duration" = "5m" "Actions" = @("Email", "SMS", "Webhook") "Escalation" = $true } "Warning" = @{ "Threshold" = 80 "Duration" = "15m" "Actions" = @("Email", "Webhook") "Escalation" = $false } "Info" = @{ "Threshold" = 70 "Duration" = "30m" "Actions" = @("Email") "Escalation" = $false } } ` -ReportPath "C:\Reports\alert_management.json"
|