Documentation forServer & Application Monitor
Monitoring your applications and environment is a key capability of Hybrid Cloud Observability and is also available in a standalone module, Server & Application Monitor (SAM). Hybrid Cloud Observability and SAM are built on the self-hosted SolarWinds Platform.

Use automation scripts to add AppInsight applications to nodes with the SolarWinds Platform SDK

This section describes to use PowerShell scripts to add AppInsight applications to nodes via the SolarWinds Platform Software Development Kit (SDK), enabling you to configure large environments quickly via automation scripts provided by SolarWinds. This is a quick alternative to adding AppInsight templates via Discovery, or manually assigning templates in SAM.

The SolarWinds Platform SDK is a set of tools that you can use to interface with the SolarWinds Information Service (SWIS) that supports communication between the SolarWinds Platform server, the SolarWinds Platform database, SolarWinds Platform modules like SAM and NPM, and Additional Polling Engines. As a data access layer for the SolarWinds Platform, SWIS allows for higher-level operations than would be allowed when making changes in SQL.

New to the SolarWinds Platform SDK and API? Read Intro to API, SDK, & SWQL on THWACK, or watch Orion SDK 101: Intro to PowerShell and the Orion API.

Published on GitHub, some ways to use the SolarWinds Platform SDK with SAM include monitoring metrics with API pollers and managing custom properties. For many years, the SDK has included the CreateApplication SWIS verb that you can use to add SAM application monitor templates to nodes, as described in the OrionSDK wiki and THWACK. However, that verb did not support complex AppInsight templates in earlier releases.

You can use CreateApplication to add the following templates to nodes:

Click here to download a ZIP file with related AppInsight scripts, plus a script to add the Windows Scheduled Tasks Monitor (WSTM).

In scripts, APM refers to the original name for SolarWinds SAM, which is still used in database columns and fields.

Although automation scripts can speed the configuration of large environments, you still need to verify that target nodes meet template requirements, per the SAM Application Monitor Template Reference. For example, to add AppInsight for Active Directory to a node, you'll need specific details, such as:

  • LDAP port
  • Global Catalog (GC) port
  • Encryption method
  • Authentication method

When you execute a PowerShell script from the command line or the PowerShell Integrated Scripting Environment (ISE), the script invokes the CreateApplication verb and passes parameters such as credentials, node ID, and application template ID to the SolarWinds Platform SDK.

Scripts include annotations about the actions and variables involved. For example, if you set credentialsSetID to 0, the script prompts for credentials each time it runs; use 3 to inherit credentials from WMI nodes, or 4 to inherit credentials from the parent template.

Note the following details about these automation scripts:

  • Scripts do not support template assignment to groups of nodes. Use the SolarWinds Platform Web Console instead, as described in Assign a SAM application monitor template to groups of nodes.
  • For AppInsight for Active Directory, the script doesn't disable LDAP domain components by default, but you can use the DisableDomainComponents verb on the Orion.APM.ActiveDirectory.Application entity, if necessary. To learn more, see Advanced setting options.

Depending on how it's used, PowerShell can make your deployment vulnerable to unauthorized access. For details, see Use PowerShell in SAM.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.

AppInsight automation script requirements

  • Verify that PowerShell 4.0 or later is installed.
    • To determine the current version, use this command:
    • Add the SwisSnapin by running the following Add-PSSnapin cmdlet:
      Add-PSSnapin -Name SwisSnapin
    • For details, see SolarWinds Platform SDK PowerShell.

    Depending on how it's configured, PowerShell can make your deployment vulnerable to unauthorized access. Your organization should internally review and assess to what extent PowerShell scripts are incorporated into your environment. See also PowerShell security considerations.

  • Download automation scripts from GitHub.
  • Install the SolarWinds Platform SDK, if necessary.

    The SolarWinds Platform SDK is a powerful tool that can impact SolarWinds Platform data. Users should be well-versed in SQL queries with a background in programming. SolarWinds does not provide pre- or post-Sales support on any SolarWinds Platform SDK customizations, including code. Experiment with the SolarWinds Platform SDK in a non-production instance of SolarWinds Platform. Do not run untested PowerShell scripts against a production instance.

Execute AppInsight automation scripts

After downloading automation scripts and verifying requirements, execute scripts either directly from the command line or from the PowerShell ISE. Provide required data, as prompted.

Due to the complexity of AppInsight for Exchange and AppInsight for IIS, extra steps (known as "Zero Config") are required on target servers, such as setting PowerShell execution policies or adding firewall rules for WinRM.

The exch_create and iis_create scripts include options (shouldConfigureIISServer and shouldconfigureExchangeServer, respectively) that are set to True, by default. When you run either script, two SWIS verbs are invoked on target servers:

  • ScheduleConfiguration launches the Zero Config process.
  • GetConfigurationResult summarizes changes that occurred.

Allow several minutes for configuration to finish. To confirm that scripts ran successfully, click Settings > All Settings > SAM Settings > Manage Application Monitors. On the Manage Assigned Application Monitors page, switch to the Assign Application Monitors tab.