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
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
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.
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
_.
- Must start with an alphabetic character 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 start with
-
Must end with }
ACCESS_KEY is defined for AccountAccessKey and env:USE_SSL:-true is defined for EnableSSL:
AccountAccessKey = ${ACCESS_KEY}
EnableSSL = ${env:USE_SSL:-true}
$$ 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:
| Parameter | Environment Variables to Override | Description |
|---|---|---|
| ControllerURL | SUPERVISOR_CONTROLLER_URL | The URL of the Controller on which you want to establish the connection with the Smart Agent. |
| ControllerPort | SUPERVISOR_CONTROLLER_PORT | The 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 |
| AccountAccessKey | SUPERVISOR_ACCOUNT_ACCESS_KEY | The account access key on the Controller. |
| AccountName | SUPERVISOR_ACCOUNT_NAME | The name of the account on the Controller. |
| EnableSSL | SUPERVISOR_ENABLE_SSL | SSL 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.
| Parameter | Environment Variables to Override | Description | Example |
|---|---|---|---|
| Insecure | None | Allows the client transport to operate without TLS when no custom CA is configured. The default is false. Keep this value false for secure production connections. For a plaintext connection, use it consistently with EnableSSL=false. This setting is different from InsecureSkipVerify, and is ignored when InsecureSkipVerify is true. |
Insecure = false |
| InsecureSkipVerify | None | Disables verification of the server's TLS certificate. The default is false. Set this to true only for temporary testing because it reduces connection security |
InsecureSkipVerify = false |
| AgentHTTPProxy | HTTP_PROXY | specify the proxy URL for this parameter when you use an HTTP Controller. |
|
| AgentHTTPSProxy | HTTPS_PROXY | specify the proxy URL for this parameter when you use an HTTPS Controller. | myhost:8443 |
| AgentNoProxy | NO_PROXY | specify 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.
| Parameter | Environment Variable for configuration Override | Description | Example |
|---|---|---|---|
| CAFile | SUPERVISOR_CA_FILE | specify the path to the root certificate file. | <cert file path>/ca.crt |
| CAPem | None | specify one or more PEM-encoded CA certificates directly in the configuration instead of loading them from CAFile. The certificates are used to verify the server certificate. Do not configure both CAFile and CAPem. Smart Agent does not reject this combination; CAFile takes precedence and CAPem is ignored. |
CAPem = <PEM-encoded CA certificate> |
| CertFile | SUPERVISOR_CERT_FILE | specify the path to the client certificate file. | <client cert file path>/clients .crt |
| KeyFile | SUPERVISOR_KEY_FILE | specify the path to the client private key of the file. | <private key file path>/private.key |
| KeyPem | None | specify the PEM-encoded private key corresponding to the configured client certificate. This is an alternative to KeyFile. Protect the configuration file because this value contains sensitive key material. Do not configure both KeyFile and KeyPem. |
KeyPem = <PEM-encoded private key> |
| MinVersion | None | specify the minimum TLS version Smart Agent can use. The default is TLS 1.2. |
MinVersion = TLS 1.2 |
| MaxVersion | None | specify the maximum TLS version Smart Agent can use. The default is TLS 1.3. This value must not be lower than MinVersion. |
MaxVersion = TLS 1.3 |
| IncludeSystemCACertsPool | None | determines whether certificates from the operating system's trusted CA store are included when building the trust pool from CAFile or CAPem. When true, the configured CA certificates are added to the system CA pool. When false, only the configured CA certificates are trusted. The default is true. This setting takes effect only when CAFile or CAPem is configured. When neither is set, the operating system trust store is used regardless of this value. |
IncludeSystemCACertsPool = true |
| CertPem | None | specify the PEM-encoded client certificate directly in the configuration for mutual TLS authentication. This is an alternative to CertFile. A corresponding private key must be supplied through KeyPem or KeyFile. Do not configure both CertFile and CertPem. |
CertPem = <PEM-encoded client certificate> |
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
| Parameters | Environment Variable for configuration Override | Description |
|---|---|---|
| LogLevel | SUPERVISOR_LOG_LEVEL | The logging level such as info. |
| LogFile | SUPERVISOR_LOG_FILE | The path to the log file. |
Log level example
The following example is for using the info log level:
[Telemetry]
LogLevel=info
LogFile=
Profiling=false
Common Configuration
| Parameter | Environment Variables to Override | Description | Example |
|---|---|---|---|
| PollingIntervalInSec | None | Specifies, in seconds, how frequently Smart Agent polls the Agent Management service. The default is 300. Enter a positive integer. |
PollingIntervalInSec = 300 |
| ScanningIntervalInSec | None | Specifies, in seconds, how frequently Smart Agent scans its managed-agent configuration files and reconciles additions, removals, or changes. The default is 300. The value must be a positive integer. |
ScanningIntervalInSec = 300 |
Storage
| Parameter | Environment Variables to Override | Description | Example |
|---|---|---|---|
| Directory | None | Directory used for persistent Smart Agent state. If empty, Smart Agent uses <smart-agent-install-directory>/storage. Relative paths are resolved against the installation directory. The Smart Agent process must have write permission to the directory. |
Directory = /opt/appdynamics/appdsmartagent/storage |
Auto Discovery
| Parameter | Environment Variables to Override | Description | Example |
|---|---|---|---|
| RunAutoDiscovery | None | Enables or disables automatic discovery of supported application processes running on the host. The packaged Smart Agent configuration sets this to true; if the field is omitted, the loader default is false. |
RunAutoDiscovery = true |
| ExcludeLabels | None | Specify a comma-separated list of process attribute names that Smart Agent must not collect during auto-discovery. Values are exact label names, not regular expressions. Examples include process.cpu.usage, process.memory.usage, and process.command_line. |
ExcludeLabels = process.cpu.usage,process.memory.usage |
| ExcludeProcesses | None | Specify a comma-separated list of regular-expression patterns. Smart Agent excludes a process from auto-discovery when its full command line matches any configured pattern. Leave empty to avoid excluding processes by command line. | ExcludeProcesses = .*internal-tool.*,.*health-check.* |
| ExcludeUsers | None | Specify a comma-separated list of operating-system usernames. Smart Agent excludes all processes owned by a listed user. Username matching is exact. Leave empty to discover processes regardless of owner. | ExcludeUsers = root,svc_backup |
| AutoDiscoveryTimeInterval | None | Specify how frequently Smart Agent performs process auto-discovery and exports the collected information. Use a duration such as 30m, 2h, or 4h. The default is 4h. |
AutoDiscoveryTimeInterval = 4h |