Skip to content
Snippets Groups Projects
Commit 118f6e63 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Add ServiceConfig.StartupNotificationDelta

Refers to #20
parent 7dd9cbb7
No related branches found
No related tags found
No related merge requests found
......@@ -224,6 +224,12 @@ namespace ATxCommon.Serializables
/// Minimum time in minutes between two low-space notifications. Default: 720 (12h).
/// </summary>
public int StorageNotificationDelta { get; set; } = 720;
/// <summary>
/// Minimum time in minutes between two startup system health notifications.
/// Default: 2880 (2d).
/// </summary>
public int StartupNotificationDelta { get; set; } = 2880;
#endregion
......@@ -472,6 +478,7 @@ namespace ATxCommon.Serializables
WarnOnHighValue(c.AdminNotificationDelta, nameof(c.AdminNotificationDelta), 1440);
WarnOnHighValue(c.GraceNotificationDelta, nameof(c.GraceNotificationDelta), 10080);
WarnOnHighValue(c.StorageNotificationDelta, nameof(c.StorageNotificationDelta), 10080);
WarnOnHighValue(c.StartupNotificationDelta, nameof(c.StartupNotificationDelta), 40320);
WarnOnHighValue(c.GracePeriod, nameof(c.GracePeriod), 100);
if (!c.DestinationDirectory.StartsWith(@"\\"))
......@@ -557,6 +564,8 @@ namespace ATxCommon.Serializables
TimeUtils.MinutesToHuman(GraceNotificationDelta, false) + ")\n" +
$"StorageNotificationDelta: {StorageNotificationDelta} min (" +
TimeUtils.MinutesToHuman(StorageNotificationDelta, false) + ")\n" +
$"StartupNotificationDelta: {StartupNotificationDelta} min (" +
TimeUtils.MinutesToHuman(StartupNotificationDelta, false) + ")\n" +
"";
}
return msg;
......
......@@ -118,6 +118,11 @@
in case one of the drives is below the threshold (in minutes) -->
<StorageNotificationDelta>720</StorageNotificationDelta>
<!-- StartupNotificationDelta: minimum time (in minutes) between two service
startup system health notification emails (default: 2880 (2d). Set to 0
to disable startup health reports. -->
<StartupNotificationDelta>2880</StartupNotificationDelta>
<!-- OPTIONAL NOTIFICATION / EMAIL SETTINGS -->
</ServiceConfig>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment