Documentation forSolarWinds Platform

Execute an external program in the SolarWinds Platform

This SolarWinds Platform topic applies only to the following products:

Hybrid Cloud Observability EssentialsHybrid Cloud Observability Advanced

DPAIMIPAMLANAMNCMNPMNTASAMSCMSRMUDTVMANVNQMWPM

There are several circumstances where you may want to execute a program when a specific network event occurs. For example, you may want to run a custom script to reboot your SQL servers.

Requirements

  • External programs selected for this action must be executable using a batch file called from the command line. Programs executed this way run in the background. However, you can set the SolarWinds Alerting Engine Service to Interact with Desktop.

  • Starting with 2023.2, new actions of this type require an approval by a system administrator. When you configure a new execute action, notify your SolarWinds Platform server administrator. You can check the action status in the Action Manager (group by Needs Approval). See Approve alert actions executing a script.

Define an alert action to execute an external program

  1. When editing or adding an alert, click Add Action in the Trigger or Reset Action section of the Alert Wizard.
  2. Select the Execute an External Program option, then click Configure Action.
  3. Under Execute an External Program settings:
    1. Enter the Network path to external program in the field provided.
      For example: Use c:\test.bat, where c:\ is the disk on your main poller and test.bat is your external program to be executed.

      SolarWinds recommends that scripts and batch files be placed on the root of c:\ to simplify the path for the file.

    2. Select the account for running the action. Enter users as domain\user.

      SolarWinds recommends that you create tailored low-privilege accounts on the machine to run specific external programs, scripts, and alert actions. See Secure external programs and script alerting actions for details.

  4. Schedule the action by selecting Time of Day > Use special Time of Day schedule for this action. This schedule only applies to the alert action you are editing.

    This is often used to prevent an action from occurring during specific windows.

  5. Select how frequently this action occurs for each triggered alert in Execution Settings.

  6. Click Add Action.

The action is added to the trigger or reset action list, and you can test the action using the Simulate button. When the trigger or reset conditions of the alert are met, the external program runs.