Reason: The default version of Centos6 operating system is Python - 2.6, but the monitoring plug-in requires 2.7+, so try to upgrade it.
View operation:
1、 Using python -V Query the native python system.
Python 2.6.6

10:08:07, October 1, 2018 Important note: backup the current python
2、 Installation dependency:
yum install -y zlib-devel bzip2-devel xz-libs wget

3、 Download Python - 2.7:
wget http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz

4、 Decompress and compile:
tar xf Python-2.7.8.tar.xz
cd Python-2.7.8
./configure --prefix=/usr/local
make && make altinstall
Note: If you execute make altinstall, make: * No targets specified and no makefile found. Stop. The compiler is not installed. Execute: yum install gcc gcc-c++ autoconf automake Installation can be solved!

5、 Establish a soft connection, make the system default python point to python 2.7, and execute in sequence:
mv /usr/bin/python /usr/bin/python2.6.6
ln -s /usr/local/bin/python2.7 /usr/bin/python

6、 Check:
python -V
Now it is the latest version!

7、 Common problem solving:
1) Solve the problem that yum cannot be used:
Execution:
vi /usr/bin/yum
Put the top:
#!/ usr/bin/python
Change to:
#!/ usr/bin/python2.6.6

2) Configure environment variables:
vi /etc/profile
Add the following:

 PY_HOME=/usr/local/bin/python2.7 export PATH=$PY_HOME/bin:$PATH

take effect:
source /etc/profile
Check whether the environment variable contains the python path
echo $PATH

Reference article:
https://jingyan.baidu.com/article/7082dc1c6ad06ce40a89bdf2.html
https://blog.csdn.net/YuanChen22/article/details/60117915