Adding and editing an SSH performance monitor

The Secure Shell (SSH) monitor connects to a remote device using SSH to execute commands or scripts. You can either embed the script in the monitor or place a script file on the remote machine (making sure it's executable) and enter a command in the monitor to run the script. Each monitor returns a single numeric value that is recorded in the database, then is used later by different WhatsUp Gold functions such as reporting or to compare against a threshold in Alert Center.

To add a new SSH performance monitor:

  1. From the WhatsUp Gold web interface, go to Admin > Monitors. The Monitor Library dialog appears.
  2. Click the Performance tab. The Performance Monitor list appears.
  3. Click New. The Select Performance Monitor Type dialog appears.
  4. Select SSH Performance Monitor, then click OK. The New SSH Performance Monitor dialog appears.
  5. Enter or select the appropriate information:
    • Name. Enter a unique name for the performance monitor. This name displays in the Performance Monitor Library.
    • Description. (Optional) Enter additional information about the monitor. This description displays next to the monitor in the Performance Monitor Library.

      Command to run. Enter the command you want to run and execute on the remote device. This command can be anything that the device can interpret and run; for example, a Unix shell command or a Perl script. Select one of the following script options:

      • Numeric. The command or script must return a single numeric value. The script can be as complex as required, but MUST only return a numeric value. For example, old, single-line unix-style:
        free -m | awk 'NR==2{print $3}'
        This is the script format required prior to WhatsUp Gold 16.2.3.
      • Shell Interactive. This script is not constrained to only returning single numeric values; however, the output MUST contain the string 'Result=xxxx' where xxxx represents a numeric value. For example, new multi-line linux-style:
        echo Result=$(free -m | awk 'NR==2{print $3}')
        This new script format, available in WhatsUp Gold 16.2.3 and later, supports all the features of the target script interpreters without burdening the script developer to limit the output to a single numeric value.

    Note: If you create a script to run on the remote device, the script must be developed, tested, and/or debugged on the remote machine. WhatsUp Gold does not support manipulation of the remote script.

    • Line end character. Select the appropriate character type; either None, Linefeed, Carriage return, or Carriage return linefeed. Multiline scripts are entered and persisted on a Windows operating system, and include line-ending characters that may not be recognized on the target device. This configuration feature instructs WhatsUp Gold to replace the line-ending characters with the selected characters prior to connection and command execution.
    • SSH Credential. Select the appropriate SSH credential that WhatsUp Gold uses to connect to the remote device. If you select Use the device SSH credential, WhatsUp Gold uses the SSH credential assigned to the device to which the monitor is assigned. If the appropriate SSH credential is not listed, or the device has no SSH credentials assigned, click browse (...) to open the WhatsUp Gold Credentials Library and configure a set of credentials.
  6. Click OK to save changes.
  7. After the monitor has been added to the library, you can enable the monitor through Device Properties > Performance Monitors. For more information, see Enabling performance monitors.

To edit an existing SSH performance monitor:

  1. From the WhatsUp Gold web interface, go to Admin > Monitors. The Monitor Library dialog appears.
  2. Click the Performance tab. The Performance Monitor list appears.
  3. Select the performance monitor you would like to edit from the list of current monitors, then click Edit. The Edit SSH Performance Monitor dialog appears.
  4. Enter or select the appropriate information:
    • Name. Enter a unique name for the performance monitor. This name displays in the Performance Monitor Library.
    • Description. (Optional) Enter additional information about the monitor. This description displays next to the monitor in the Performance Monitor Library.

      Command to run. Enter the command you want to run and execute on the remote device. This command can be anything that the device can interpret and run; for example, a Unix shell command or a Perl script. The command or script must return a single numeric value.
      As of WhatsUp Gold 16.2.3 and following releases, SSH performance monitors require that a value be returned in a specific 'Result=xxxx' format. The output MUST contain the string 'Result=xxxx' where xxxx represents a numeric value. For example:
      Old, single-line unix-style: free -m | awk 'NR==2{print $3}'

      New linux-style with required format: echo Result=$(free -m | awk 'NR==2{print $3}')

    Note: If you create a script to run on the remote device, the script must be developed, tested, and/or debugged on the remote machine. WhatsUp Gold does not support manipulation of the remote script.

    • Line end character. Select the appropriate character type; either None, Linefeed, Carriage return, or Carriage return linefeed. Multiline scripts are entered and persisted on a Windows operating system, and include line-ending characters that may not be recognized on the target device. This configuration feature instructs WhatsUp Gold to replace the line-ending characters with the selected characters prior to connection and command execution.
    • SSH Credential. Select the appropriate SSH credential that WhatsUp Gold uses to connect to the remote device. If you select Use the device SSH credential, WhatsUp Gold uses the SSH credential assigned to the device to which the monitor is assigned. If the appropriate SSH credential is not listed, or the device has no SSH credentials assigned, click browse (...) to open the WhatsUp Gold Credentials Library and configure a set of credentials.
  5. Click OK to save changes.

See Also

Using Performance Monitors

Performance monitors overview

Using the Performance Monitor Library

Working with Performance Monitors

Adding and editing an Active Script Performance Monitor

Adding and editing an APC UPS Performance Monitor

Adding and editing a PowerShell Scripting performance monitor

Example - PowerShell performance monitor scripts

Adding and editing a Printer performance monitor

Adding and editing an SNMP Performance Monitor

Adding and editing a SQL Query performance monitor

SQL Query Builder

Adding and editing a Windows Performance Counter Monitor

Adding and editing a WMI Formatted Performance Monitor

Adding and editing a WMI Performance Monitor