zabbix_export:
  version: '7.2'
  template_groups:
    - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
  templates:
    - uuid: f808bc884fd248299f81272e87af1fcf
      template: 'NXLog Agent by HTTP'
      name: 'NXLog Agent by HTTP'
      groups:
        - name: Templates/Applications
      items:
        - uuid: fe680ca9bf1646849cc4f90842176ea4
          name: 'NXLog Agent status'
          type: HTTP_AGENT
          key: nxlog.agent_status_check
          value_type: TEXT
          url: '{$NXLOG_PLATFORM}/*/'
          query_fields:
            - name: fields
              value: 'status,online,enrolled,configured,cpu-load,memory-used'
            - name: filter
              value: '(hostname={HOST.NAME})'
          headers:
            - name: Authorization
              value: 'Bearer {$NXLOG_API_TOKEN}'
          triggers:
            - uuid: f66b0a68b976441a98ab3e43d4a8724c
              expression: 'jsonpath(last(/NXLog Agent by HTTP/nxlog.agent_status_check),"$.[0].cpuLoad")>10'
              name: 'NXLog Agent cpu usage'
              priority: WARNING
            - uuid: d67ada363b31434a8819f9b5bc0bddb8
              expression: 'jsonpath(last(/NXLog Agent by HTTP/nxlog.agent_status_check),"$.[0].status")="error"'
              name: 'NXLog Agent error'
              priority: HIGH
            - uuid: 8e37df5976154842ae25e7098c39111a
              expression: 'jsonpath(last(/NXLog Agent by HTTP/nxlog.agent_status_check),"$.[0].memoryUsed")>100000000'
              name: 'NXLog Agent memory usage'
              priority: WARNING
            - uuid: eb948479bbb443ff912f04f5567e0991
              expression: 'jsonpath(last(/NXLog Agent by HTTP/nxlog.agent_status_check),"$.[0].configured")="false"'
              name: 'NXLog Agent not configured'
              priority: HIGH
            - uuid: 2f3ef15551ce4010ac8d54826e5116eb
              expression: 'jsonpath(last(/NXLog Agent by HTTP/nxlog.agent_status_check),"$.[0].online")="false"'
              name: 'NXLog Agent offline'
              priority: HIGH
            - uuid: 3f183d8efc4c4c6b93e16c805a9f25df
              expression: 'jsonpath(last(/NXLog Agent by HTTP/nxlog.agent_status_check),"$.[0].enrolled")="false"'
              name: 'NXLog Agent unenrolled'
              priority: HIGH
            - uuid: d3d2754b2b8741b2a31228d6bd284be6
              expression: 'jsonpath(last(/NXLog Agent by HTTP/nxlog.agent_status_check),"$.[0].status")="warning"'
              name: 'NXLog Agent warning'
              priority: WARNING
      macros:
        - macro: '{$NXLOG_API_TOKEN}'
          type: SECRET_TEXT
        - macro: '{$NXLOG_PLATFORM}'
          value: 'https://agents.example.com/api/ORG_ID/api/v1/agents'
          description: 'NXLog Platform Agent Managament API'
