Ad Widget

Collapse

Issue with Zabbix 5.0 Server and Python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vicchern
    Junior Member
    • Jul 2021
    • 3

    #1

    Issue with Zabbix 5.0 Server and Python

    Hey, Community. On Centos 7(Amazon Linux 2 Karoo), we are running Zabbix Server 5.0.
    There we have a bunch of python scripts.
    Local python -V is 2.7.
    If I running locally
    Code:
    zabbix_agentd -t <item>
    in returns a value
    But if I click on the item Test button, it returns an error:
    Code:
    File "/etc/zabbix/test_scripts/dbLogContactIdAlarmMessageTable.py", line 3, in <module>
    import mysql.connector
    ImportError: No module named mysql.connector"
    Code:
    python 
    >>> import mysql.connector
    works fine
    Code:
    zabbix_agentd -t <item> or python script.py
    works perfect.
    Please, let me know if someone faced with this kind of problem and resolved it.
Working...