zabbix_export:
  version: '7.0'
  host_groups:
    - uuid: f2481361f99448eea617b7b1d4765566
      name: 'Discovered hosts'
  hosts:
    - host: test_host
      name: test_host
      groups:
        - name: 'Discovered hosts'
      interfaces:
        - interface_ref: if1
      items:
        - name: 'Item with JSONpath and CPS'
          type: DEPENDENT
          key: jsonpath_and_cps
          delay: '0'
          value_type: FLOAT
          description: 'Number of rows updated by queries per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.tup_updated
            - type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: lalalalala
          tags:
            - tag: component
              value: queries
        - name: 'Item with only JSONpath'
          type: DEPENDENT
          key: jstonpath
          delay: '0'
          description: 'Number of connected backends.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.numbackends
          master_item:
            key: lalalalala
          tags:
            - tag: component
              value: backends
        - name: 'Script master item'
          type: SCRIPT
          key: lalalalala
          delay: 30s
          value_type: TEXT
          trends: '0'
          params: |
            var params = JSON.parse(value);
            
            return '{"numbackends":34,"tup_updated":30000}';
          description: |
            Collect all metrics from pg_stat_database as sums for all databases:
            https://www.postgresql.org/docs/current/monitoring-stats.html#PG-STAT-DATABASE-VIEW
          parameters:
            - name: time
              value: '{TIME}'
          tags:
            - tag: component
              value: raw
      inventory_mode: DISABLED
