Have you ever been in a position where you have wanted to put together a custom script that triggers when a monitor fails, but you have no idea what variables are passed in to the script from the monitor? It’s not like you can debug through this behaviour either as you can’t trigger a script as monitor in debug mode. The documentation, even when it was at its best, still didn’t document all these variables. Though they were half documented at some point, I can’t even find them at all any more in the ConnectWise University documentation.
Fortunately, there is an easy way to get a handy list of variables. Simply add this step in to your script. It will take every variable that the script can see and log them in to the script log on the Agent the script is running on:
Variables I have picked up over the years
@[email protected] Result from monitor, for an internal monitor, the value of the ‘result’ field.
@[email protected] Table to check in internal monitor
@[email protected] Field to check in internal monitor
@[email protected] FAILED, SUCCESS – status of monitor
@[email protected] Name of calling monitor
@[email protected] Priority of ticket to be created
@[email protected] Generally the value of the field
@[email protected] Value of identity field
@[email protected] Monitor override to disable alerting
@[email protected] Numeric id of ticket category
@[email protected] 0, 1 – If the monitor/script was called with timezone compensation disabled
@[email protected] 0, 1 – set if the system automation scripts have loaded ticket property variables
@[email protected] True, False – unknown
@[email protected] Numeric id of LabTech user
@[email protected] Numeric id of time category
@[email protected] Numeric number of minutes to bill
@[email protected] True, False – boolean to enter time for monitor
@[email protected] Numeric value for maximum number of comments to be appended to ticket
@[email protected] 0, ? – should autofixes enter ticket time
@[email protected] Numeric id of ticket category for ticket creation
@[email protected] Numeric id ?
I have integrated Opsgenie alert in connectwise using https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-connectwise-automate-api/ link but I did not get @[email protected] value…then I also tried to display all variables using this link but I did not get @[email protected] value…It always gives me “@[email protected]” as a string not variable value. Did I do anything wrong?