Ad Widget

Collapse

icon zabbix is not green when i active activecheck

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ramy24
    Member
    • Oct 2019
    • 42

    #1

    icon zabbix is not green when i active activecheck

    Hey,
    I have a problem , when i added a machine to monitor zabbix icon is not green (when the template is for active agent) and i can't execute the command "zabbix-get " from the agent machine
    Could anyone help me please

    zabbix_get -s 127.0.0.1 -k agent.ping zabbix_get [13585]: Timeout while executing operation
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    Note that active Zabbix agent items do not affect host availability.
    https://www.zabbix.com/documentation...guration/hosts
    So in order to get the "green" icon you need to have at least one "Zabbix agent" (without "active") item.
    Last edited by dimir; 16-12-2019, 16:09.

    Comment

    • ramy24
      Member
      • Oct 2019
      • 42

      #3
      Thanks dimir for your reply,
      but what do you mean by "you need to have at least one "Zabbix agent" (without "active") item."

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        If your host has only active items there is no way for server to check its agent availability. See
        https://www.zabbix.com/documentation.../activepassive
        https://www.zabbix.com/documentation/current/manual/config/items/itemtypes/zabbix_agent

        Comment

        • ramy24
          Member
          • Oct 2019
          • 42

          #5
          ok thank you , but why when i excute any zabbix_get command from the agent dose'nt work

          Comment

          • dimir
            Zabbix developer
            • Apr 2011
            • 1080

            #6
            That means the agent is not running or there is something (e. g. SELinux) that prevents you to connect to it. To ensure it's there try
            Code:
            telnet 127.0.0.1 10050
            Another reason for agent not processing passive checks may be setting StartAgents=0 in agent configuration file. See https://www.zabbix.com/documentation.../zabbix_agentd for more details.

            Comment

            • ramy24
              Member
              • Oct 2019
              • 42

              #7
              Hey Dimir ,
              Thank u
              but i am blocked i need help,
              selinux is disabled and zabbix_get dosent worked ,
              i tried but i am blocked

              Comment

              • dimir
                Zabbix developer
                • Apr 2011
                • 1080

                #8
                Please show the output of telnet command I gave you. And ensure the agent is running, show the output of command:
                Code:
                ps axuwww | grep zabbix_agent

                Comment

                • ramy24
                  Member
                  • Oct 2019
                  • 42

                  #9
                  this is the output of commands,
                  i execute this commands in the agent
                  Attached Files

                  Comment

                  • anilkocaturk
                    Junior Member
                    • Jun 2019
                    • 13

                    #10
                    Hi @rammy24 and @dimir.

                    As dimir's said for green icon you need passive type too.

                    For zabbix there is 3 ways to collect data.
                    1-) Only agent sents data to server (it is calling as active type, agent sending data to servers 10051 port)
                    2-) Only server asks to agent for data (it is calling passive type, server making traffic to agent's 10050 port)
                    3-) Both of them (calling only zabbix agent, not writing active or passive, using both ports)

                    Firstly you must sure your agent is up. For ubuntu 18.04 or Centos 7 or later you can check it writing systemctl status zabbix_agent
                    Secondly you must define at least one item as passive or zabbix agent.
                    Then you must be sure agent's client's 10050 port is allowed for (in ufw or other firewalls) server's coming traffic.
                    If you have an passive item and your port is open and allowed then you do debug for issue. Look to logs and write the here for more info.

                    I could help I hope. (Sory for grammer if any mistakes)

                    Comment

                    • ramy24
                      Member
                      • Oct 2019
                      • 42

                      #11
                      Hi anilkocaturk ,
                      Thank you very much for your important informations and help
                      my agent is up ,th port 10050 is allowed also, and i have passive item
                      but when i run the command zabbix_get from the agent machine, i get always the same result ,so i am blocked and i don't know how really i can fix this

                      Thank you

                      Comment

                      • anilkocaturk
                        Junior Member
                        • Jun 2019
                        • 13

                        #12
                        On zabbix_agentd.conf file "EnableRemoteCommands=1" right?

                        Comment

                        • ramy24
                          Member
                          • Oct 2019
                          • 42

                          #13
                          no it's commented ,
                          Attached Files

                          Comment

                          • anilkocaturk
                            Junior Member
                            • Jun 2019
                            • 13

                            #14
                            Please find this lines and uncomment EnableRemoteCommands=1 if it is comment line.
                            If there are not lines like this you can add manually.
                            Attached Files

                            Comment

                            • ramy24
                              Member
                              • Oct 2019
                              • 42

                              #15
                              i added this line EnableRemoteCommands=1 but the command zabbix_get still dosent work for me

                              Comment

                              Working...