appzer / zabbix-pushsafer

A python script for sending pushsafer.com notifications in ZABBIX.
https://www.pushsafer.com
7 stars 2 forks source link

ImportError: No module named pushsafer #5

Closed khoavan001 closed 4 years ago

khoavan001 commented 4 years ago

hi, i am using CentOS 7. i have already install : pip install python-pushsafer . when run script ./zabbix-pushsafer-centOS.sh , it showing me error: ImportError: No module named pushsafer

[root@localhost alertscripts]# ./zabbix-pushsafer-centOS.sh Traceback (most recent call last): File "./zabbix-pushsafer-centOS.sh", line 20, in import pushsafer ImportError: No module named pushsafer

Can you help me? any packages is needed?

appzer commented 4 years ago

please check if the python pushsafer package installed correctly. You can test it like described here: https://github.com/appzer/python-pushsafer

khoavan001 commented 4 years ago

hi, successful install package. try to test script with the parameters as below: sendto but i got this message from zabbix server: :Connection timeout of 3 seconds exceeded when connecting to Zabbix server "10.239.72.229". 72.229 is my zabbix web server is there any needed SMTP configure?

appzer commented 4 years ago

no, please try this one also: https://github.com/appzer/zabbix-pushsafer/blob/master/zabbix-pushsafer.py

jimmys01 commented 4 years ago

I also get the same error. When i run it through the command line everything is OK thought

appzer commented 4 years ago

did you try all steps above?

jimmys01 commented 4 years ago

Yes I have.

appzer commented 4 years ago

what script you tried? zabbix-pushsafer.py or zabbix-pushsafer-centOS.sh! What operating system you use?

jimmys01 commented 4 years ago

I have used both zabbix-pushsafer.py and zabbix-pushsafer-centOS.sh with the same result

 File "/usr/lib/zabbix/alertscripts/zabbix-pushsafer-centOS.sh", line 20, in <module>
import pushsafer
ImportError: No module named pushsafe

Ubuntu 18.04.5 LTS

As i said, running it from the cmd the script works fine.

THanks for your time!!

appzer commented 4 years ago

please try to run the pushsafer.py script on the CLI to test if script work and/or plugin works! For it works fine!

python zabbix-pushsafer.py PRIVATEKEY MESSAGE TITLE

jimmys01 commented 4 years ago

In the cli it works fine in the zabbix it is not. Your library works fine. in conjuction with the zabbix server it is not. εικόνα

appzer commented 4 years ago

please try to get help in the zabbix forum, i do not have an anwser for that issue!

Kevin