Zabbix-Network-Weathermap
Zabbix-Network-Weathermap copied to clipboard
Zabbix on Centos - Errors
Hello,
Can u please help me with error that i have in Zabbix with Network Weathermap. When i search for Zabbix server logs i get this:
error reason for "Zabbix server:weathermap.update.only[{$UPDATE}]" changed: Value "Traceback (most recent call last):
File "/opt/Zabbix-Network-Weathermap/weathermap.py", line 10, in
I see the same thing when i hover over items on host where i have Weathermap template.
How can i fix this ? Thank you in advance :)
Hi, ImportError: No module named 'config' File /opt/Zabbix-Network-Weathermap/config.py is exist? Who is owner/group/other of file config.py? What permissions are set for config.py?
Hey,
Yes File /opt/Zabbix-Network-Weathermap/config.py does exist.
Here are ownership, permissions, etc : -rwxr-xr-x 1 zabbix zabbix 18550 Feb 7 11:52 config.py
Try run weathermap from cli:
sudo -u zabbix /opt/Zabbix-Network-Weathermap/starter.py -m mapname1.yaml
Try run weathermap from other path, for example from home dir cd /home/user.
Got error?
sudo -u zabbix set PYTHONPATH=${PYTHONPATH}:/opt/Zabbix-Network-Weathermap
When i run command from CLI i get:
sudo -u zabbix /opt/Zabbix-Network-Weathermap/starter.py -m VPN.yaml
Traceback (most recent call last):
File "/opt/Zabbix-Network-Weathermap/weathermap.py", line 10, in
Even when i try to execute command from /home/user i still get same error.
When I use: sudo -u zabbix set PYTHONPATH=${PYTHONPATH}:/opt/Zabbix-Network-Weathermap
i get error sudo: set: command not found
I have no idea why it does not work, maybe this is a specific problem in centos.
ls -la /opt/Zabbix-Network-Weathermap
ls -la /opt/Zabbix-Network-Weathermap total 92 d-wx--x--x 9 root root 262 Jun 10 14:09 . drwxr-xr-x. 5 root root 67 Jun 10 13:45 .. -rw-r--r-- 1 zabbix zabbix 18550 Feb 7 11:52 config.py -rw-r--r-- 1 zabbix zabbix 13129 Feb 7 11:52 converter.py drwxr-xr-x 2 zabbix zabbix 32 Feb 7 11:52 fonts drwxr-xr-x 2 zabbix zabbix 4096 Feb 7 11:52 icons drwxr-xr-x 2 zabbix zabbix 61 Jun 10 13:48 mapcfgs drwxr-xr-x 2 zabbix zabbix 37 Jun 10 13:48 mapimgs -rw-r--r-- 1 zabbix zabbix 14264 Feb 7 11:52 mapping.py drwxr-xr-x 2 root root 94 Jun 10 13:48 pycache -rw-r--r-- 1 zabbix zabbix 8672 Feb 7 11:52 README.md -rw-r--r-- 1 zabbix zabbix 38 Feb 7 11:52 requirements.txt -rwxr-xr-x 1 zabbix zabbix 376 Feb 7 11:52 starter.py drwxr-xr-x 2 zabbix zabbix 65 Feb 7 11:52 template drwxr-xr-x 2 zabbix zabbix 25 Feb 7 11:52 tests -rwxr-xr-x 1 zabbix zabbix 4562 Feb 7 11:52 weathermap.py -rw-r--r-- 1 zabbix zabbix 7000 Feb 7 11:52 zabbix.py
pycache owner root
rm -r /opt/Zabbix-Network-Weathermap/pycache
Even when i removed pycache and run sudo -u zabbix /opt/Zabbix-Network-Weathermap/starter.py -m VPN.yaml im still having same error output.
Traceback (most recent call last):
File "/opt/Zabbix-Network-Weathermap/weathermap.py", line 10, in
I dont know why he dont see config file when config.py is in there
If you run a weathermap from the root user or self, does it work?
I can run it as root but i get that error. If i tray as my self then i need to enter password for root. Don't know why he cant load or find modul 'config'.
Same error output as root or myself:
Traceback (most recent call last):
File "/opt/Zabbix-Network-Weathermap/weathermap.py", line 10, in
Little update i managed to execute command sudo -u zabbix set PYTHONPATH=${PYTHONPATH}:/opt/Zabbix-Network-Weathermap, but in order to execute it I only needed set PYTHONPATH=${PYTHONPATH}:/opt/Zabbix-Network-Weathermap part.
And now even tho i see PYTHONPATH=:/opt/Zabbix-Network-Weathermap with env command i still get same error problem ImportError: No module named 'config'.