zabbix_export:
  version: '6.0'
  date: '2023-03-03T18:03:22Z'
  groups:
    -
      uuid: 7df96b18c230490a9a0a9e2307226338
      name: Templates
  templates:
    -
      uuid: 918a8755364740068a60f8743de1bf2f
      template: iiko_api
      name: iiko_api
      groups:
        -
          name: Templates
      items:
        -
          uuid: 84c118c638c548659c33dfa340afce3f
          name: 'Terminal status'
          type: HTTP_AGENT
          key: terminal.status
          history: 7d
          trends: 30d
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$.isAliveStatus[*].isAlive'
            -
              type: LTRIM
              parameters:
                - '['
            -
              type: RTRIM
              parameters:
                - ']'
            -
              type: STR_REPLACE
              parameters:
                - 'true'
                - '1'
            -
              type: STR_REPLACE
              parameters:
                - 'false'
                - '0'
          url: 'https://api-ru.iiko.services/api/1/terminal_groups/is_alive'
          posts: |
            {
              "organizationId": "",
              "organizationIds": [
                "{$ID_ORG}"
              ],
              "terminalGroupIds": [
                "{$ID_TERM1}"
              ]
            }
          post_type: JSON
          headers:
            -
              name: Authorization
              value: 'Bearer {$TOKEN}'
          request_method: POST
          tags:
            -
              tag: iiko
              value: terminal
          triggers:
            -
              uuid: 5ed5a19caa1645c0b28af7dc3935191d
              expression: last(/iiko_api/terminal.status)=0
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: last(/iiko_api/terminal.status)=1
              name: 'Терминал IIKO на {HOST.NAME} недоступен'
              priority: WARNING
              description: 'Параметр терминала в iiko api не isAlive: true.'
              manual_close: 'YES'
      macros:
        -
          macro: '{$ID_ORG}'
        -
          macro: '{$ID_TERM1}'
        -
          macro: '{$ID_TERM2}'
        -
          macro: '{$ID_TERM3}'
        -
          macro: '{$TOKEN}'
          type: SECRET_TEXT
