Agent ignores PYTHONPATH environment variable

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Minor
    • None
    • Affects Version/s: 3.2.10
    • Component/s: Agent (G)
    • Environment:
      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']
      

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

              Created:
              Updated:
              Resolved: