CrystalDiskInfo Alert
Overview
This script serves as the evaluation logic for the ticketing component of the Proactive Disk Health Monitor solution. It is triggered by the CrystalDiskInfo - Ticket Required compound condition to determine if a ConnectWise Manage ticket should be created.
Because ConnectWise Manage tickets cannot render complex HTML and are limited to roughly 1100 characters, this script does not decode the full WYSIWYG alert payload. Instead, it reads the cPVAL Crystal Disk Alert Required flag and the cPVAL Crystal Disk Health Status field. If an alert is required, it returns a concise plain-text summary directing the technician to review the full HTML report stored in the cPVAL Crystal Disk Alert Content custom field within NinjaOne, and exits with code 1. If no alert is required, it exits silently with code 0.
Sample Run
Note: This script is specifically engineered to operate as the evaluation script within the CrystalDiskInfo - Ticket Required compound condition. Manual execution is not recommended, as the script's output and exit code are intended to trigger automated ticketing actions rather than provide direct feedback.
Dependencies
- Solution: Proactive Disk Health Monitor
- Compound Condition: CrystalDiskInfo - Ticket Required
- Custom Field: cPVAL Crystal Disk Alert Required
- Custom Field: cPVAL Crystal Disk Health Status
- Custom Field: cPVAL Crystal Disk Alert Content
Parameters
This script does not accept any runtime parameters. It relies entirely on reading the device custom fields populated by the CrystalDiskInfo Audit automation.
Custom Fields
| Custom Field | Type | Example | Scope | Available Options | Editable | Description |
|---|---|---|---|---|---|---|
| cPVAL Crystal Disk Alert Required | Checkbox | Checked | Device | Checked, Unchecked | No | Evaluated to determine if the ticketing automation should proceed. |
| cPVAL Crystal Disk Health Status | Text | ModelA: Good, ModelB: Caution | Device | N/A | No | Read by the script to include a brief health summary in the ticket output. |
| cPVAL Crystal Disk Alert Content | WYSIWYG | HTML Payload | Device | N/A | No | Referenced in the output text as the location for the full diagnostic report. |
Automation Setup/Import
Output
- Activity Details: A concise plain-text summary indicating a degraded disk health status, the current health summary, and instructions to review the detailed WYSIWYG custom field in NinjaOne.
- Exit Code: Returns
1when a ticket is required, and0when no ticket is needed or if a read error occurs.
Changelog
2026-08-06
- Initial version of the document