This page applies to an earlier version of the AppDynamics App IQ Platform.
For documentation on the latest version, see the 4.4 Documentation.


On this page:

Related pages:

 

Search the Instrument Python Applications topics:

 

Watch the video:

Start Monitoring Python Applications

Your Rating:
Results:
PatheticBadOKGoodOutstanding!
47 rates

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 PyPI 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

  1. Verify support for your application environment at Python Supported Environments.
  2. 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
  3. 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.
  4. Provide a WSGI-based application to monitor.
  5. 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.
  6. 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.
  7. 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::

  1. Setup: Use the wizard to download and set up the agent.
  2. 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.
  3. Apply Load: Restart your application and apply load to activate instrumentation.
  4. Connect: Verify the connection with the Controller.
  5. View Your Application: Log on to the Controller to monitor application performance.

Setup

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

  1. 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

  1. Restart your application
  2. 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: