Using Management Scripts
Learn how to create and manage a Management Script that will execute one or more workflows as a response to specific alert conditions.
Table of Contents
- Introduction
- Add Management Script
- Modify Management Script
- Delete Management Script
- Management Script Parameters
Introduction
A Management Script is an executable file that is launched by the Alert Manager when an alert it is assigned to is raised. Management Scripts are generally used to execute workflows as a response to specific alert conditions (for example, generating an automated page or phone call in the event of a critical error). You can design your Management Scripts to execute any desired workflow.
Configuration requirements for a Management Script include the ability to execute from the Policy Manager host, and the successful registration of the Management Script in the Policy Manager prior to assigning it to an Alert Code.
Notes:
- Management scripts can be stored at any location, but must be copied to all Policy Manager machines and at the same path.
- A Management Script definition should include the full, absolute path.
- A script should not assume any current working directory.
Location: In the Policy Manager Management Console, go to Alerts > Management Scripts.
Add Management Script
- Go to Alerts > Management Scripts.
- Click Add Management Script.
- Define a Management Script by entering the following information:
- Name: Enter the Script Name. The script name displays on the Management Script Summary screen and is the reference name that you will be assigning to Alert Codes.
- Description: Enter the Management Script description (for example, the workflow that will be executed by the script).
- Script Filename: Enter the script filename.
- Parameters: Select a parameter category that you would like append to the Management Script. See Management Script Parameters.
- Parameter List: Displays a list of entries selected from the Parameter drop-down list box (for example, $AlertSeverity).
- Final Script: Displays an example of the final script combining the "Script Filename" plus the selected "Parameters," (for example, "alertworkflow.bat" $AlertCode).
- Example Script: Displays an example of a sample Management Script that is configured with one script filename and three parameter selections.
- Click Apply.
Notes:
- You can use parameters to determine the behavior of the script.
- You can choose multiple parameters from the drop-down list.
- Each parameter you select is automatically added to both the Parameters List field and the Final Script field.
- If you add static parameters to the parameter list, they are passed to the script.
- Parameters that include multiple characters separated by spaces must be enclosed in quotes.
Modify Management Script
- Go to Alerts > Management Scripts.
- Click Modify Management Script.
- In the Modify Management Script screen, update the following information in the Details section:
- Name: The script name displays on the Management Script Summary screen and is the reference name that you will be assigning to Alert Codes.
- Description: The Management Script description (for example, the workflow that will be executed by the script).
- Script Filename
- Parameters: Parameter category that you would like append to the Management Script. See Management Script Parameters.
- Parameter List: Displays a list of entries selected from the Parameter drop-down list box (for example, $AlertSeverity).
- Final Script: Displays an example of the final script combining the Script Filename plus the selected Parameters, (for example, "alertworkflow.bat" $AlertCode).
- Example Script: Displays an example of a sample Management Script that is configured with one script filename and three parameter selections.
- Click Apply.
Notes:
- You can use parameters to determine the behavior of the script.
- You can choose multiple parameters from the drop-down list.
- Each parameter you select is automatically added to both the Parameters List field and the Final Script field.
- If you add static parameters to the parameter list, they are passed to the script.
- Parameters that include multiple characters separated by spaces must be enclosed in quotes.
Delete Management Script
- Go to Alerts > Management Scripts.
- Select the Management Script definition line item you would like to delete.
- Click Delete Management Script and confirm the deletion. The system permanently removes the Management Script and associated alert code references from the database.
Management Script Parameters
The following list shows the available options in the Management Script Parameter drop-down menu.
Parameter |
---|
Alert Id |
Alert Code |
Alert Severity |
Alert Description |
Alert Type |
Alert Source Type |
Component |
Alert Source Component Name |
Subsystem |
Alert Source Subsystem Name |
Contract Key |
Contract Name |
Alert Sent Timestamp |
Alert Received Timestamp |
Alert Code Description |
Alert Code Component |
Alert Code Subsystem |
Alert Code Additional Info |
SLA Policy Name |
SLA Rule Metric Name |
SLA Rule Operator |
SLA Rule Value |
SLA Rule Value Unit |
SLA Rule Interval |
SLA Evaluation Measured Value |
SLA Evaluation Interval Start Date |
SLA Evaluation Interval End Date |