Added Expected to push a percentage
This commit is contained in:
@ -39,7 +39,9 @@ public record AppSettings(GatusConfiguration GatusConfiguration,
|
||||
if (string.IsNullOrEmpty(appSettings.GatusToMonaConfiguration.Company))
|
||||
throw new Exception("Company name must have a value!");
|
||||
if (appSettings.MonAConfiguration.Minutes < 1)
|
||||
throw new Exception("MonA Minutes must have a value more than one!");
|
||||
throw new Exception("MonA Minutes must have a value more than zero!");
|
||||
if (appSettings.MonAConfiguration.Expected < 1)
|
||||
throw new Exception("MonA Expected must have a value more than zero!");
|
||||
TimeSpan timeSpan = new(DateTime.MinValue.AddMinutes(appSettings.MonAConfiguration.Minutes).Ticks - DateTime.MinValue.Ticks);
|
||||
if (appSettings.GatusToMonaConfiguration.MillisecondsDelay < timeSpan.TotalMilliseconds)
|
||||
throw new Exception($"MonA doesn't support more than once per five minutes ({timeSpan.TotalMilliseconds})!");
|
||||
|
@ -3,7 +3,8 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Gatus.To.MonA.Models;
|
||||
|
||||
public record MonAConfiguration(int Minutes,
|
||||
public record MonAConfiguration(int Expected,
|
||||
int Minutes,
|
||||
string Resource,
|
||||
string Site,
|
||||
string StateName,
|
||||
|
Reference in New Issue
Block a user