Administer > Use alerts to monitor your environment > Available alert actions > Execute an external batch file

Execute an external batch file

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.

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.

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

  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.
    2. Select either Define User or No User Defined for Optional Windows Authentication.

      Enter users as domain\user.

  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.