Configure Smart Agent

You require to configure Smart Agents to register with Controller. Edit the configuration file. For example, if you have downloaded the install files at /opt/appdynamics /opt/appdynamics/appdsmartagent/config.ini.

config.ini

This is an example of a config.ini:

ControllerURL    = localhost
ControllerPort   = 8090
FMServicePort    = 8030
AgentType        =
AccountAccessKey =
AccountName      = e2e-customer
EnableSSL        = true

[Telemetry]
LogLevel  = info
LogFile   = log.log

[CommonConfig]
PollingIntervalInSec  = 300
ScanningIntervalInSec = 300

[Storage]
Directory =

[TLSClientSetting]
Insecure           = false
InsecureSkipVerify = false
AgentHTTPProxy     =
AgentHTTPSProxy    =
AgentNoProxy       =

[TLSSetting]
CAFile     =
CAPem      =
CertFile   =
CertPem    =
KeyFile    =
KeyPem     =
MinVersion = TLS 1.2
MaxVersion = TLS 1.3
IncludeSystemCACertsPool = true

[AutoDiscovery]
RunAutoDiscovery = true
ExcludeLabels = process.cpu.usage,process.memory.usage
ExcludeProcesses =
ExcludeUsers =
AutoDiscoveryTimeInterval = 4h

Configure Smart Agent with Environment Variables

The Smart Agent provides flexible configuration options through environment variables, allowing dynamic adjustments without directly modifying configuration files. It supports two distinct methods for leveraging environment variables:

Configuration Overrides

The environment variables can directly override specific values defined in the Smart Agent config.ini file. This method is ideal for quickly changing the configuration settings.

When the Smart Agent starts, it checks for predefined environment variable names that correspond to config.ini settings. If an override environment variable is present, its value takes precedence over the value specified in config.ini. For the supported override environment variable corresponding to the required configuration, see the configuration tables in the following sections:

Environment Variable Expansion

You can embed environment variables directly within the config.ini file as values for configuration keys. The Smart Agent will expand and resolve these variables to their system-defined values during startup.

This allows for dynamic configuration values that are resolved at runtime from the environment where the Smart Agent is running.

The Smart Agent supports environment variable expansion within config.ini values, following the supported syntax.

These are the format requirements:

  • Must start with ${
  • Optionally followed by env:
  • Must follow with the name of the environment variable to be substituted. The name:

    • Must start with an alphabetic character or _.
    • Must follow with any number of alphanumeric characters or _.
  • Optionally followed by a default value. The default value:

    • Must start with :-
    • Must follow with DEFAULT-VALUE, which can be any number of printable characters and whitespace except }.
  • Must end with }

The following is an example where the environment variable, ACCESS_KEY is defined for AccountAccessKey and env:USE_SSL:-true is defined for EnableSSL:

AccountAccessKey = ${ACCESS_KEY}
EnableSSL        = ${env:USE_SSL:-true}
Use $$ to indicate a literal $ character within a configuration value. For example, to represent an account name of e2e-customer$:
AccountName = e2e-customer$$

Basic Configuration

The basic configuration is the required configuration to register Smart Agent with Controller. Ensure that you update the following parameters for the basic Smart Agent configuration:

  • ControllerURL : The URL of the Controller on which you want to establish the connection with the Smart Agent.
  • ControllerPort: The port to which Controller connects to the Agent Management (FM service). The default port is 8090

  • FMServicePort: The port to which the Smart Agent connects to the FM service.

    It is 8030 for an on-premises Controller and 443 for the Virtual Appliance.

  • AccountAccessKey : The account access key on the Controller.
  • AccountName
  • EnableSSL : SSL is enabled by default. To turn off SSL, specify the value as false.
ParameterEnvironment Variables to OverrideDescription
ControllerURLSUPERVISOR_CONTROLLER_URLThe URL of the Controller on which you want to establish the connection with the Smart Agent.
ControllerPortSUPERVISOR_CONTROLLER_PORTThe port to which Controller connects to the Agent Management (FM service). The default port is 8090
FMServicePort:SUPERVISOR_FM_SERVICE_PORT The port to which the Smart Agent connects to the FM service.

It is 8030 for an on-premises Controller and 443 for the Virtual Appliance.

AccountAccessKeySUPERVISOR_ACCOUNT_ACCESS_KEYThe account access key on the Controller.
AccountNameSUPERVISOR_ACCOUNT_NAMEThe name of the account on the Controller.
EnableSSLSUPERVISOR_ENABLE_SSLSSL is enabled by default. To turn off SSL, specify the value as false

Advanced Configuration

You can use the following configurations as per your requirement. These are not mandatory parameters. You can also include these configurations after Smart Agent installation, but ensure to restart Smart Agent to apply the configuration.

Proxy Configuration

If you require to configure the proxy settings, specify the following fields under the TLSClientSetting section of the config.ini file.

ParameterEnvironment Variables to OverrideDescriptionExample
AgentHTTPProxyHTTP_PROXYspecify the proxy URL for this parameter when you use an HTTP Controller.

myhostmyhost:3128

AgentHTTPSProxyHTTPS_PROXYspecify the proxy URL for this parameter when you use an HTTPS Controller.myhost:8443
AgentNoProxy NO_PROXYspecify comma-separated values for hosts that should be excluded from proxying .internal.example.com,internal2.example.com

HTTP proxy example

The following example is for using the HTTP proxy for the Smart Agent:

[TLSClientSetting]
Insecure = false
AgentHTTPProxy  = localhost:3128
AgentHTTPSProxy =
AgentNoProxy    =

TLS Configuration

If you require to configure the TLS certificate, specify the following fields under the TLSSetting config.ini.

ParameterEnvironment Variable for configuration OverrideDescriptionExample
CAFileSUPERVISOR_CA_FILEspecify the path to the root certificate file.<cert file path>/ca.crt
CertFileSUPERVISOR_CERT_FILEspecify the path to the client certificate file.<client cert file path>/clients .crt
KeyFileSUPERVISOR_KEY_FILEspecify the path to the client private key of the file.<private key file path>/private.key

Log Level Configuration

You can specify the log level details in the Telemetry section. You can use any of the following log levels:

  • debug
  • info
  • warn
  • error

Telemetry

ParametersEnvironment Variable for configuration OverrideDescription
LogLevelSUPERVISOR_LOG_LEVELThe logging level such as info.
LogFileSUPERVISOR_LOG_FILEThe path to the log file.

Log level example

The following example is for using the info log level:

[Telemetry]
LogLevel=info
LogFile=
Profiling=false