Ad Widget

Collapse

Auto registration help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • symfrog
    Junior Member
    • Oct 2009
    • 12

    #1

    Auto registration help

    Hi

    I just dowloaded and installed 1.8 stable, mainly for the auto registration support (running on ec2). There isn't too much documentation on it in the user manual or on the forums.

    So I went ahead and assumed that all I needed to do was add an "Auto Registration" action. Which I did, unfortunately it seems that the action is never triggered for new agents. I checked the logs on both the agent and server and didn't see anything related to auto registration, also checked conf files for a possible setting.

    Auto discovery on the same agents work fine (with the same operations on the action). Can anyone let me know how to get auto registration working?


    Thanks
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    could you show the action properties ?
    are active checks enabled on agents ?
    do you see them connecting to the server in the server logfile ?
    Zabbix 3.0 Network Monitoring book

    Comment

    • symfrog
      Junior Member
      • Oct 2009
      • 12

      #3
      Here is the agent log:

      Code:
       8233:20091208:124610.869 zabbix_agentd started. Zabbix 1.8 (revision 8565).
        8235:20091208:124610.895 zabbix_agentd collector started
        8236:20091208:124610.914 zabbix_agentd listener started
        8238:20091208:124610.950 zabbix_agentd listener started
        8239:20091208:124610.969 zabbix_agentd listener started
        8240:20091208:124610.989 zabbix_agentd active check started [192.168.1.53:10051]
      As mentioned if I use auto discovery it all works fine, the problem only happens with auto registration.


      Here is my zabbix_agentd.conf:
      Code:
      # This is config file for zabbix_agentd
      # To get more information about ZABBIX, go http://www.zabbix.com
      
      ############ GENERAL PARAMETERS #################
      
      # List of comma delimited IP addresses (or hostnames) of ZABBIX servers. 
      # No spaces allowed. First entry is used for sending active checks.
      # Note that hostnames must resolve hostname->IP address and
      # IP address->hostname.
      
      Server=192.168.1.53
      
      # Server port for sending active checks
      
      #ServerPort=10051
      
      # Unique hostname. Required for active checks.
      
      Hostname=ZABBIX Server
      
      # Listen port. Default is 10050
      
      #ListenPort=10050
      
      # IP address to bind agent
      # If missing, bind to all available IPs
      
      #ListenIP=127.0.0.1
      
      # Source IP address for outgouing connections
      #SourceIP=
      
      # Number of pre-forked instances of zabbix_agentd,
      # which process passive checks.
      # Default value is 3.
      # This parameter must be between 1 and 16.
      
      StartAgents=3
      
      # How often refresh list of active checks.
      # Default value is 120 seconds.
      # This parameter must be between 60 and 3600.
      
      #RefreshActiveChecks=120
      
      # Disable active checks. The agent will work in passive mode listening server.
      
      #DisableActive=1
      
      # Disable passive checks. The agent will not listen to any TCP ports.
      # Only active checks will be processed.
      
      #DisablePassive=1
      
      # 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 (default)
      # 4 - for debugging (produces lots of information)
      
      DebugLevel=3
      
      # Name of PID file
      
      PidFile=/var/tmp/zabbix_agentd.pid
      
      # Name of log file.
      # If not set, syslog will be used
      
      LogFile=/var/log/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=3
      
      ####### USER-DEFINED MONITORED PARAMETERS #######
      # Format: UserParameter=<key>,<shell command>
      # Note that shell command must not return empty string or EOL only
      #UserParameter=system.test,who|wc -l
      ### Set of parameter for monitoring MySQL server (v3.23.42 and later)
      ### Change -u<username> and add -p<password> if required
      #UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
      #UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
      #UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
      #UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
      #UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
      #UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
      #UserParameter=mysql.version,mysql -V
      I have attached a screen shot of the Auto registration action.
      Attached Files

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        ah, but the host is already created in zabbix ?
        if so, i believe no autoregistration event will be generated - that is only generated when an unknown host contacts zabbix server
        Zabbix 3.0 Network Monitoring book

        Comment

        • symfrog
          Junior Member
          • Oct 2009
          • 12

          #5
          No, the host was not already created. This was a completely fresh install of both the server and the agent.

          Also tried it with several other hosts, same issue.

          Comment

          • richlv
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2005
            • 3112

            #6
            hmm. then i suppose you are missing actual operation 'add host'
            Zabbix 3.0 Network Monitoring book

            Comment

            • symfrog
              Junior Member
              • Oct 2009
              • 12

              #7
              No, Same operations adds the host fine with auto discovery. I think active checks may be the problem, will take a closer look.

              Comment

              • richlv
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Oct 2005
                • 3112

                #8
                hmm, the operation should be more or less the same - please register this on the tracker
                Zabbix 3.0 Network Monitoring book

                Comment

                • symfrog
                  Junior Member
                  • Oct 2009
                  • 12

                  #9
                  Got it working. I think it relates to active checks. I had to set the hostname={agent hostname} in zabbix_agentd.conf

                  Is there a way during auto discovery/auto registration to tell the server to connect to agent using IP instead of dns name (as is possible when manually adding a host)? I would prefer not to have to update dns/hosts on server for each add agent.

                  Comment

                  • richlv
                    Senior Member
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Oct 2005
                    • 3112

                    #10
                    well, yes, auto-registration basically happens when active zabbix agent connects to the server - so that has to be working.

                    not sure about setting hostname/ip, that might be a feature request - file it on the tracker
                    Zabbix 3.0 Network Monitoring book

                    Comment

                    • Stephen Wood
                      Member
                      • Feb 2012
                      • 43

                      #11
                      Bumping an old topic

                      I'm having this trouble too. Our hostnames are set to tell Zabbix what the role is (and consequently add it to groups, templates, etc). However, the hostname is not a FQDN though zabbix treats it as such.

                      How can I let auto-discovery know the private ip address for the server in the config?

                      Comment

                      Working...