Ad Widget

Collapse

I am loosing hope

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kqfp31
    Member
    • Apr 2012
    • 48

    #16
    Originally posted by Shad0w
    Code:
    grep -i zabbix /etc/passwd
    which shell do you have?! /bin/false ??
    when yes, you must set it to /bin/bash.. otherwise zabbix can“t login
    Help, how to check this shell? Or how to change this?

    Comment

    • Colttt
      Senior Member
      Zabbix Certified Specialist
      • Mar 2009
      • 878

      #17
      edit the /etc/passwd

      change the shell for zabbix-user..
      from /bin/false to /bin/bash
      Debian-User

      Sorry for my bad english

      Comment

      • kqfp31
        Member
        • Apr 2012
        • 48

        #18
        Originally posted by Shad0w
        edit the /etc/passwd

        change the shell for zabbix-user..
        from /bin/false to /bin/bash
        Ok, i done this, but now I have this information:

        What is wrong with this system? :\

        Comment

        • Colttt
          Senior Member
          Zabbix Certified Specialist
          • Mar 2009
          • 878

          #19
          nothing.. its all right

          its case-sensitive!

          try:
          Code:
          sudo su - zabbix
          Debian-User

          Sorry for my bad english

          Comment

          • kqfp31
            Member
            • Apr 2012
            • 48

            #20
            Originally posted by Shad0w
            nothing.. its all right

            its case-sensitive!

            try:
            Code:
            sudo su - zabbix
            Oh, man I don't have permissions to this location:
            zabbix@ht-50814ffc17b2c:~$ ls /etc/zabbix/alert.d/
            ls: cannot open directory /etc/zabbix/alert.d/: Permission denied
            But why? I done chmod 755. Like it's writing in every manual.

            What I shoul do to give Zabbix user this permissions?

            Comment

            • kqfp31
              Member
              • Apr 2012
              • 48

              #21
              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.conf

              Comment

              • Colttt
                Senior Member
                Zabbix Certified Specialist
                • Mar 2009
                • 878

                #22
                ok.. can you run this script manually? work it?

                please post you script and the output from
                Code:
                ls -l /etc/zabbix/alert.d/
                Debian-User

                Sorry for my bad english

                Comment

                • kqfp31
                  Member
                  • Apr 2012
                  • 48

                  #23
                  Sorry, that I made 3 post, but I can't paste everything in one post.

                  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
                  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$ ./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
                  Second:
                  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
                  Third:
                  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.com
                  Last edited by kqfp31; 20-11-2012, 13:42.

                  Comment

                  • kqfp31
                    Member
                    • Apr 2012
                    • 48

                    #24
                    continue...


                    Fourth:
                    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
                    Fifth:
                    zabbix@ht-50814ffc17b2c:/etc/zabbix/alert.d$ ./smstrade.php +48793383812 "qw" "adsdfsf"

                    Comment

                    • kqfp31
                      Member
                      • Apr 2012
                      • 48

                      #25
                      Sixth:
                      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
                      Seventh:
                      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.com

                      Comment

                      • Colttt
                        Senior Member
                        Zabbix Certified Specialist
                        • Mar 2009
                        • 878

                        #26
                        ok that works.. how do you configure this action or the notificatioN?! (Screenshot)
                        Debian-User

                        Sorry for my bad english

                        Comment

                        • kqfp31
                          Member
                          • Apr 2012
                          • 48

                          #27
                          I have something like this:

                          Comment

                          • Colttt
                            Senior Member
                            Zabbix Certified Specialist
                            • Mar 2009
                            • 878

                            #28
                            ok, but i want to see the configuration of media-types

                            sorry my bad
                            Debian-User

                            Sorry for my bad english

                            Comment

                            • kqfp31
                              Member
                              • Apr 2012
                              • 48

                              #29
                              Of course. Please
                              This is everything that I have:

                              Comment

                              • Colttt
                                Senior Member
                                Zabbix Certified Specialist
                                • Mar 2009
                                • 878

                                #30
                                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

                                Working...