Configuring Python application monitoring
You can use the Python data collector to monitor your Python applications. Through detecting, diagnosing, and isolating performance issues, the Python data collector helps you ensure optimal performance and efficient use of resources, reduce, and prevent application crashes and slowdowns around the clock.
You can configure the Python data collector to
connect to the Cloud App Management server. The Python data collector helps you to manage the performance and
availability of the following:
- Python applications with Django or Flask frameworks in Kubernetes environments
- Local Python applications with Django or Flask frameworks
Important: The Python data collector
can monitor only internal web servers of Django or Flask frameworks.
- System requirements
-
For the detailed system requirements of Python data collector, see system requirements for Python data collector.
- Prerequisites
- Make sure that you install
psutilto your Python application. Otherwise, you might get an error when deploying the Python data collector:
Depending on your Python version (2.7 or 3) and Linux operation system type, run the proper tool to installgcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_VERSION=430 -I/usr/include/python3.6m -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_linux.o psutil/_psutil_linux.c:12:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1psutil.- If it is Ubuntu or Debian, and Python version is 2, run the following
command:
sudo apt-get install python-dev - If it is Ubuntu or Debian, and Python version is 3, run the following
command:
sudo apt-get install python3-dev - If it is CentOS or RHEL, and Python version is 2.7, run the following command:
sudo yum install python-devel - If it is CentOS or RHEL, and Python version is 3, run the following
command:
sudo yum install python3-devel
- If it is Ubuntu or Debian, and Python version is 2, run the following
command: