Added new functionality: checking HIP hosts for TCP connectivity and whether they can be reached via RDP.
This commit is contained in:
+40
-2
@@ -12,6 +12,7 @@ The monitor checks technical reachability and writes:
|
||||
- Windows Application Event Log
|
||||
- email notifications for failures, recoveries, and a daily status summary
|
||||
- a state file for transition detection, cooldown handling, and once-per-day summary tracking
|
||||
- optional static HIP VM checks from `hip-vms.json` for network/ping and RDP/TCP 3389
|
||||
|
||||
### 2. BizTalkMonitorConfigGenerator
|
||||
|
||||
@@ -60,7 +61,8 @@ The goal is to avoid manually maintaining the target list and instead derive it
|
||||
├── App.config
|
||||
├── HostAvailabilityMonitor.csproj
|
||||
├── Program.cs
|
||||
└── appsettings.json
|
||||
├── appsettings.json
|
||||
└── hip-vms.json
|
||||
```
|
||||
|
||||
This layout is intentionally simple so it can be committed to **Gitea**, built on Windows, and deployed to BizTalk or application servers with minimal friction.
|
||||
@@ -95,6 +97,7 @@ The generator tries to transform BizTalk addresses into monitor-compatible endpo
|
||||
- `sftp://...`
|
||||
- `tcp://...`
|
||||
- `icmp://...`
|
||||
- `rdp://...`
|
||||
- plain host / host:port values on a best-effort basis
|
||||
|
||||
### Special handling
|
||||
@@ -139,6 +142,7 @@ File: `src\HostAvailabilityMonitor\appsettings.json`
|
||||
- `Logging`: file logging configuration
|
||||
- `EventLog`: Windows Event Log configuration
|
||||
- `Email`: SMTP and notification configuration
|
||||
- `HipVirtualMachines`: optional static VM checks
|
||||
- `Targets`: endpoints to probe
|
||||
|
||||
### Email section
|
||||
@@ -233,6 +237,7 @@ The daily status email contains:
|
||||
- status
|
||||
- detail
|
||||
- host/port/HTTP status when available
|
||||
- a HIP VM snapshot with network and RDP status per VM when `HipVirtualMachines.Enabled=true`
|
||||
|
||||
Note:
|
||||
|
||||
@@ -240,6 +245,39 @@ The daily counters are derived from the **current day's rolling log file**. If t
|
||||
|
||||
---
|
||||
|
||||
## HIP VM Monitoring
|
||||
|
||||
The HIP VMs are kept in a dedicated file:
|
||||
|
||||
```text
|
||||
src\HostAvailabilityMonitor\hip-vms.json
|
||||
```
|
||||
|
||||
This keeps them independent from the `Targets` regenerated by the BizTalk generator. Changes to BizTalk send ports or receive locations do not overwrite the static VM list.
|
||||
|
||||
Enable the feature in `appsettings.json`:
|
||||
|
||||
```json
|
||||
"HipVirtualMachines": {
|
||||
"Enabled": true,
|
||||
"ConfigPath": "hip-vms.json",
|
||||
"ApplicationName": "HIP Virtual Machines",
|
||||
"TimeoutSeconds": 5,
|
||||
"RdpPort": 3389,
|
||||
"CheckNetwork": true,
|
||||
"CheckRdp": true
|
||||
}
|
||||
```
|
||||
|
||||
The `hip-vms.json` file contains group, name, address, description, and enabled state for each VM. At startup, the monitor turns every enabled VM into normal monitor targets:
|
||||
|
||||
- `Network`: `icmp://<address>` for ping/network connectivity
|
||||
- `RDP`: `rdp://<address>:3389` for TCP connectivity to the RDP service
|
||||
|
||||
These targets use the same state file as all other checks. Lost network or RDP reachability and later recoveries are therefore reported through the normal failure/recovery emails. File logs and Windows Event Log entries include source, group, machine, and check type.
|
||||
|
||||
---
|
||||
|
||||
## Generator configuration details
|
||||
|
||||
File: `generator-settings.json`
|
||||
@@ -297,7 +335,7 @@ It contains:
|
||||
|
||||
Important:
|
||||
|
||||
When the generator writes the monitor JSON, the daily summary options are also copied into the generated target file. That means `GeneratedMonitorConfig.Email.SendDailySummary`, `DailySummaryHourLocal`, and `DailySummaryMinuteLocal` flow directly into the output monitor configuration.
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user