Documentation Index
Fetch the complete documentation index at: https://help.gorelo.io/llms.txt
Use this file to discover all available pages before exploring further.
Copy and paste the following prompt into Claude or a similar AI assistant when you need to create a script that uses GoreloAction. Make sure to replace [describe your monitoring need] with your specific requirements.
- Example 1: “monitor disk space usage and alert when drives are below 10% free space.”
- Example 2: “rotates the local admin password daily and writes it to a custom field.”
I need to create a simple PowerShell script that integrates with Gorelo RMM using GoreloAction. The script should [describe your monitoring need].
GoreloAction supports the following functions:
1. Generate Alerts:
GoreloAction -Alert -Severity <Int> -Name <String> -Description <String> -Suppress <Int>
Severity levels:
- 1: Critical
- 2: Error
- 3: Warning
Example: GoreloAction -Alert -Severity 1 -Name "Critical Error" -Description "Details here" -Suppress 24
2. Write to Custom Fields:
GoreloAction -SetCustomField -Name <String> -Value <String>
Example: GoreloAction -SetCustomField -Name 'asset.lastCheckTime' -Value "2025-03-09 10:30"
3. Read from Custom Fields:
Custom fields can be read using the $gorelo: prefix:
- Client-level: $gorelo:client.fieldName
- Asset-level: $gorelo:asset.fieldName
- File access: $gorelo:file.fileName (Gorelo will automatically download any referenced files before running the script)
Example:
if($gorelo:client.customToken){
# Use the token for actions
$token = $gorelo:client.customToken
}
Example with file:
if($gorelo:file.Installer){
# Run the installer that was uploaded to Gorelo Files
Start-Process -FilePath $gorelo:file.Installer -ArgumentList "/quiet" -Wait
}
Please include proper error handling, clear comments, and appropriate alert severity based on the issue detected. Also, please advise on any custom fields or files that need to be created/uploaded in Gorelo before running this script.
Once the script is generated, chat back-and-forth with the AI assistant to make sure it covers your exact needs. Test the script in Gorelo and copy/paste any errors to the AI assistant to troubleshoot (make sure to change any -Suppress to 0 during testing).