Configuring the Python agent
You must configure the Monitoring Agent for Python so that the agent can collect data from the Python application that is being monitored.
Before you begin
Ensure that the Apache HTTPD server is started before you configure the agent.
Open the Apache HTTPD server httpd.conf configuration files and ensure that mod_status is loaded.
- Stop the agent instance.
- Follow one of the procedures to configure the agent instance:
- Make sure that the new middleware is deployed to the Django setting folder. To do that, make sure the kpg_numeric_string.py file in the Django setting folder is updated.
- Restart the Apache server.
About this task
To avoid permission issues when you configure the agent, be sure to use the same root user or non-root user ID that was used for installing the agent. If you installed your agent as a selected user and want to configure the agent as a different user, see Configuring agents as a non-root user. If you installed and configured your agent as a selected user and want to start the agent as a different user, see Starting agents as a non-root user.
Procedure
What to do next
After you start the agent instance, an injection script to customize your monitoring middleware is generated and provided in a temporary directory.
- install_dir/tmp/kpg/inject_numeric_string.sh
- Django_setting_folder/kpg_numeric_string.py
- Backs up the original WSGI setting file for each Django application.
- Copies the customized WSGI setting file to override the original file
- Moves the customized middleware to the Django application folder.
- Enables module status for Apache server.
- Stop: apache_bin_directory/httpd -k graceful-stop
- Restart: apache_bin_directory/httpd -k graceful