Ad Widget

Collapse

Auto registration hell.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cdslaughter
    Member
    • Jun 2018
    • 69

    #1

    Auto registration hell.

    I am running 4.0 and I have run into an issue where my auto registration actions keep getting run for a host over and over. This is an issue as after the auto registration process is complete, I have to make changes to some hosts (Not all) that the auto registration process then reverses..
    Is there a way to get the auto registration process to only run once?
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Autoreg should only run if the agent contacts the server (or proxy) and the host isn't known (right? asking myself too)

    Are your changes to host name or which proxy monitors the host?

    I've seen some odd autoreg issues after 4.0 that I don't think I saw before, but I think it's timing at startup. I think that hosts are contacting proxies before the proxy gets it's config loaded from the server. In our case, it doesn't change anything, I just get spam notices.

    Comment

    • cdslaughter
      Member
      • Jun 2018
      • 69

      #3
      Originally posted by LenR
      Autoreg should only run if the agent contacts the server (or proxy) and the host isn't known (right? asking myself too)

      Are your changes to host name or which proxy monitors the host?

      I've seen some odd autoreg issues after 4.0 that I don't think I saw before, but I think it's timing at startup. I think that hosts are contacting proxies before the proxy gets it's config loaded from the server. In our case, it doesn't change anything, I just get spam notices.
      From what I can tell, it is limited to a single host. (so far) that has an agent running on it and communicating with the zabbix server, but the zabbix server cant communicate back with (I.E. host side firewall).
      The changes I keep making are not host name, but rather group and template related.

      Very strange

      Comment

      • LenR
        Senior Member
        • Sep 2009
        • 1005

        #4
        We sometimes get cloned hosts with the same zabbix config, it can cause strange things, but for autoreg, it's usually because they hit different proxies, causing a flapping condition.

        Comment

        • cdslaughter
          Member
          • Jun 2018
          • 69

          #5
          I was having some issues with proxy performance in the past, so I deleted it and am now pushing everything directly to the zabbix app server.

          Comment

          • vso
            Zabbix developer
            • Aug 2016
            • 190

            #6
            Please show output of:
            Code:
             
             show create table autoreg_host;

            Comment

            • cdslaughter
              Member
              • Jun 2018
              • 69

              #7
              Here you go
              Code:
              [localhost zabbix40]>show create table autoreg_host\G
              *************************** 1. row ***************************
                     Table: autoreg_host
              Create Table: CREATE TABLE `autoreg_host` (
                `autoreg_hostid` bigint(20) unsigned NOT NULL,
                `proxy_hostid` bigint(20) unsigned DEFAULT NULL,
                `host` varchar(64) NOT NULL DEFAULT '',
                `listen_ip` varchar(39) NOT NULL DEFAULT '',
                `listen_port` int(11) NOT NULL DEFAULT '0',
                `listen_dns` varchar(255) NOT NULL DEFAULT '',
                `host_metadata` varchar(255) NOT NULL DEFAULT '',
                PRIMARY KEY (`autoreg_hostid`),
                KEY `autoreg_host_2` (`proxy_hostid`),
                KEY `autoreg_host_1` (`host`),
                CONSTRAINT `c_autoreg_host_1` FOREIGN KEY (`proxy_hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
              ) ENGINE=InnoDB DEFAULT CHARSET=latin1
              1 row in set (0.00 sec)

              Comment

              • vso
                Zabbix developer
                • Aug 2016
                • 190

                #8
                It should be:
                Code:
                mysql> show create table autoreg_host\G
                *************************** 1. row ***************************
                       Table: autoreg_host
                Create Table: CREATE TABLE `autoreg_host` (
                  `autoreg_hostid` bigint(20) unsigned NOT NULL,
                  `proxy_hostid` bigint(20) unsigned DEFAULT NULL,
                  `host` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
                  `listen_ip` varchar(39) COLLATE utf8_bin NOT NULL DEFAULT '',
                  `listen_port` int(11) NOT NULL DEFAULT '0',
                  `listen_dns` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
                  `host_metadata` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
                  PRIMARY KEY (`autoreg_hostid`),
                  KEY `autoreg_host_1` (`host`),
                  KEY `autoreg_host_2` (`proxy_hostid`),
                  CONSTRAINT `c_autoreg_host_1` FOREIGN KEY (`proxy_hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
                1 row in set (0.00 sec)
                Please see:

                Comment

                • cdslaughter
                  Member
                  • Jun 2018
                  • 69

                  #9
                  Thank you, I will see if this corrects my issue. Not sure how the variation occurred as this is a default install and upgrade from 3.4.

                  Carl

                  Comment

                  Working...