Skip to content

Monitoring Integration

TheAbider edited this page Mar 19, 2026 · 3 revisions

Monitoring Integration

RackStack provides several CLI actions designed for integration with monitoring systems. All actions support -OutputFormat JSON for machine-readable output and return exit code 0 (healthy) or 1 (issues detected).

HealthDashboard — The One Action You Need

HealthDashboard returns a comprehensive JSON blob with all key server metrics in a single call:

.\RackStack.exe -Action HealthDashboard -OutputFormat JSON -Silent

Includes: CPU load, memory usage, per-volume disk capacity, uptime, reboot pending status, critical event count (24h), certificate expiry, Hyper-V VM counts, NIC error totals, key service health.

Exit codes: 0 = Healthy (≤2 issues), 1 = Critical (>2 issues)

SCOM Integration

Create a PowerShell monitoring script in SCOM that invokes:

$result = & "C:\Temp\RackStack\RackStack.exe" -Action HealthDashboard -OutputFormat JSON -Silent 2>&1
$json = $result | ConvertFrom-Json
# Map to SCOM health states
if ($json.Status -eq "Healthy") { $api.CreatePropertyBag().AddValue("State", "Success") }
elseif ($json.Status -eq "Warning") { $api.CreatePropertyBag().AddValue("State", "Warning") }
else { $api.CreatePropertyBag().AddValue("State", "Error") }

Zabbix Integration

Use Zabbix agent UserParameter to call RackStack:

UserParameter=rackstack.health,powershell -File "C:\scripts\rackstack-health.ps1"

Where rackstack-health.ps1 calls:

$result = & "C:\Temp\RackStack\RackStack.exe" -Action HealthDashboard -OutputFormat JSON -Silent 2>&1 | ConvertFrom-Json
Write-Output $result.Issues  # Returns issue count for Zabbix trigger

PRTG Integration

Use PRTG's "EXE/Script Advanced" sensor with a PowerShell script that calls RackStack and returns PRTG-formatted XML.

Scheduled Task

For any monitoring system, create a scheduled task that runs RackStack periodically:

# Run every 5 minutes, save JSON to a shared location
RackStack.exe -Action HealthDashboard -OutputFormat JSON -Silent -OutputFile "\\monitor\health\$env:COMPUTERNAME.json"

Health Score Actions

Action Score Range Components
ServerScore 0-100 CPU (15), Memory (15), Disk (20), Security (20), Events (10), Uptime (10), Network (10)
ClusterHealthScore 0-100 Nodes (25), Resources (25), CSVs (25), Quorum (25)
StorageHealthScore 0-100 Disk health (40), Capacity (30), Latency (20), MPIO (10)

ServerScore is the recommended single-number health indicator for fleet dashboards. It covers all server health dimensions in one call with a letter grade (A+ through F).

Both return letter grades (A+ through F) and are designed for fleet dashboards.

Management Platform Actions

Action Checks
SCCMClientAudit SCCM/MECM client health, version, cache, policy, site
SCOMAgentAudit SCOM agent status, management groups, version
WACConnectivityAudit Windows Admin Center readiness (WinRM, PS Remoting, HTTPS)
AzureADAudit Azure AD / Entra ID join, Intune enrollment, compliance

FleetReport — Aggregate Health Dashboard

FleetReport reads a directory of HealthDashboard or ServerScore JSON outputs and produces a fleet-wide summary:

# Each server saves its health JSON to a shared directory (scheduled task)
.\RackStack.exe -Action HealthDashboard -OutputFormat JSON -Silent > "\\monitor\health\$env:COMPUTERNAME.json"

# Orchestrator aggregates all reports
.\RackStack.exe -Action FleetReport -Config "\\monitor\health" -OutputFormat JSON

Output includes: healthy/warning/critical server counts, worst performers ranked by score, and per-server status. Exit code 1 if any server is critical.

Pairs with ServerScore for unified 0-100 health grades, and FleetScan for real-time fleet-wide scanning.

Fleet Scanning

Use FleetScan to run any action across multiple servers:

{
    "Targets": ["HV-HOST01", "HV-HOST02", "HV-HOST03"],
    "Action": "HealthDashboard",
    "Parallel": 5,
    "TimeoutSeconds": 300
}
.\RackStack.exe -Action FleetScan -Config fleet-health.json -OutputFormat JSON

See also: CLI Automation | Health Monitoring | Configuration

Clone this wiki locally