Ad Widget

Collapse

how can I add host group on host in host prototype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thargalin
    Junior Member
    • Nov 2021
    • 8

    #1

    how can I add host group on host in host prototype

    Hi guys,

    I want to add my host group name in host prototype but I cant find any variable. Is it allowed?

  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    You want to add hosts created from prototype to a specific hostgroup? You just need to write that hostgroup name in that prototypes config (Groups tab), no variables needed.

    Comment

    • thargalin
      Junior Member
      • Nov 2021
      • 8

      #3
      cyber thanks for answer

      ​​​​​​​Not specific group,

      For example I have 2 vCenter different location
      First is pandora1.local
      Second is pandora2.local


      I have 2 hostgroup
      host group1: pandora1group
      host group2: pandora2group

      I want to variable add host prototy in vmware fqdn template and I can just add


      Click image for larger version  Name:	2021-11-19 11_51_07-Window.png Views:	0 Size:	16.3 KB ID:	435197

      I try to add #TRIGGER.HOSTGROUP.NAME but it's not working. When run, It create named "#TRIGGER.HOSTGROUP.NAME" hostgroup
      Last edited by thargalin; 19-11-2021, 13:11.

      Comment

      • thargalin
        Junior Member
        • Nov 2021
        • 8

        #4

        Is there any idea?

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Your discovery should return that hostgroup name then, so you could assign it to that {#TRIGGER.HOSTGROUP.NAME} macro... I think. Otherwise there is no data to make a decision... If you have no value for that macro, it is taken literally and you end up with a hostgroup called #TRIGGER.HOSTGROUP.NAME.

          Comment

          • thargalin
            Junior Member
            • Nov 2021
            • 8

            #6
            cyber thanks for reply

            but for low level design the data must come from the system? If it can't get the pandora-group information on the host, is there a problem with the variable I'm using?

            it doesn't accept when I assign as normal variable lld

            Click image for larger version

Name:	2021-11-23 10_40_46-Window.png
Views:	1481
Size:	30.7 KB
ID:	435331

            Is there an article about it? What I have read does not enter the host property section at all. :/

            Comment

            • cyber
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Dec 2006
              • 4807

              #7
              yes. thats what I tried to say, you can use only LLD macros that your disco returns.. Default keys do not contain such info. You can find available ones here https://www.zabbix.com/documentation...scovery_fields
              As you can see no such one as #TRIGGER.HOSTGROUP.NAME...
              And you cannot use user macros in prototype fields. You can only use LLD macros there.

              I am pretty sure you need to create some kind of script, which updates your group memberships over API.

              Comment

              • thargalin
                Junior Member
                • Nov 2021
                • 8

                #8
                I am afraid of it too because I will have done a manual job as doing everything manually with the api and I will still need variables such as cluster, vm folder in the vcenter to be added..

                it will be some manual work but nothing to do.

                thank you very much for your answer

                Comment

                • elmorekevin
                  Junior Member
                  • Feb 2018
                  • 15

                  #9

                  I found two similar feature requests, anyone reading this thread please add a vote.



                  Comment

                  Working...