ConnectWise Automate Monitor Management
Overview
Monitors in ConnectWise Automate continuously evaluate conditions on managed endpoints and generate alerts when thresholds are exceeded. This skill covers monitor types, threshold configuration, template management, and assignment strategies.
Key Concepts
Monitor Types
| Type | Description | Execution |
|---|---|---|
| Internal Monitor | Runs on the Automate server | Checks agent data |
| Remote Monitor | Runs from the Automate server | Network checks (ping, port, HTTP) |
| Agent Monitor | Runs on the endpoint agent | Local system checks |
| SNMP Monitor | Polls SNMP-enabled devices | Network device monitoring |
| Script Monitor | Executes script for check | Custom logic |
Monitor Categories
| Category | Examples |
|---|---|
| Performance | CPU, memory, disk usage |
| Service | Service status, process running |
| Event Log | Windows Event Log entries |
| Network | Ping, port open, HTTP response |
| Security | AV status, patch compliance |
| Hardware | Drive health, temperature |
| Application | Specific app monitoring |
Alert Severity Levels
| Level | Value | Description |
|---|---|---|
Information | 1 | Informational, no action needed |
Warning | 2 | Potential issue, investigate |
Error | 3 | Failure, action required |
Critical | 4 | Severe issue, immediate action |
Field Reference
Monitor Definition Fields
interface Monitor {
// Identifiers
MonitorID: number; // Primary key
MonitorGUID: string; // Global unique ID
Name: string; // Monitor name
// Type and Category
MonitorType: MonitorType; // Internal, Remote, Agent, SNMP
Category: string; // Performance, Service, etc.
Enabled: boolean; // Is active
// Check Configuration
CheckInterval: number; // Seconds between checks
FailAfter: number; // Failures before alerting
ResetAfter: number; // Successes before clearing
// Alert Settings
AlertSeverity: number; // 1-4 severity level
AlertMessage: string; // Alert text template
AlertAction: string; // Action on alert
// Thresholds
Thresholds: MonitorThreshold[];
// Assignment
AssignmentType: string; // Group, Computer, Client
TargetID: number; // Target group/computer/client ID
// Template
TemplateID: number; // Parent template ID (0 if not from template)
// Metadata
Description: string; // Monitor description
DateCreated: string; // Creation date
DateModified: string; // Last modified
}
type MonitorType = 'Internal' | 'Remote' | 'Agent' | 'SNMP' | 'Script';
interface MonitorThreshold {
Field: string; // Field to check
Operator: ThresholdOperator; // Comparison operator
Value: string; // Threshold value
Duration: number; // Minutes condition must persist
}
type ThresholdOperator = 'eq' | 'ne' | 'gt' | 'lt' | 'ge' | 'le' | 'contains' | 'notcontains';
Monitor Template Fields
interface MonitorTemplate {
TemplateID: number; // Primary key
Name: string; // Template name
Description: string; // Template description
Category: string; // Template category
// Default Settings
MonitorType: MonitorType;
CheckInterval: number;
FailAfter: number;
ResetAfter: number;
AlertSeverity: number;
// Thresholds
Thresholds: MonitorThreshold[];
// Assignment Rules
AutoApply: boolean; // Auto-apply to new computers
ApplyCondition: string; // Condition for auto-apply
// Metadata
IsBuiltIn: boolean; // System template
DateCreated: string;
DateModified: string;
}
Monitor Status Fields
interface MonitorStatus {
MonitorID: number;
ComputerID: number;
Status: MonitorStatusValue;
LastCheck: string; // ISO datetime
LastAlertTime: string; // Last alert generated
ConsecutiveFailures: number; // Current failure count
CurrentValue: string; // Last checked value
Message: string; // Status message
}
type MonitorStatusValue = 'OK' | 'Warning' | 'Error' | 'Critical' | 'Unknown' | 'Disabled';
API Patterns
List All Monitor Templates
GET /cwa/api/v1/Monitors/Templates?pageSize=100
Authorization: Bearer {token}
Response:
[
{
"TemplateID": 1,
"Name": "CPU Usage - High",
"Category": "Performance",
"MonitorType": "Agent",
"CheckInterval": 300,
"AlertSeverity": 3,
"Description": "Alerts when CPU usage exceeds 90% for 10 minutes",
"Thresholds": [
{
"Field": "CPUUsage",
"Operator": "gt",
"Value": "90",
"Duration": 10
}
]
}
]
Get Monitor Template Details
GET /cwa/api/v1/Monitors/Templates/{templateID}
Authorization: Bearer {token}
List Monitors for Computer
GET /cwa/api/v1/Computers/{computerID}/Monitors
Authorization: Bearer {token}
Response:
[
{
"MonitorID": 5001,
"Name": "Disk C: Free Space",
"MonitorType": "Agent",
"Status": "OK",
"LastCheck": "2024-02-15T10:30:00Z",
"CurrentValue": "45%",
"AlertSeverity": 2,
"Enabled": true
}
]
Get Monitor Status for Computer
GET /cwa/api/v1/Computers/{computerID}/Monitors/{monitorID}/Status
Authorization: Bearer {token}
Response:
{
"MonitorID": 5001,
"ComputerID": 12345,
"Status": "Warning",
"LastCheck": "2024-02-15T10:30:00Z",
"ConsecutiveFailures": 2,
"CurrentValue": "8%",
"Message": "Disk C: is 8% free (threshold: 10%)"
}
Create Monitor from Template
POST /cwa/api/v1/Computers/{computerID}/Monitors
Authorization: Bearer {token}
Content-Type: application/json
{
"TemplateID": 1,
"Name": "CPU Usage - Custom",
"Thresholds": [
{
"Field": "CPUUsage",
"Operator": "gt",
"Value": "85",
"Duration": 15
}
]
}
Create Custom Monitor
POST /cwa/api/v1/Monitors
Authorization: Bearer {token}
Content-Type: application/json
{
"Name": "Custom Service Monitor",
"MonitorType": "Agent",
"Category": "Service",
"CheckInterval": 300,
"FailAfter": 2,
"ResetAfter": 1,
"AlertSeverity": 3,
"Thresholds": [
{
"Field": "ServiceStatus",
"Operator": "ne",
"Value": "Running"
}
],
"AssignmentType": "Group",
"TargetID": 10
}
Update Monitor Threshold
PATCH /cwa/api/v1/Monitors/{monitorID}
Authorization: Bearer {token}
Content-Type: application/json
{
"Thresholds": [
{
"Field": "DiskFreePercent",
"Operator": "lt",
"Value": "15",
"Duration": 0
}
]
}
Assign Template to Group
POST /cwa/api/v1/Groups/{groupID}/Monitors
Authorization: Bearer {token}
Content-Type: application/json
{
"TemplateID": 1
}
Disable Monitor
PATCH /cwa/api/v1/Monitors/{monitorID}
Authorization: Bearer {token}
Content-Type: application/json
{
"Enabled": false
}
Delete Monitor
DELETE /cwa/api/v1/Monitors/{monitorID}
Authorization: Bearer {token}
List All Active Monitors with Status
GET /cwa/api/v1/Monitors/Status?condition=Status ne 'OK'&pageSize=100
Authorization: Bearer {token}
Workflows
Create Disk Space Monitor
async function createDiskSpaceMonitor(client, computerId, options = {}) {
const {
drive = 'C:',
warningThreshold = 15,
criticalThreshold = 5,
checkInterval = 300
} = options;
const monitor = await client.request('/Monitors', {
method: 'POST',
body: JSON.stringify({
Name: `Disk ${drive} Free Space`,
MonitorType: 'Agent',
Category: