first commit
This commit is contained in:
38
Config/MonitorConfig.cs
Normal file
38
Config/MonitorConfig.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
namespace HanaToolbox.Config;
|
||||
|
||||
public sealed class MonitorConfig
|
||||
{
|
||||
public bool Enabled { get; set; } = false;
|
||||
|
||||
/// <summary>hdbuserstore key used for all monitoring SQL queries.</summary>
|
||||
public string HanaUserKey { get; set; } = "CRONKEY";
|
||||
|
||||
public string HanaInstanceNumber { get; set; } = "00";
|
||||
|
||||
/// <summary>Full path to sapcontrol binary.</summary>
|
||||
public string SapcontrolPath { get; set; } = "/usr/sap/NDB/HDB00/exe/sapcontrol";
|
||||
|
||||
/// <summary>Company name included in ntfy alert messages.</summary>
|
||||
public string CompanyName { get; set; } = "MyCompany";
|
||||
|
||||
/// <summary>Disk usage alert threshold in percent.</summary>
|
||||
public int DiskUsageThresholdPercent { get; set; } = 85;
|
||||
|
||||
/// <summary>Alert if truncated log segments exceed this percent of total.</summary>
|
||||
public int TruncatedSegmentThresholdPercent { get; set; } = 80;
|
||||
|
||||
/// <summary>Alert if free log segments fall below this percent of total.</summary>
|
||||
public int FreeSegmentThresholdPercent { get; set; } = 10;
|
||||
|
||||
/// <summary>Statement queue length above which a breach is counted.</summary>
|
||||
public int StatementQueueThreshold { get; set; } = 10;
|
||||
|
||||
/// <summary>How many consecutive cron ticks above threshold before alerting.</summary>
|
||||
public int StatementQueueConsecutiveRuns { get; set; } = 3;
|
||||
|
||||
/// <summary>Alert if the last successful backup is older than this many hours.</summary>
|
||||
public int BackupThresholdHours { get; set; } = 26;
|
||||
|
||||
/// <summary>Directories checked for disk usage.</summary>
|
||||
public List<string> DirectoriesToMonitor { get; set; } = ["/hana/data", "/hana/log"];
|
||||
}
|
||||
Reference in New Issue
Block a user