Implement Alert Server Tools

Alert server tools allow you to execute a utility on a remote host. You define the host when you run the tool. You can control which tools are available for different types of alerts.

There are two ways of running alert server tools:

  • If you run them via ChatOps shortcuts, they always run on the ToolRunner host.

  • If you run them from the Tools menu in an Alert List, they run on the host of your choice.

These tools specify a command that is run using ToolRunner, which is configured to connect to the remote host. The command can be anything that is executable from the Linux command line. For example a ping or cat or a custom bash script. See Configure Tool Runner for more information.

Alert server tools pass arguments to utilities based upon alert attributes. For example, testing the reachability (ping) of hardware using the source attribute of the alert.

You can make tools available to all users, specified teams, specified roles, or yourself only.

Create a new alert server tool

To create a new alert server tool:

  1. Click Alert Server Tools in the Tools section of the Settings tab.

  2. On the Tool tab, click the + icon to create a new tool.

  3. Fill in the available fields to define the tool:

    Field

    Input

    Description

    Name

    String (Required)

    Name for the alert server tool (up to 100 characters).

    Description

    String

    Text description of the alert server tool

    Alert Type Filter

    String

    Alert types for which the alert server tool is available. Enter .* to make it available for all alert types.

    Filter Using Regex

    Boolean

    If you select this check box, the Alert Type Filter uses a regular expression.

    Command

    String (Required)

    Command to carry out on alerts. The host system is the ToolRunner host if you are running the tool via a ChatOps shortcut, or you can define it when running the tool from the Tools menu on an Alert List.

    Arguments

    String

    Specific input for the command.

    Run For

    Boolean +Integer

    If you select this check box, you can define the number of seconds the tool runs for. The minimum value for this field is 5 seconds.

  4. On the Shared With tab, select whether you want to share this tool with everyone, specific teams, specific roles or only yourself. You must have the permission share_filters_public to share a tool with all users. You must have the permission share_filters_teams to share a tool with specific teams. See Manage Roles for more information.

  5. If you select to share the tool with specific teams or specific roles, add the teams or roles you want to share the tool with to the list below.

  6. Click Save Changes to add the tool to the list of alert server tools in the left hand pane.

Example

The following screenshot shows an alert server tool that tests the reachability of the source alert and returns the results.

The Command ping is used with Arguments$source and -c5 which specify the source, from the alert attribute, and the number of times to ping (five).

AlertServer1.JPG

The Alert Type Filter uses a regular expression '.*' to make the tool available for all alerts.

To learn more, watch the Client and Server Tool Configuration training video at Moogsoft University.