A raised alert typically indicates a network, application, or performance problem that requires issuing an incident ticket into the tracking system or adding an entry to a system log. To automate this process, the report server can run a custom script when an alert is triggered.
The following examples present Microsoft PowerShell v.4 scripts to deliver the notification:
You can use any scripting language as long as its interpreter is installed on the report server. Our examples all use the Windows PowerShell scripting included in standard Windows Server deployments.
Windows user rights
Make sure that the user running the CAS service has sufficient permissions to execute your scripts.
Delivering alert notification as ServiceNow incident
In this example, we create a PowerShell script which, when it is triggered, generates a message that automatically creates an incident item in the ServiceNow system.
Using the available parameters, we modify the alert notification to automatically generate a URL pointing to the CAS report containing detailed information about the reported problem. Though this URL will be passed to the ServiceNow in the script as part of the notification message, we also pass this URL as a separate script parameter which is inserted in the custom clickable form field in the ServiceNow Incident form.