//------------------------------------------------------------------------------------------------- /// <summary> /// Runs the service watcher. /// </summary> private void RunServiceWatcher() { configManager.Logger.Debug(EnumMethod.START); List <string> listMessage = new List <string>(); if (PMASystemAnalyzer.GenerateServiceMemoryAlert(configManager.SystemAnalyzerInfo.ListServicesNames.ToList <string>(), configManager.SystemAnalyzerInfo.SetWebProcessWatch, configManager.SystemAnalyzerInfo.ProcessPhysicalMemoryAlertAt, out listMessage, configManager.SystemAnalyzerInfo.SetStartStoppedServicesAlerts)) { configManager.Message.AddRange(listMessage); if (!configManager.FlagInfo.FlagedServiceAlert) { postAlert = true; } configManager.FlagInfo.FlagedServiceAlert = true; } else { configManager.FlagInfo.FlagedServiceAlert = false; } configManager.Logger.Debug(EnumMethod.END); }
//------------------------------------------------------------------------------------------------- /// <summary> /// Runs the disc watch. /// </summary> private void RunDiscWatch() { configManager.Logger.Debug(EnumMethod.START); PMAConfigManager cm = configManager; List <string> listMessage = new List <string>(); if (PMASystemAnalyzer.GenerateDriveSpaceAlert(cm.SystemAnalyzerInfo.ListDrivesToWatch.ToList <string>(), cm.SystemAnalyzerInfo.LowDiscAlertAt, out listMessage)) { cm.Message.AddRange(listMessage); if (!cm.FlagInfo.FlagedDiscAlert) { postAlert = true; } cm.FlagInfo.FlagedDiscAlert = true; } else { cm.FlagInfo.FlagedDiscAlert = false; } configManager.Logger.Debug(EnumMethod.END); }
//------------------------------------------------------------------------------------------------- /// <summary> /// Runs the physical memory watch. /// </summary> private void RunPhysicalMemoryWatch() { configManager.Logger.Debug(EnumMethod.START); PMAConfigManager cm = configManager; string message = string.Empty; if (PMASystemAnalyzer.GeneratePhyMemAlert(cm.SystemAnalyzerInfo.SystemPhysicalMemoryAlertAt, out message)) { cm.Message.Add(message); if (!cm.FlagInfo.FlagedPhysicalMemoryAlert) { postAlert = true; } cm.FlagInfo.FlagedPhysicalMemoryAlert = true; } else { cm.FlagInfo.FlagedPhysicalMemoryAlert = false; } configManager.Logger.Debug(EnumMethod.END); }