Ad Widget
Collapse
I am loosing hope
Collapse
X
-
Oh, man I don't have permissions to this location:
But why? I done chmod 755. Like it's writing in every manual.zabbix@ht-50814ffc17b2c:~$ ls /etc/zabbix/alert.d/
ls: cannot open directory /etc/zabbix/alert.d/: Permission denied
What I shoul do to give Zabbix user this permissions?Comment
-
Ok, I give access to this file for Zabbix user but still I can't send notifications from Zabbix:
zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ls
You gmail.sh zabbix_sendmail_test.conf
cli_sms_clickatell.php smstrade.php zext_msmtp.sh
gmail.conf zabbix_sendmail.confComment
-
Sorry, that I made 3 post, but I can't paste everything in one post.
And results of runing scrpits are below. This is crazy. Any of scripts is working. Only fifth script don't give errors, but any sms is going on my phone. Alsko, in smstrade.eu I have information that no smsm was send. I don't understant this ;/zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ls -l /etc/zabbix/alert.d/
total 28
-rw-r--r-- 1 zabbix zabbix 0 Nov 12 16:13 You
-rwxr-xr-x 1 zabbix zabbix 4004 Nov 7 18:18 cli_sms_clickatell.php
-rwxr-xr-x 1 zabbix zabbix 228 Oct 26 16:38 gmail.conf
-rwxr-xr-x 1 zabbix zabbix 2662 Oct 26 18:11 gmail.sh
-rwxr-xr-x 1 zabbix zabbix 1744 Nov 12 14:51 smstrade.php
-rwxr-xr-x 1 zabbix zabbix 388 Nov 20 14:59 zabbix_sendmail.conf
-rwxr-xr-x 1 zabbix zabbix 397 Nov 20 14:53 zabbix_sendmail_test.conf
-rwxr-xr-x 1 zabbix zabbix 219 Nov 20 15:08 zext_msmtp.sh
Second:zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ./gmail.sh
./gmail.sh: line 1: $'\E[?1049h\E[?1h\E=\E[1': command not found
./gmail.sh: line 1: $'24r\E[?12': command not found
./gmail.sh: line 1: $'25h\E[?12l\E[?25h\E[27m\E[m\E[H\E[2J\E[?25l\E[24': command not found
./gmail.sh: line 1: 1H/etc/msmtprc: No such file or directory
./gmail.sh: line 1: $'1Hdefaults\r': command not found
./gmail.sh: line 2: tls: command not found
./gmail.sh: line 3: tls_starttls: command not found
./gmail.sh: line 4: tls_trust_file: command not found
./gmail.sh: line 5: $'\r': command not found
./gmail.sh: line 6: account: command not found
not found: 3(NXDOMAIN)
./gmail.sh: line 8: port: command not found
./gmail.sh: line 9: auth: command not found
./gmail.sh: line 10: user: command not found
./gmail.sh: line 11: password: command not found
from: can't read /var/mail/[email protected]
./gmail.sh: line 13: logfile: command not found
./gmail.sh: line 14: unexpected EOF while looking for matching `''
./gmail.sh: line 23: syntax error: unexpected end of file
Third:zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ./zabbix_sendmail_test.conf
Nov 20 15:35:30 ht-50814ffc17b2c sendEmail[19268]: ERROR => Can't use improperly formatted email address: @gmail.com
zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ./zabbix_sendmail_test.conf
Nov 20 15:35:55 ht-50814ffc17b2c sendEmail[19270]: ERROR => Can't use improperly formatted email address: @gmail.comLast edited by kqfp31; 20-11-2012, 13:42.Comment
-
continue...
Fourth:
Fifth:zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ./cli_sms_clickatell.php +48793383812 "qwr" "oqwn"
PHP Warning: file_put_contents(/var/log/zabbix-server/sms/sms_alert_clickatell_20121120153632): failed to open stream: No such file or directory in /etc/zabbix/alert.d/cli_sms_clickatell.php on line 53
PHP Warning: file_put_contents(/var/log/zabbix-server/sms/sms_alert_clickatell_answer_20121120153633): failed to open stream: No such file or directory in /etc/zabbix/alert.d/cli_sms_clickatell.php on line 126
zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ./smstrade.php +48793383812 "qw" "adsdfsf"Comment
-
Sixth:
Seventh:zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ./zext_msmtp.sh
./zext_msmtp.sh: line 1: account: command not found
./zext_msmtp.sh: line 2: tls: command not found
./zext_msmtp.sh: line 3: tls_starttls: command not found
./zext_msmtp.sh: line 4: tls_trust_file: command not found
smtp.gmail.com is an alias for gmail-smtp-msa.l.google.com.
gmail-smtp-msa.l.google.com has address 173.194.70.108
gmail-smtp-msa.l.google.com has address 173.194.70.109
gmail-smtp-msa.l.google.com has IPv6 address 2a00:1450:4001:c02::6c
./zext_msmtp.sh: line 6: port: command not found
./zext_msmtp.sh: line 7: auth: command not found
./zext_msmtp.sh: line 8: user: command not found
./zext_msmtp.sh: line 9: password: command not found
from: can't read /var/mail/[email protected]
./zext_msmtp.sh: line 11: logfile: command not found
zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ./zabbix_sendmail.conf
Nov 20 15:39:16 ht-50814ffc17b2c sendEmail[19322]: ERROR => Can't use improperly formatted email address: @gmail.comComment
-
hmmm.. it looks all good..
is there an logfile in you scripts? when no try in the end of you script following:
echo "Zabbix testmail script works" >> /tmp/zabbix_mail
after this do an alert and show if this file create..Debian-User
Sorry for my bad english
Comment



Comment