Monitoring Setup Guide
This guide walks through installing, configuring, and running the TestimoX.Monitoring service for continuous Active Directory infrastructure monitoring.
Prerequisites
- .NET 8.0 Runtime or later
- Active Directory domain membership (for auto-discovery) or manual target configuration
- Network access to domain controllers on required probe ports (53, 88, 123, 389, 443, 636, 9389)
- TestimoX license (Community edition supports basic monitoring)
Installation
CLI (Standalone)
dotnet tool install --global TestimoX.MonitoringWindows Service
# Install as a Windows service
testimox-monitoring install --service-name "TestimoX.Monitoring"
# Start the service
Start-Service -Name "TestimoX.Monitoring"PowerShell Module
Install-Module -Name TestimoX.PowerShell -Scope CurrentUserConfiguration
Monitoring is configured via a JSON configuration file. By default the service looks for monitoring.json in the working directory.
Minimal Configuration
{
"monitoring": {
"interval": 300,
"targets": {
"discovery": "auto"
},
"probes": [
{ "type": "Ping" },
{ "type": "DNS" },
{ "type": "LDAP" },
{ "type": "Kerberos" }
]
}
}Full Configuration Example
{
"monitoring": {
"interval": 300,
"timeout": 30,
"retries": 2,
"targets": {
"discovery": "auto",
"include": ["dc01.contoso.com", "dc02.contoso.com"],
"exclude": ["dc-test.contoso.com"]
},
"probes": [
{ "type": "Ping" },
{ "type": "DNS" },
{ "type": "LDAP", "ports": [389, 636] },
{ "type": "Kerberos" },
{ "type": "NTP" },
{ "type": "HTTPS", "paths": ["/"] },
{ "type": "Port", "ports": [3268, 3269, 9389] },
{ "type": "Replication" },
{ "type": "Directory" },
{ "type": "ADWS" }
],
"thresholds": {
"latency_warning_ms": 500,
"latency_critical_ms": 2000
},
"notifications": {
"email": {
"enabled": false,
"smtp_server": "smtp.contoso.com",
"recipients": ["ad-team@contoso.com"],
"on_status_change": true
}
},
"dashboard": {
"enabled": true,
"port": 8080,
"bind": "localhost"
},
"history": {
"retention_days": 30,
"store_path": "./monitoring-data"
}
}
}Configuration Reference
General Settings
| Setting | Type | Default | Description |
|---|---|---|---|
interval | int | 300 | Probe execution interval in seconds |
timeout | int | 30 | Per-probe timeout in seconds |
retries | int | 1 | Retry attempts on probe failure |
Target Discovery
| Setting | Type | Default | Description |
|---|---|---|---|
discovery | string | auto | auto for AD-based discovery, manual for explicit targets |
include | string [] | [] | Additional targets to include |
exclude | string [] | [] | Targets to exclude from monitoring |
Probe Settings
Each probe entry in the probes array supports:
| Setting | Type | Description |
|---|---|---|
type | string | Probe type (Ping, DNS, LDAP, Kerberos, NTP, HTTPS, Port, Replication, Directory, ADWS, DnsService) |
enabled | bool | Enable or disable this probe (default: true) |
ports | int [] | Override default ports for Port and LDAP probes |
paths | string [] | URL paths for HTTPS probes |
interval | int | Override global interval for this probe |
Dashboard
| Setting | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Enable the HTML dashboard |
port | int | 8080 | Dashboard HTTP port |
bind | string | localhost | Bind address |
Notifications
| Setting | Type | Description |
|---|---|---|
email.enabled | bool | Enable email notifications |
email.smtp_server | string | SMTP server address |
email.recipients | string [] | Notification recipients |
email.on_status_change | bool | Send only on status transitions |
Running Monitoring
CLI Mode
# Run with default config
testimox-monitoring
# Run with custom config
testimox-monitoring --config ./my-monitoring.json
# Run with verbose output
testimox-monitoring --verbosity detailedPowerShell
# Initialize monitoring service
Initialize-TestimoXService -ConfigPath './monitoring.json'
# Start monitoring
Invoke-TestimoXService -Mode Monitoring
# Check service status
Get-TestimoXServiceAs a Windows Service
# Check service status
Get-Service -Name "TestimoX.Monitoring"
# View service logs
Get-EventLog -LogName Application -Source "TestimoX.Monitoring" -Newest 20Dashboard
When the dashboard is enabled, navigate to http://localhost:8080 (default) to view:
- Overview -- aggregate health status across all targets and probes
- Per-DC drill-down -- individual domain controller probe results and history
- Probe timeline -- historical trend for each probe type
- Alerts -- active and recent status change notifications
Branding
Premium and Enterprise editions support custom branding for the monitoring dashboard:
{
"monitoring": {
"dashboard": {
"branding": {
"title": "Contoso AD Health",
"logo": "./assets/logo.png",
"accent_color": "#1a5276"
}
}
}
}Next Steps
- Probe Types -- detailed reference for each probe type
- Monitoring Overview -- architecture and design concepts
- Reports -- combine monitoring data with assessment reports