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 Monitoring server. The Python data collector helps you to manage the performance and availability of the following:

Important: The Python data collector can monitor the applications running on the internal web servers of Django or Flask frameworks, mod_wsgi/apache httpd and uWSGI.

System requirements

For the detailed system requirements of Python data collector, see system requirements for Python data collector.

Prerequisites

Make sure that you install psutil to your Python application. Otherwise, you might get an error when deploying the Python data collector:

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

Depending on your Python version (2.7 or 3) and Linux operation system type, run the proper tool to install psutil.