zabbix_export:
  version: '6.0'
  date: '2023-05-17T00:32:25Z'
  groups:
    -
      uuid: 7df96b18c230490a9a0a9e2307226338
      name: Templates
  templates:
    -
      uuid: 4f31da6574fc4c7a9f1e13f19b6de24e
      template: 'icmp test validation regexp'
      name: 'icmp test validation regexp'
      groups:
        -
          name: Templates
      discovery_rules:
        -
          uuid: 0e9b0b37f05e450ca88867ca6aeaf830
          name: 'generate lld'
          key: 'system.run["/usr/bin/echo {$IP.LLD}"]'
          item_prototypes:
            -
              uuid: b9ff6eaa8f3a4e12b22cab1343046582
              name: 'Address {#IPS}'
              type: DEPENDENT
              key: 'ip.address[{#IPS}]'
              delay: '0'
              trends: '0'
              value_type: TEXT
              preprocessing:
                -
                  type: REGEX
                  parameters:
                    - '(([0-9a-fA-F.:]+)|[^\s]+) (([0-9a-fA-F.:]+)|[^\s]+) : xmt\/rcv\/%loss = ([0-9]+)\/([0-9]+)\/([0-9]+)%(, min\/avg\/max = (.*)\/(.*)\/(.*))?'
                    - \3
                  error_handler: CUSTOM_VALUE
                  error_handler_params: 'domain not resolved'
                -
                  type: RTRIM
                  parameters:
                    - )
                -
                  type: LTRIM
                  parameters:
                    - (
              master_item:
                key: 'system.run["fping {#IPS} -4 -c 5 -q -A -d"]'
            -
              uuid: 6e30b1969dd44ac1bc5cf6c0eac07737
              name: 'Raw Item Validation RegExp {#IPS}'
              type: ZABBIX_ACTIVE
              key: 'system.run["fping {#IPS} -4 -c 5 -q -A -d"]'
              history: '0'
              trends: '0'
              value_type: TEXT
              preprocessing:
                -
                  type: MATCHES_REGEX
                  parameters:
                    - '(([0-9a-fA-F.:]+)|[^\s]+) (([0-9a-fA-F.:]+)|[^\s]+) : xmt\/rcv\/%loss = ([0-9]+)\/([0-9]+)\/([0-9]+)%(, min\/avg\/max = (.*)\/(.*)\/(.*))?'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: 'domain not resolved'
          preprocessing:
            -
              type: JAVASCRIPT
              parameters:
                - |
                  var lld = [];
                  var lines = value.split("\n");
                  var lines_num = lines.length;
                  for (i = 0; i < lines_num; i++)
                  {
                    var row = {};
                    row["{#IPS}"] = lines[i]
                    lld.push(row);
                  }
                  return JSON.stringify(lld);
      macros:
        -
          macro: '{$IP.LLD}'
          value: ccab11xqxq12o2.134.com
