ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Zabbix 3.0.9

    News
    7
    29
    5.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • AjinA
      Ajin
      last edited by

      Hi All,

      Testing Zabbix 3.0.9 , Configured zabbix-server , configured agent in another simple lamp machine.
      Added http , mysql ,sshd and OS Linux template for the host , and server is detecting changes and service restarts ect.

      But when tried to configure configuration > Action getting an error .

      The action tries to execute the remote command and fails with the error "Cannot establish SSH session: Failed getting banner"

      Even tried to create an action in zabbix-server itself(By enabling zabbix-agent in zabbix server and created an action to restart sshd service if went down) . But again the same error reoccurs.

      Any body have faced the same issue ?

      0_1495028575814_zabbix.jpg

      wirestyle22W 1 Reply Last reply Reply Quote 3
      • wirestyle22W
        wirestyle22 @Ajin
        last edited by

        @Ajin Can you connect directly through ssh?

        AjinA 1 Reply Last reply Reply Quote 0
        • AjinA
          Ajin @wirestyle22
          last edited by

          @wirestyle22 : Yes both ssh and telnet gets connected.

          wirestyle22W 1 Reply Last reply Reply Quote 0
          • wirestyle22W
            wirestyle22 @Ajin
            last edited by wirestyle22

            @Ajin Do you have selinux enabled? If so, disable it temporarily and test.

            If that works you can run this to allow httpd:

            setsebool -P httpd_can_network_connect 1

            AjinA 2 Replies Last reply Reply Quote 0
            • AjinA
              Ajin @wirestyle22
              last edited by

              @wirestyle22 : selinux and firewalld both are disabled.

              1 Reply Last reply Reply Quote 0
              • AjinA
                Ajin @wirestyle22
                last edited by

                @wirestyle22 said in Zabbix 3.0.9:

                setsebool -P httpd_can_network_connect 1

                [root@2 ssh]# setsebool -P httpd_can_network_connect 1
                setsebool: SELinux is disabled.

                wirestyle22W 1 Reply Last reply Reply Quote 0
                • wirestyle22W
                  wirestyle22 @Ajin
                  last edited by wirestyle22

                  @Ajin said in Zabbix 3.0.9:

                  @wirestyle22 said in Zabbix 3.0.9:

                  setsebool -P httpd_can_network_connect 1

                  [root@2 ssh]# setsebool -P httpd_can_network_connect 1
                  setsebool: SELinux is disabled.

                  Right, that was if selinux was enabled and disabling it fixed the problem--which it didn't.

                  1 Reply Last reply Reply Quote 0
                  • wirestyle22W
                    wirestyle22
                    last edited by wirestyle22

                    paging @dafyre as our resident Zabbix guy

                    AjinA scottalanmillerS 2 Replies Last reply Reply Quote 0
                    • AjinA
                      Ajin @wirestyle22
                      last edited by

                      @wirestyle22 : Hey thanks for that.

                      1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @wirestyle22
                        last edited by

                        @wirestyle22 said in Zabbix 3.0.9:

                        paging @dafyre and our resident Zabbix guy

                        And @Mike-Davis

                        Mike DavisM 1 Reply Last reply Reply Quote 0
                        • dafyreD
                          dafyre
                          last edited by dafyre

                          Can you post a screenshots of how you have your action configured?

                          Also, in the Zabbix Agent, you'll need to make sure that both the Server and ServerActive items are set to be the IP address of your zabbix server... and that Remote Commands are enabled.

                          /etc/zabbix/zabbix_agentd.conf

                          #IP Of Zabbix Server
                          Server = 192.168.200.10
                          ServerActive = 192.168.200.10
                          
                          #Enable Remote Commands for restarting services
                          EnableRemoteCommands = 1
                          AjinA 1 Reply Last reply Reply Quote 0
                          • AjinA
                            Ajin @dafyre
                            last edited by Ajin

                            @dafyre : both the Server and ServerActive items are set to the IP address of zabbix server.
                            Remote Commands are also enabled.

                            Attaching screenshot for action conditions & operations.
                            0_1495113066051_3.JPG

                            dafyreD 1 Reply Last reply Reply Quote 0
                            • Mike DavisM
                              Mike Davis @scottalanmiller
                              last edited by

                              @scottalanmiller said in Zabbix 3.0.9:

                              @wirestyle22 said in Zabbix 3.0.9:

                              paging @dafyre and our resident Zabbix guy

                              And @Mike-Davis

                              I've only set up the action to email. Never tried remote commands, but it gives me some ideas.

                              AjinA 1 Reply Last reply Reply Quote 1
                              • AjinA
                                Ajin @Mike Davis
                                last edited by Ajin

                                @Mike-Davis : My Idea was to create a monitoring / alerting system and also minimize downtime for critical issue like Apache , Mysql and other critical server services which affects server perfomance, This action section actuality does it all since it can both send alerts via email and sms and also execute remote commands.

                                But of-course, only if it is configured correctly and works well 🙂

                                Mike DavisM 1 Reply Last reply Reply Quote 1
                                • hobbit666H
                                  hobbit666
                                  last edited by

                                  I'm going to be looking more at Zabbix over the next few months and exploring it's power and potential

                                  1 Reply Last reply Reply Quote 1
                                  • Mike DavisM
                                    Mike Davis @Ajin
                                    last edited by

                                    @Ajin said in Zabbix 3.0.9:

                                    @Mike-Davis : My Idea was to create a monitoring / alerting system and also minimize downtime for critical issue like Apache , Mysql and other critical server services which affects server perfomance, This action section actuality does it all since it can both send alerts via email and sms and also execute remote commands.

                                    But outsource, only if it is configured correctly and works well 🙂

                                    It's a good idea. I haven't had a need yet, but I'm sure that day will come.

                                    1 Reply Last reply Reply Quote 0
                                    • dafyreD
                                      dafyre @Ajin
                                      last edited by

                                      @Ajin said in Zabbix 3.0.9:

                                      @dafyre : both the Server and ServerActive items are set to the IP address of zabbix server.
                                      Remote Commands are also enabled.

                                      Attaching screenshot for action conditions & operations.
                                      0_1495113066051_3.JPG

                                      What if you set the Remote Command type to "Custom Script" and had it execute something like systemctl restart apache2 or httpd, whatever your distro uses...

                                      0_1495114640947_upload-6dc12176-0deb-482e-b0a2-955dae73f93e

                                      AjinA dafyreD 2 Replies Last reply Reply Quote 0
                                      • AjinA
                                        Ajin @dafyre
                                        last edited by Ajin

                                        @dafyre : Thankyou so Much because ..Yesssss 🙂 That did the job ...Remote command got executed in the host when selected the TYPE as custom script and services which went down is restarting in 60 seconds as configured.

                                        Another thing i am testing now is , Since the Action Section uses zabbix-agent to run the custom script type to execute remote command ; what if the zabbix-agent itself went down or had some issue and it coudnt respond to server checks ? . Here this scenario (Choosing the TYPE as custom script)will fail for all other Actions . IN that case i need to fix the Remote command execution via SSH and also Test the GLOBAL SCRIPT Type to check zabbix-agent service.

                                        Since i am planning to Implement this Tool in my Production Environment , need to think and test every possible scenarios where server or its critical services can get screwed up !!! And now next global script and again ssh ..
                                        0_1495123267990_12.jpg

                                        wirestyle22W dafyreD 2 Replies Last reply Reply Quote 2
                                        • wirestyle22W
                                          wirestyle22 @Ajin
                                          last edited by

                                          @Ajin Glad you got that working

                                          1 Reply Last reply Reply Quote 0
                                          • dafyreD
                                            dafyre @dafyre
                                            last edited by

                                            @dafyre said in Zabbix 3.0.9:

                                            @Ajin said in Zabbix 3.0.9:

                                            @dafyre : both the Server and ServerActive items are set to the IP address of zabbix server.
                                            Remote Commands are also enabled.

                                            Attaching screenshot for action conditions & operations.
                                            0_1495113066051_3.JPG

                                            What if you set the Remote Command type to "Custom Script" and had it execute something like systemctl restart apache2 or httpd, whatever your distro uses...

                                            0_1495114640947_upload-6dc12176-0deb-482e-b0a2-955dae73f93e

                                            Glad that it worked for you!

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post