Made certain config options editable in the app config.
This commit is contained in:
+22
-2
@@ -145,6 +145,25 @@ File: `src\HostAvailabilityMonitor\appsettings.json`
|
||||
- `HipVirtualMachines`: optional static VM checks
|
||||
- `Targets`: endpoints to probe
|
||||
|
||||
### Runtime section
|
||||
|
||||
Important fields in `Runtime`:
|
||||
|
||||
- `MaxConcurrency`: maximum number of parallel endpoint checks
|
||||
- `DefaultValidateUncPathAccess`: default for UNC targets without their own `ValidateUncPathAccess` value
|
||||
- `NonZeroExitCodeOnAnyFailure`: exit with code `2` when endpoint failures are found
|
||||
- `NonZeroExitCodeOnExecutionError`: exit with code `1` on technical execution errors
|
||||
- `StateDirectory`: directory for the state file
|
||||
- `StateFileName`: state file name, default `monitor-state.json`
|
||||
|
||||
### Logging section
|
||||
|
||||
Important fields in `Logging`:
|
||||
|
||||
- `LogDirectory`: directory for rolling log files
|
||||
- `FilePrefix`: prefix for daily log files
|
||||
- `RetentionDays`: number of daily log files to retain, default `30`; `0` disables automatic cleanup
|
||||
|
||||
### Email section
|
||||
|
||||
Important fields in `Email`:
|
||||
@@ -330,12 +349,13 @@ It contains:
|
||||
- `Logging`
|
||||
- `EventLog`
|
||||
- `Email`
|
||||
- `HipVirtualMachines`
|
||||
|
||||
`Targets` is rebuilt by the generator at runtime.
|
||||
|
||||
Important:
|
||||
|
||||
When the generator writes the monitor JSON, the daily summary options and static HIP VM settings are also copied into the generated target file. That means `GeneratedMonitorConfig.Email.SendDailySummary`, `DailySummaryHourLocal`, `DailySummaryMinuteLocal`, and `GeneratedMonitorConfig.HipVirtualMachines` flow directly into the output monitor configuration.
|
||||
When the generator writes the monitor JSON, runtime, logging, daily summary, and static HIP VM settings are also copied into the generated target file. That means values such as `GeneratedMonitorConfig.Runtime.StateFileName`, `GeneratedMonitorConfig.Logging.RetentionDays`, `GeneratedMonitorConfig.Email.SendDailySummary`, `DailySummaryHourLocal`, `DailySummaryMinuteLocal`, and `GeneratedMonitorConfig.HipVirtualMachines` flow directly into the output monitor configuration.
|
||||
|
||||
---
|
||||
|
||||
@@ -472,7 +492,7 @@ The generator is designed defensively:
|
||||
The monitor is also defensive:
|
||||
|
||||
- daily rolling logs
|
||||
- default retention of 5 days
|
||||
- default retention of 30 days, configurable through `Logging.RetentionDays`
|
||||
- event log writes are best effort only
|
||||
- state file is written atomically
|
||||
- failure/recovery emails follow explicit notification rules
|
||||
|
||||
Reference in New Issue
Block a user