Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-13184

Agent ignores PYTHONPATH environment variable

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 3.2.10
    • Agent (G)
    • Debian Stretch

      root@zbx:~# cat /etc/environment 
      export PYTHONPATH=/usr/local/lib/python3
      

      root@zbx:~# echo $PYTHONPATH
      /usr/local/lib/python3
      

      root@zbx:~# python -c "import sys; print(sys.path)"
      
      ['', '/usr/local/lib/python3', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
      

      root@zbx:~# cat /etc/zabbix/zabbix_agentd.d/pythonpath.conf
      UserParameter=displayPythonPath,python -c "import sys; print(sys.path)"
      

      root@zbx:~# zabbix_get -s 127.0.0.1 -k displayPythonPath
      
      ['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
      

            Unassigned Unassigned
            nryc Nicolas C.
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: