On this page:
- AppDynamics Essentials
- Install the Python Agent
- Disable or Uninstall the Python Agent
- Python Supported Environments
- AppDynamics for Python Architecture
- Python Agent Debugging and Logging
- Dynamic Language Agent Proxy
Search the Instrument Python Applications topics:
Use the instructions on this page to instrument the Python Agent using the Agent Download and Install Wizard in the Controller. This installer configures your agents with the values that you supply in the wizard. This is the simplest way to install the agent.
If you downloaded the agent from use the instructions in Install the Python Agent to instrument your application manually. In this case, see Python Agent Settings for a complete list of all the Python Agent settings that you can use to instrument the agent.
Before You Begin
- Verify support for your application environment at Python Supported Environments.
- Verify that your Python environment meets the following requirements:
- CPython 2.6 or CPython 2.7
- pip 1.4 or later
- access to the Python Package Index (https://pypi.python.org/) by the machine on which you will install the agent
- Confirm you have access to a 4.1 AppDynamics controller to which the agent will report data:
- For a SaaS controller, AppDynamics sent you the Controller host in your Welcome Email.
- For an on-premise controller, the host and port for the Controller are configured at installation time.
- Provide a WSGI-based application to monitor.
- Verify that you can access the machine where the application runs as a user with privileges to install the agent software and restart the application. Verify that you have a user account with these privileges.
- Set enable-threads=1 in your uWSGI configuration file. The agent requires multi-threading to be enabled.
There is a known incompatibility between the Python Agent and versions of uWSGI installed via OS packages managers such as ‘apt-get’. For this reason AppDynamics recommends installing uWSGI from pip to avoid this issue.
- If the application that you will monitor runs in a virtual environment, activate the virtual environment. This is not necessary if the application runs in the global Python environment
Instrument Your Python Application
To instrument your Python application and begin monitoring::
- Setup: Use the wizard to download and set up the agent.
- Install and Configure: Select the Python application deployment environment, run the install script and configure the connection to the controller by downloading the configuration file, editing it if necessary, and saving it in /etc/appdynamics.cfg.
- Apply Load: Restart your application and apply load to activate instrumentation.
- Connect: Verify the connection with the Controller.
- View Your Application: Log on to the Controller to monitor application performance.
The Agent Download Wizard walks you through configuration steps and helps you download the agent. To access it, in the Home page of the controller click Getting Started and then the Python icon.
On the Download page of the wizard enter the minimum information that the agent needs to communicate with the AppDynamics Controller: controller host and port, optionally SSL, application name and tier name.
Install and Configure
- Select the deployment option that corresponds to your Python environment:
- uWSGI with Emperor with a module directive
- uWSGI with Emperor with a wsgi-file directive
- Apache with mod_wsgi
- Process Launcher/Manager
2. Follow the instructions in the wizard to install and instrument the agent. This includes creating the configuration file with the settings needed to connect with the Controller. The instructions vary depending on the deployment option selected in Step 1.
3. The proxy is the component that connects the agent and the controller. If the wizard instructs you to, follow the instructions to launch the proxy manually. This will not be necessary if you selected the Process Launcher/Manager deployment option as the proxy is launched automatically in that case.
4. Wait until the agent connects to the Controller. This can take a few minutes the first time.
Apply load to your application
- Restart your application
- Apply load to your application.
The agent instruments the application code and reports metrics back to the Controller.
Verify Connection to the Controller
On the connect page of the wizard, the indicators turn green when the proxy has successfully connected.
View your application
Log on to the Controller to see your application in action.
From here, you can install more agents or you can begin monitoring your application. The links below will help you get started: