zabbix_export:
  version: '8.0'
  template_groups:
    - uuid: cb2c6cdcbb3c47c199c847726268ff09
      name: AAA
  host_groups:
    - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Applications
  templates:
    - uuid: 6664b85da5f84d24b933dcf4273e01e3
      template: AAA_nested_lld
      name: AAA_nested_lld
      description: |
        Link this to host A.
        
        ./zabbix_sender -s A -k dlld -o '{"data": [{"{#DLLD}":"1"}, {"{#DLLD}":"2"}]}'
        
        This discovers two additional discovery rules with one host prototype each.
        
        ./zabbix_sender -s A -k 'dlld[1]' -o '{"data": [{"{#DLLD}":"1", "{#HOST}":"1"}]}'
        ./zabbix_sender -s A -k 'dlld[2]' -o '{"data": [{"{#DLLD}":"2", "{#HOST}":"2"}]}'
      groups:
        - name: AAA
      discovery_rules:
        - uuid: 2873e44eb4d44140835f7f3d8b20f742
          name: dlld_base
          type: TRAP
          key: dlld
          description: |
            This will discover discovery rules keyed as "dlld[1]" and "dlld[1]" of type trapper.
            
            zabbix_sender -k aaa -o '{"data": [{"{#DLLD}": "1"}, {"{#DLLD}": "2"}]}'
            
            Then these rules will each discover new hosts:
            
            zabbix_sender -k 'dlld[1]' -o '{"data": [{"{#HOST}": "1"}, {"{#DLLD}": "1"}]}'
          host_prototypes:
            - uuid: 51b8c3fdf1554f8d8d63c10e4fdce20e
              host: 'dlld_host_{#DLLD}'
              name: 'dlld_host_{#DLLD}'
              group_links:
                - group:
                    name: Applications
              templates:
                - name: AAA_nested_lld
        - uuid: 0e3ebaad64ac41559d308059cd08adc8
          name: 'dlld_{#DLLD}'
          type: TRAP
          key: 'dlld[{#DLLD}]'
          host_prototypes:
            - uuid: e4d54ffe29ee430d926bb27e8cd562fd
              host: 'nested_{#DLLD}_{#HOST}'
              name: 'nested_{#DLLD}_{#HOST}'
              group_links:
                - group:
                    name: Applications
              templates:
                - name: AAA_nested_lld
          parent_discovery_rule:
            key: dlld
