Hi,
I hope this post will help improve this project that i find very interesting and useful.
For the last few days, i've been trying without success to add this script to zabbix. I've been researching a solution to my problem all around the internet without success.
This is the problem:
I followed the instructions, installed the script in the correct directory, changed the parameters, created the log file and ran the script via console with success. But it didn't worked on the Zabbix front-end itself.
I then gave the rights to the user zabbix to use the script sms.php and all its dependencies.
Still not working.
After a few hours of diagnose, i found the problem: I didn't gave the rights to the user zabbix to use the logs files. and everytime i ran the script i was connected as root so the warning about the script path not existing wasn't popping up on the shell and in Zabbix front end, the status of the script usage was OK.
What i'm proposing for an improvement is to include:
in the documentation :
as root : chown -R zabbix:zabbix /usr/lib/zabbix/alertscripts
chown -R zabbix:zabbix /var/log/zabbix-server/sms/
chmod 755 /usr/lib/zabbix/alertscripts/sms.php
Then as zabbix:
su -l zabbix -s /bin/bash
cd /usr/lib/zabbix/alertscripts
./sms.php 31123451234 "test" "this is a test"
in the script:
A way to make the error pop up in the zabbix front end because when this error happend, zabbix just says OK. So maybe there is a way to make the error message (...make sure the directory /var/log/zabbix-server/sms/ exists ...) appear in the zabbix front end and to return a failure state if the script can't find the path to the log folder.
I'm going to try and contribute myself on the project but i'm not a programmer i work in networking so i'm maybe not gonna be able to do it myself that is why i'm posting today.
Hi, I hope this post will help improve this project that i find very interesting and useful. For the last few days, i've been trying without success to add this script to zabbix. I've been researching a solution to my problem all around the internet without success.
This is the problem: I followed the instructions, installed the script in the correct directory, changed the parameters, created the log file and ran the script via console with success. But it didn't worked on the Zabbix front-end itself. I then gave the rights to the user zabbix to use the script sms.php and all its dependencies. Still not working.
After a few hours of diagnose, i found the problem: I didn't gave the rights to the user zabbix to use the logs files. and everytime i ran the script i was connected as root so the warning about the script path not existing wasn't popping up on the shell and in Zabbix front end, the status of the script usage was OK.
What i'm proposing for an improvement is to include:
in the documentation : as root : chown -R zabbix:zabbix /usr/lib/zabbix/alertscripts chown -R zabbix:zabbix /var/log/zabbix-server/sms/ chmod 755 /usr/lib/zabbix/alertscripts/sms.php Then as zabbix: su -l zabbix -s /bin/bash cd /usr/lib/zabbix/alertscripts ./sms.php 31123451234 "test" "this is a test"
in the script: A way to make the error pop up in the zabbix front end because when this error happend, zabbix just says OK. So maybe there is a way to make the error message (...make sure the directory /var/log/zabbix-server/sms/ exists ...) appear in the zabbix front end and to return a failure state if the script can't find the path to the log folder.
I'm going to try and contribute myself on the project but i'm not a programmer i work in networking so i'm maybe not gonna be able to do it myself that is why i'm posting today.
I hope this helps someone
Regards,