Agent Installation Options
  • 31 Dec 2020
  • 4 Minutes To Read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Agent Installation Options

  • Print
  • Share
  • Dark
    Light

In some circumstances, you may find you need to install the APM Profiler for .NET in a manner other than the default installation approach. This documentation covers those outside-the-norm installation methods that are available to you. You will also find some additional details here about how the .NET Profiler works.

Command Line Installation

Performing a Silent Install

To perform a silent install of the Stackify agent, run the following in the Command Prompt in the directory that you installed the agent:

"Stackify Version#.exe" /s /v"ACTIVATIONKEY=activationkey ENVIRONMENT=\"environment\" NEWPROFILER=1 /qn /l*v .Log.txt"

You will need to specify the installer version number, ACTIVATIONKEY and ENVIRONMENT parameters with your information.

Note: The " escapes are only necessary if the environment name has a space or special characters in it. The /l is optional. This will create a log file of the installation called Log.txt.

Uninstalling Silently

You can perform a silent "uninstall" in a similar way as the installation script above, this time with an argument of /x (the standard MSI argument) to uninstall:

"Stackify v[Version#].exe" /x

Note: If the agent is still on the same version used from original install, just execute that same package again from wherever you saved it.

Note: If the agent has been auto-updated, you will want to execute this from the file found in "Program Files (x86)\Stackify\AgentExeStaging".

Silent Install with APM Profiler Disabled

If you want to silently install without enabling the CLR profiler for Retrace add the ENABLEPROFILER parameter and set it to 0. By default, the profiler is enabled. It would look like this in the Command Line:

"Stackify Version#.exe" /s /v"ACTIVATIONKEY=activationkey ENVIRONMENT=\"environment\" ENABLEPROFILER=0 /qn /l*v .\Log.txt"

Note: If you disable APM during the installation, this setting will still be honored after updates of the agent.

Automating deployments

If you are using a configuration management tool such as Puppet or Chef, you will not want to automate the install of a specific version. Instead you can use the Powershell script below to download the most recent version and then install it.

$storagedir = $pwd
$webclient = New-Object System.Net.WebClient
$url = "https://s1.stackify.com/account/agentdownload/index"
$file = "$storagedir\StackifyInstall.exe"
$webclient.DownloadFile($url,$file)
& $file /s /v"ACTIVATIONKEY=your_Activation_key ENVIRONMENT=\`"Put your environment here\`" ATTACHALL=1  RESTARTIIS=1 NEWPROFILER=1 /qn /l*v .Log.txt"

Save this as a .ps1 file and you can execute it by running it manually in the directory where the .ps1 file is located:

.\filename.ps1

Or you can have a runbook execute it.

Additonal Command Line Options

Setting Environment Name

`ENVIRONMENT=\"Your environment name\"`
"Stackify_v[Version#]" /s /v"ACTIVATIONKEY=YOUR_KEY ENVIRONMENT=\"ENTER_ENVIRONMENT_HERE\" /qn /l*v .\Log.txt"

Note: If you are reinstalling the agent on a device that was previously setup, you will need to change the environment name in the environment dropdown box of the server settings.

Install with the .NET CLR Profiler Disabled

By default, this is enabled.

ENABLEPROFILER=0
"Stackify_v[Version#]" /s /v"ACTIVATIONKEY=YOUR_KEY ENVIRONMENT=\"ENTER_ENVIRONMENT_HERE\" ENABLEPROFILER=0 /qn /l*v .\Log.txt"

Enabling Automatic IIS Restart

Retrace and Stackify's .NET profiler will not be able to collect data until IIS has been restarted. We recommend having the installer automatically restart IIS.

RESTARTIIS=1
"Stackify_v[Version#]" /s /v"ACTIVATIONKEY=YOUR_KEY ENVIRONMENT=\"ENTER_ENVIRONMENT_HERE\" ENABLEPROFILER=1 RESTARTIIS=1 /qn /l*v .\Log.txt"

Enabling Profiling of .NET Core and Windows Services

ATTACHALL=1
"Stackify_v[Version#]" /s /v"ACTIVATIONKEY=YOUR_KEY ENVIRONMENT=\"ENTER_ENVIRONMENT_HERE\" ENABLEPROFILER=1 RESTARTIIS=1 ATTACHALL=1 /qn /l*v .\Log.txt"

Note: There are some additional steps needed to configure Retrace for non-IIS apps.

Enabling IP Masking

Enabling the IPMASK argument will remove the device's IP address from showing up in the Server Dashboard and Server Settings. It will also mask the IP address in our internal databases.

IPMASK=1
"Stackify_v[Version#]" /s /v"ACTIVATIONKEY=YOUR_KEY ENVIRONMENT=\"ENTER_ENVIRONMENT_HERE\" IPMASK=1 /qn /l*v .\Log.txt"

Note: If this device was previously set up with an agent, you will want to first remove the device from the portal.

Enabling a Device Alias

Setting the device alias will change the default ComputerName variable that the agent uses to determine the host name. This can also be set in the Server Settings modal.

DEVICEALIAS="Your device alias name"
"Stackify_v[Version#]" /s /v"ACTIVATIONKEY=YOUR_KEY ENVIRONMENT=\"ENTER_ENVIRONMENT_HERE\" DEVICEALIAS=\"ENTER_ALIAS_HERE\" /qn /l*v .\Log.txt"

Modifying the Stackify.ini

If you wish to modify the settings on a server that is already running a Retrace agent, but don't want to control it via the Retrace Dashboard

Enable/Disable APM Profiler

  1. Open [Install Drive]:Program Files (x86)/Stackify/Stackify.ini. Find the following [Features] section:
[Feature]
EnableProfiler=1
RestartIIS=1
ProfilerStarted=0
  1. Modify the following keys to alter the profiler settings:
EnableProfiler=1
  • Blank = disabled
  • 0 = disabled
  • 1 = enabled
RestartIIS=1

(IIS behavior when the the "EnableProfiler" setting has changed and the agent restarts)

  • Blank = no restart
  • 0 = no restart
  • 1 = restart
  1. Restart the service Stackify Monitoring Service by the Windows Services console

Note: Depending on the chosen method for enabling profiling, you may need to manually restart IIS for profiling and data collection to begin.

Per User Account Registration

If you set ATTACHALL=1 or check the checkbox during deployment to profile .NET Core and Windows Services, the profiler will attempt to profile any .NET CLR application running on the machine. Otherwise, it will default to only trying to profile IIS applications. It is possible to set the environment variables on specific user accounts to control what applications the .NET CLR profiler attempts to profile.

IIS "Classic" Application Pools

If you are running IIS with an application pool set to classic mode, please review this document: Install Stackify Module For Classic IIS App Pools

Was This Article Helpful?