Ad Widget

Collapse

ZABBIX Agent vs ZABBIX Agent (active)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • barronj
    Junior Member
    • Feb 2008
    • 17

    #16
    ^^ I was curious about this as well after reading this thread. Surely it's not as simple as going to the item configuration and changing the type from "ZABBIX agent" to "ZABBIX agent (active)", is it?

    Also, for my own understanding, this thread makes it sound like active checks should be the default instead of passive checks -- what reasons are there for this NOT being true?

    Comment

    • xs-
      Senior Member
      Zabbix Certified Specialist
      • Dec 2007
      • 393

      #17
      Errm, yes it actually is that simple!

      Two things are important for the agentd.conf tho:
      - Hostname must be exactly the same as the one configured in zabbix (case sensitive)
      - If you have multiple zabbix servers defined, the one which should receive the data must go first

      Comment

      • noxis
        Senior Member
        • Aug 2007
        • 145

        #18
        Originally posted by xs-
        - Hostname must be exactly the same as the one configured in zabbix (case sensitive)
        Well that makes it utterly useless for a large deployment We roll Ubuntu .deb packages that are installed from our internal repository.

        Comment

        • bbrendon
          Senior Member
          • Sep 2005
          • 870

          #19
          Originally posted by noxis
          Well that makes it utterly useless for a large deployment We roll Ubuntu .deb packages that are installed from our internal repository.
          Well, depends on how you look at it. We don't use the hostname = zabbix name and we have scripted the creation of config files.
          Unofficial Zabbix Expert
          Blog, Corporate Site

          Comment

          • noxis
            Senior Member
            • Aug 2007
            • 145

            #20
            Originally posted by infinity005
            Well, depends on how you look at it. We don't use the hostname = zabbix name and we have scripted the creation of config files.
            Indeed, I will update the package to automatically put the parameters in the configuration file. It would be useful if the agents default behaviour was the hostname of the server it is running on.

            Comment

            • Alexei
              Founder, CEO
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Sep 2004
              • 5654

              #21
              Originally posted by noxis
              It would be useful if the agents default behaviour was the hostname of the server it is running on.
              Hey, ZABBIX agents do use local host name if the Hostname parameter is missing in the configuration file!
              Alexei Vladishev
              Creator of Zabbix, Product manager
              New York | Tokyo | Riga
              My Twitter

              Comment

              • noxis
                Senior Member
                • Aug 2007
                • 145

                #22
                Originally posted by Alexei
                Hey, ZABBIX agents do use local host name if the Hostname parameter is missing in the configuration file!
                Oh that is good news Thanks Alexei! I shall investigate further..

                Edit: Fantastic! Works now, I had the fqdn in Zabbix and the server was only using the first part Now it works!
                Last edited by noxis; 20-03-2008, 10:59.

                Comment

                • dreas
                  Member
                  • Aug 2007
                  • 89

                  #23
                  I cannot get this to work yet. I was using active items before and just switched 1 to passive. The hostname in agentd.conf is commented out. The hostname of the server corresponds with the DNS name on the Zabbix server. The active item does not get any data. What should I check?

                  The agent says:

                  1554:20080421:124021 Sending [ZBX_GET_ACTIVE_CHECKS my.correct.hostname]
                  1554:20080421:124021 Before read
                  1554:20080421:124021 In parse_list_of_checks() [ZBX_EOF]
                  1554:20080421:124021 In disable_all_metrics()
                  1554:20080421:124021 Parsed [ZBX_EOF]
                  1554:20080421:124021 In process_active_checks('my.zabbix.server',10051)
                  1554:20080421:124021 In get_min_nextcheck()
                  1554:20080421:124021 Sleeping for 60 seconds
                  Last edited by dreas; 21-04-2008, 12:43. Reason: Added log

                  Comment

                  • Jason
                    Senior Member
                    • Nov 2007
                    • 430

                    #24
                    I can see how you can easily move the template checks from passive to active quickly using the mass update, but how can you move the type of the standard agent checks from passive to active or is that automatic when you enable active on the agent?

                    Comment

                    • Jason
                      Senior Member
                      • Nov 2007
                      • 430

                      #25
                      Ok, I've moved one of my windows servers from passive to active to test it...

                      Its local to the zabbix server so not behind any firewalls, but I don't seem to be receiving any data...

                      My agentd config file is
                      ------------
                      Server=192.168.124.25
                      # Server port for sending active checks
                      ServerPort=10051
                      # Unique hostname. Required for active checks.
                      Hostname=server02
                      # Listen port. Default is 10050
                      ListenPort=10050
                      # IP address to bind agent
                      # If missing, bind to all available IPs

                      #ListenIP=

                      # Number of pre-forked instances of zabbix_agentd.
                      # Default value is 5
                      # This parameter must be between 1 and 16
                      #StartAgents=5
                      # How often refresh list of active checks. 2 minutes by default.
                      RefreshActiveChecks=120
                      # Disable active checks. The agent will work in passive mode listening server.
                      DisableActive=0
                      # Enable remote commands for ZABBIX agent. By default remote commands disabled.
                      EnableRemoteCommands=1

                      # Specifies debug level
                      # 0 - debug is not created
                      # 1 - critical information
                      # 2 - error information
                      # 3 - warnings
                      # 4 - information (default)
                      # 5 - for debugging (produces lots of information)

                      DebugLevel=5

                      # Name of PID file

                      #PidFile=/var/tmp/zabbix_agentd.pid

                      # Name of log file.
                      # If not set, syslog will be used

                      LogFile=c:\zabbix_agentd.log

                      # Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
                      #LogFileSize=1

                      # Spend no more than Timeout seconds on processing
                      # Must be between 1 and 30

                      Timeout=10
                      --------

                      And extract from the agent log

                      --------

                      6984:20080422:090603 In process_active_checks('192.168.124.25',10051)
                      6984:20080422:090603 In get_min_nextcheck()
                      6984:20080422:090603 Sleeping for 60 seconds
                      6984:20080422:090703 In process_active_checks('192.168.124.25',10051)
                      6984:20080422:090703 In get_min_nextcheck()
                      6984:20080422:090703 Sleeping for 60 seconds
                      6984:20080422:090803 In refresh_metrics('192.168.124.25',10051)
                      6984:20080422:090803 get_active_checks('192.168.124.25',10051)
                      6984:20080422:090803 Sending [ZBX_GET_ACTIVE_CHECKS
                      server02
                      ]
                      6984:20080422:090803 Before read
                      6984:20080422:090803 In parse_list_of_checks() [ZBX_EOF
                      ]
                      6984:20080422:090803 In disable_all_metrics()
                      6984:20080422:090803 Parsed [ZBX_EOF]
                      6984:20080422:090803 In process_active_checks('192.168.124.25',10051)
                      6984:20080422:090803 In get_min_nextcheck()
                      6984:20080422:090803 Sleeping for 60 seconds
                      6984:20080422:090903 In process_active_checks('192.168.124.25',10051)
                      6984:20080422:090903 In get_min_nextcheck()
                      6984:20080422:090903 Sleeping for 60 seconds
                      ----------

                      In both the agentd.conf and in zabbix the hostname is defined as server02 (lower case in both cases) and I've also tried with both as the fdqn, but it still doesn't seem to return any data. What things should I be checking?

                      Also I've made sure I've moved the checks from zabbix agent to zabbix agent (active)

                      Jason
                      Last edited by Jason; 22-04-2008, 10:19.

                      Comment

                      • Jason
                        Senior Member
                        • Nov 2007
                        • 430

                        #26
                        Hmmmm... Solved it myself I'd set the DNS name to the same as the server and not the name at the top of the host configuration screen. Once that matched the agent it started straight up.

                        Comment

                        • Justin Freeman
                          Junior Member
                          • Jan 2009
                          • 18

                          #27
                          Similar problem - Passive Agent works but Active Agent does not

                          The solution in my case was to make sure that all Zabbix Configuration - Items for the template being used must be changed to Type: ZABBIX agent (active), see the http://your-zabbix-server/items.php page

                          Reading this page also helped a lot, http://www.zabbix.com/wiki/doku.php?...strapper:index

                          Comment

                          • dreas
                            Member
                            • Aug 2007
                            • 89

                            #28
                            In my case I did not realize that the Name of the host in Zabbix had to match the hostname of the server. I assumed that Zabbix would match the Zabbix DNS (hostname) with the server hostname.

                            Comment

                            Working...