Configure the Agent
Provide a configuration file that specifies the required AppDynamics settings for agent-Controller communication. The file should be in Python ConfigParser format. The Python application user must have read access on the configuration file.
Note that lines in the configuration file must not start with spaces. Lines that begin with a # are comments and are ignored by the agent.
The following is a simple sample configuration file with minimum required settings.
[agent]
app = <app_name>
tier = <tier_name>
node = <node_name>
[controller]
host = <controller_host>
port = <controller_port>
ssl = true
account = <your AppDynamics controller account name>
accesskey = <your AppDynamics controller account access key>
Note the following points in the configuration:
- The ssl settings determines whether the agent connects to the Controller by SSL. This is required for SaaS Controllers.
- The
account
value is required if you are using a SaaS account or a multi-tenant on-premises controller. It defaults tocustomer1
for a single tenant controller. - The accesskey is required for all controllers. To find your account name and access
key, click
in the upper right corner of the AppDynamics UI, then click License.
- Other settings, such as
ssl
,http-proxy
, orwsgi_module
, may be required for your environment. See Python Agent Settings for a complete list of settings.
When you instrument an application using pyagent run
, you pass the
configuration file path as a parameter to the pyagent
run command. In other deployments set the APPD_CONFIG_FILE
environment variable as illustrated below in the samples for uWSGI with Emperor and Apache with mod_wsgi.
--init
as an argument with the docker run
command. For
example:docker run -idt --privileged --init --name <container-name> <container-id> sh
You
can use tini as the Entrypoint of the docker
file:RUN apk add --no-cache tini
# Tini is now available at /sbin/tini
ENTRYPOINT ["/sbin/tini", "--"]