comparison ServerMonitor/Objects/Checks/SshCheck.cs @ 4:3142e52cbe69

Lots more progress
author Brad Greco <brad@bgreco.net>
date Sun, 10 Feb 2019 20:51:26 -0500
parents 96f0b028176d
children b6fe203af9d5
comparison
equal deleted inserted replaced
3:96f0b028176d 4:3142e52cbe69
72 { 72 {
73 List<CheckResult> results = new List<CheckResult>(); 73 List<CheckResult> results = new List<CheckResult>();
74 if (CheckExitCode) 74 if (CheckExitCode)
75 { 75 {
76 CheckResult result = GetIntResult(ExitCode, exitCode, "Exit code"); 76 CheckResult result = GetIntResult(ExitCode, exitCode, "Exit code");
77 if (result.CheckStatus != CheckStatus.Success) 77 if (result.Failed)
78 result.Message += ". Command output: " + output; 78 result.Message += ". Command output: " + output;
79 results.Add(result); 79 results.Add(result);
80 } 80 }
81 if (CheckCommandOutput) 81 if (CheckCommandOutput)
82 results.Add(GetStringResult(CommandOutputMatchType, CommandOutputPattern, CommandOutputUseRegex, output, "Command output")); 82 results.Add(GetStringResult(CommandOutputMatchType, CommandOutputPattern, CommandOutputUseRegex, output, "Command output"));