Use the Custom Command Alert to produce alerts on any monitored host. Custom command alerts trigger based either on the output of a command run on the monitored host, which requires the Host Collector options to be configured for the database collector, or on the output of a command run on the AppDynamics for Databases server. When monitoring a Linux/Unix host, the command runs using SSH remotely. When monitoring a Windows host, a WMI script executes on the AppDynamics for Databases server to capture a metric or metrics remotely.
There are three types of Custom Command Alerts:
- Single Value: Returns a single numeric value which can be compared to the threshold.
- Name/Value List: Returns a set of output which could span multiple lines. The threshold is usually embedded in the command text (or WMI script), and if the command returns anything then the threshold is breached and the alert email is sent. If the command does not return any data then the threshold is not breached and the alert email is not triggered.
- Diff Results: Detects change within a set of data. This type of Custom Command Alert runs a command and detects differences in the returned recordset. If there are any changes, then the alert will breach the threshold and the email alert is sent.
- At the top right of the Alerts page, click New Alert from the top menu and from the list that appears click Custom Command Alert.
The Custom Command Alert window appears.
- Use the following field descriptions to complete the Custom Command Alert window and then click Save.
- Instance: Click to specify the monitored instance to alert on. Instance choices in the list include: all; all collectors of a specific database platform; and specific database, server, and NetApp storage collectors. You can choose one instance.
- Alert Type: Click to specify whether the alert is for information only or not. If the alert is for informational purposes only, you can only see the alert on the alerts dashboard; an alert email is not triggered. If the alert is not for just informational purposes, an alert email is sent when the alert is triggered.
- Run On: Click to specify where to run the alert, on the monitored host over SSH or on the AppDynamics for Databases controller host.
- Run Every: Click to specify how often to run the SQL specified in the alert.
- Start Time: Enter when the SQL specified in the alert should start running. Specify the time in hours and minutes, using the 24 hr clock.
- Compare Higher/Lower?: Click to specify whether an alert should be sent if the activity value is higher or lower than the threshold.
- Return Type: Click to specify whether the command in this alert returns a single value, a string of values, or will be detecting differences.
- Threshold: Specify a number to compare with the number returned from the single value returning command in this alert. Enter any number for Name/Value and Diff Results types of custom command alerts; the threshold value specified here for these types of custom command alerts is not used but this field must not be empty.
- Command: Enter the program, script or command to run, including all arguments. You must also include User@host, @username, and @password values.
- Additional Command: Optionally, in cases where the threshold is breached, enter the program, script or command to run, including all arguments. You must also include User@host, @username, and @password values.
- Alert Name: Specify a name to identify the alert on the alerts dashboard and in the alert email.
- Email: Optionally specify an alternate user to send the email alert to. If you do not specify an email address here, the email alert is sent to the Default To Email Address specified for the email server.
- Custom Email Body: Optionally specify the body content of the email alert.