Ad Widget

Collapse

Zabbix and auto reg clients

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Coma
    Member
    • Oct 2016
    • 36

    #1

    Zabbix and auto reg clients

    I am trying to get Zabbix to work with auto add clients when the discovery process finds a client with a agent on it.

    Under actions i have made a action that looks like this:





    How the client is added into the correct group, but it does not get the templates that is on the group, so i tried to also make the rule add the templates i want on the client, but for some reason it does not do that either.

    I can see the clients it found under Configuration->Hosts, but not under Inventory->Hosts?

    should they not appear there?

    I feel like i am missing something simple to get the rest of it working, can any one point me in the right direction?
  • guzzijason
    Senior Member
    • Dec 2015
    • 106

    #2
    I don't think you can apply templates by group - that is a host-by-host operation.

    However, I would expect that linking the templates via your discovery actions should work. Did you try deleting a host and let it "rediscover" after you changed the discovery actions to add templates?

    __Jason

    Comment

    • Coma
      Member
      • Oct 2016
      • 36

      #3
      Originally posted by guzzijason
      I don't think you can apply templates by group - that is a host-by-host operation.

      However, I would expect that linking the templates via your discovery actions should work. Did you try deleting a host and let it "rediscover" after you changed the discovery actions to add templates?

      __Jason
      No i dident try that, becaus the host cant be seen under Inventory->Host only under Configuration->Hosts..

      I have tryed to install the agent on another server, and it does not seem to be getting any templates linked also, but it is added to the correct group. But again this host can also not be seen under Inventory->Host, only under Configuration->Hosts.

      Comment

      • guzzijason
        Senior Member
        • Dec 2015
        • 106

        #4
        The inventory thing is the default behavior in Zabbix (which I don't really like). If you want hosts to show up in inventory, you should also create an operation in your discovery rule to "Set host inventory mode" to "Automatic".

        I never understood why "Automatic" is not the default behavior. Do people really not want their hosts to show up in inventory?

        Anyway, that's inventory. I'm still unsure why your templates aren't being linked, however. Sorry.

        __Jason

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          Originally posted by Coma
          I can see the clients it found under Configuration->Hosts, but not under Inventory->Hosts?

          should they not appear there?
          They will if you will change Administration->General->Other "Default host inventory mode" to Automatic or Manual (and will add per host manually inventory entries).

          With existing hosts you can go to Configuration->Hosts -> mark all hosts from "Discovered hosts" group -> Mass update -> Inventory tab -> change "Inventory mode" to Manual or Automatic and apply changes on those hosts.
          http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
          https://kloczek.wordpress.com/
          zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
          My zabbix templates https://github.com/kloczek/zabbix-templates

          Comment

          • Coma
            Member
            • Oct 2016
            • 36

            #6
            Originally posted by guzzijason
            The inventory thing is the default behavior in Zabbix (which I don't really like). If you want hosts to show up in inventory, you should also create an operation in your discovery rule to "Set host inventory mode" to "Automatic".

            I never understood why "Automatic" is not the default behavior. Do people really not want their hosts to show up in inventory?

            Anyway, that's inventory. I'm still unsure why your templates aren't being linked, however. Sorry.

            __Jason


            Thank you, now they are added... automatic.. still no templates though

            Originally posted by kloczek
            They will if you will change Administration->General->Other "Default host inventory mode" to Automatic or Manual (and will add per host manually inventory entries).

            With existing hosts you can go to Configuration->Hosts -> mark all hosts from "Discovered hosts" group -> Mass update -> Inventory tab -> change "Inventory mode" to Manual or Automatic and apply changes on those hosts.
            perfect, thanks now the clients are added automatic, still no templates assigned to the hosts though, any chance i am missing something?

            Comment

            • guzzijason
              Senior Member
              • Dec 2015
              • 106

              #7
              Originally posted by kloczek
              They will if you will change Administration->General->Other "Default host inventory mode" to Automatic or Manual (and will add per host manually inventory entries).
              I can't believe I've never noticed that before. Thanks!

              __Jason

              Comment

              • Coma
                Member
                • Oct 2016
                • 36

                #8
                Seems i found the isue..

                I had Zabbix Agent, ICMP PING, Windows OS templates, as templates the action should add it self, but it seemed the Windows OS template, already were linked with the Zabbix Agent, so removing Zabbix Agent from the list, made the action work with adding servers into templates...

                Comment

                Working...