zabbix_export:
  version: '7.4'
  template_groups:
    - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
  templates:
    - uuid: 6d6eeac2bd7a4964a591947d0ee00946
      template: 'Template App Domain payments'
      name: 'Template App Domain payments'
      groups:
        - name: Templates/Applications
      discovery_rules:
        - uuid: 586277a0f1b64366b845d4931a2e167c
          name: 'Domain payment discovery'
          key: domain.payment.discovery
          delay: 1h
          description: 'Discovers domains from /etc/zabbix/scripts/domain-payments/domains.txt.'
          item_prototypes:
            - uuid: f9f281fcba73483d9b336229d1eec37c
              name: 'Domain {#DOMAIN}: paid days remaining'
              key: 'domain.payment.days[{#DOMAIN}]'
              delay: 12h
              history: 90d
              units: d
              description: 'Days before domain paid-till/expiry date.'
              trigger_prototypes:
                - uuid: e61a0ad596724c15ac277d9282254d27
                  expression: 'last(/Template App Domain payments/domain.payment.days[{#DOMAIN}])<30 and last(/Template App Domain payments/domain.payment.days[{#DOMAIN}])>=0'
                  name: 'Domain {#DOMAIN}: less than 30 days paid'
                  priority: HIGH
                - uuid: ff5bb9efc3fa438394e28ada2faec526
                  expression: 'last(/Template App Domain payments/domain.payment.days[{#DOMAIN}])<60 and last(/Template App Domain payments/domain.payment.days[{#DOMAIN}])>=30'
                  name: 'Domain {#DOMAIN}: less than 60 days paid'
                  priority: WARNING
            - uuid: 49172c6abd074c6aaafaefd5ae3e95d9
              name: 'Domain {#DOMAIN}: last error'
              key: 'domain.payment.error[{#DOMAIN}]'
              delay: 1h
              history: 30d
              value_type: CHAR
              description: 'Last WHOIS/parsing error. Empty string means OK.'
            - uuid: 7db8ac161ec24374aaed90983a639bed
              name: 'Domain {#DOMAIN}: check status'
              key: 'domain.payment.ok[{#DOMAIN}]'
              delay: 1h
              history: 30d
              trends: '0'
              description: '1 when WHOIS check and expiry parsing are successful, otherwise 0.'
              trigger_prototypes:
                - uuid: fa163b97e4f341c1af1ea06d24a6c634
                  expression: 'last(/Template App Domain payments/domain.payment.ok[{#DOMAIN}])=0'
                  name: 'Domain {#DOMAIN}: payment check failed'
                  priority: AVERAGE
                  manual_close: 'YES'
            - uuid: 1a81834c11fb4f7a91347e9416e9d53d
              name: 'Domain {#DOMAIN}: paid till'
              key: 'domain.payment.paid_till[{#DOMAIN}]'
              delay: 12h
              history: 90d
              value_type: CHAR
              description: 'paid-till/expiry timestamp parsed from WHOIS.'
