zabbix_export:
  version: '6.0'
  date: '2023-09-30T19:28:07Z'
  groups:
    - uuid: 22941f4e01294888a9bed3aae15f6ef9
      name: Templates/AWNET
  templates:
    - uuid: c40bb45aea654661ad8d08af056cc7fd
      template: 'Monitoring HTTP AWNET'
      name: 'Мониторинг HTTP AWNET'
      groups:
        - name: Templates/AWNET
      items:
        - uuid: 0c18593e50564c28b81f1670e1b926ca
          name: 'Потеря пакетов'
          type: SIMPLE
          key: 'icmppingloss["{HOST.CONN}",100,700,1000,5000]'
          value_type: FLOAT
          tags:
            - tag: Application
              value: Доступность
            - tag: Proto
              value: ICMP
          triggers:
            - uuid: e4a815685f5a4d2386d81cc3d9080d15
              expression: 'last(/Monitoring HTTP AWNET/icmppingloss["{HOST.CONN}",100,700,1000,5000])>50'
              name: 'Большой уровень потерь пакетов'
              priority: HIGH
              dependencies:
                - name: 'Потеря сетевой связности с сервисом'
                  expression: 'last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,max])=0 or last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,min])=0'
            - uuid: 74f3b5e5a64d44a793ca7274c05f657a
              expression: 'last(/Monitoring HTTP AWNET/icmppingloss["{HOST.CONN}",100,700,1000,5000])>30'
              name: 'Плохая связность с сервисом'
              priority: AVERAGE
              dependencies:
                - name: 'Большой уровень потерь пакетов'
                  expression: 'last(/Monitoring HTTP AWNET/icmppingloss["{HOST.CONN}",100,700,1000,5000])>50'
              tags:
                - tag: Application
                  value: Доступность
        - uuid: b29a8e52cc3444d28c53a53f12970d15
          name: 'Максимальная сетевая задержка сервиса'
          type: SIMPLE
          key: 'icmppingsec["{HOST.CONN}",10,700,1000,5000,max]'
          value_type: FLOAT
          units: s
          tags:
            - tag: Proto
              value: ICMP
          triggers:
            - uuid: 98f8f82c16a04dd49e3b9edacfb484a4
              expression: 'last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,max])>"200ms"'
              name: 'Больная сетевая задержка при доступе к сервису'
              priority: AVERAGE
              dependencies:
                - name: 'Большой уровень потерь пакетов'
                  expression: 'last(/Monitoring HTTP AWNET/icmppingloss["{HOST.CONN}",100,700,1000,5000])>50'
              tags:
                - tag: Application
                  value: Доступность
        - uuid: dd7ae5e67efe43f2a47b437d232079cb
          name: 'Минимальная сетевая задержка сервиса'
          type: SIMPLE
          key: 'icmppingsec["{HOST.CONN}",10,700,1000,5000,min]'
          value_type: FLOAT
          units: s
          tags:
            - tag: Proto
              value: ICMP
        - uuid: 8a682b9de14249d196886de1f6c4aace
          name: 'Время доступа к сервису - вторичный порт'
          type: SIMPLE
          key: 'net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT_EX}"]'
          value_type: FLOAT
          units: s
          tags:
            - tag: Proto
              value: HTTP
            - tag: SubProto
              value: TLS
          triggers:
            - uuid: 169c70370d5a41e18827d52de8706d36
              expression: 'last(/Monitoring HTTP AWNET/net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT_EX}"])=0'
              name: 'Сервис не доступен - вторичный порт'
              priority: HIGH
              tags:
                - tag: Application
                  value: Доступность
        - uuid: d276f7bdf45b45c18fd5e6dcd2d72b26
          name: 'Время доступа к сервису'
          type: SIMPLE
          key: 'net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT}"]'
          value_type: FLOAT
          units: s
          tags:
            - tag: Proto
              value: HTTP
            - tag: SubProto
              value: PLAIN
          triggers:
            - uuid: 3f26d6ca37c6486a8967901bc466e5b2
              expression: 'last(/Monitoring HTTP AWNET/net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT}"])=0'
              name: 'Сервис не доступен'
              priority: HIGH
              tags:
                - tag: Application
                  value: Доступность
      httptests:
        - uuid: da4b90b9053a43f195553c0a6634409b
          name: 'Основная проверка'
          agent: '{$AW.HTTP.AGENT_NAME}'
          steps:
            - name: 'Запрос страницы проверки'
              url: '{$AW.HTTP.SCHEMA}://{HOST.CONN}:{$AW.HTTP.PORT}{$AW.HTTP.TEST_URL}'
              follow_redirects: 'NO'
              status_codes: '{$AW.HTTP.HTTP_CHECK_RESPONSE_CODE}'
          tags:
            - tag: ChackType
              value: Основная
            - tag: Proto
              value: HTTP
      macros:
        - macro: '{$AW.HTTP.AGENT_NAME}'
          value: AWNET.ZABBIX
          description: 'Имя клиента для проверки'
        - macro: '{$AW.HTTP.HTTP_CHECK_RESPONSE_CODE}'
          value: '200'
          description: 'Статус код проверочного ссайта'
        - macro: '{$AW.HTTP.PORT}'
          value: '443'
          description: 'Основной порт сайта'
        - macro: '{$AW.HTTP.PORT_EX}'
          value: '80'
          description: 'Дополнительный порт, с него например могут идти перенаправления или там развёрнута система мониторинга сайта'
        - macro: '{$AW.HTTP.SCHEMA}'
          value: https
          description: 'Основная адресная схема сайта'
        - macro: '{$AW.HTTP.TEST_URL}'
          value: /
          description: 'URL для тестирования'
    - uuid: 0f6efdd37f094f65bf3c53fd6f1f551c
      template: 'Monitoring HTTP AWNET - PHP'
      name: 'Мониторинг HTTP AWNET - PHP'
      templates:
        - name: 'Monitoring HTTP AWNET'
      groups:
        - name: Templates/AWNET
      items:
        - uuid: 1c50367c783a44ae928e584aedc02b33
          name: 'PHP-FPM: Accepted connections per second'
          type: DEPENDENT
          key: php-fpm.conn_accepted.rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The number of accepted requests per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''accepted conn'']'
            - type: CHANGE_PER_SECOND
              parameters:
                - ''
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: 9cc132b46638463da970001ae4c85159
          name: 'PHP-FPM: Get ping page'
          type: HTTP_AGENT
          key: php-fpm.get_ping
          history: '0'
          trends: '0'
          value_type: TEXT
          url: '{$PHP_FPM.SCHEME}://{HOST.CONN}:{$AW.HTTP.PORT_EX}{$PHP_FPM.PING.PAGE}'
          retrieve_mode: BOTH
          tags:
            - tag: Application
              value: 'Zabbix raw items'
        - uuid: 95f0f1fda78c49038802375a232fe539
          name: 'PHP-FPM: Get status page'
          type: HTTP_AGENT
          key: php-fpm.get_status
          history: '0'
          trends: '0'
          value_type: TEXT
          url: '{$PHP_FPM.SCHEME}://{HOST.CONN}:{$AW.HTTP.PORT_EX}{$PHP_FPM.STATUS.PAGE}?json'
          tags:
            - tag: Application
              value: 'Zabbix raw items'
        - uuid: 71b9110791e34264bb707e1aeb0032f9
          name: 'PHP-FPM: Listen queue'
          type: DEPENDENT
          key: php-fpm.listen_queue
          delay: '0'
          history: 7d
          description: 'The current number of connections that have been initiated, but not yet accepted.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''listen queue'']'
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: 95bba027ff08422ebfeef4b664e7d9ba
          name: 'PHP-FPM: Listen queue, len'
          type: DEPENDENT
          key: php-fpm.listen_queue_len
          delay: '0'
          history: 7d
          description: 'Size of the socket queue of pending connections.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''listen queue len'']'
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: 3abbb29d356c4191b84dec5cc227cc5e
          name: 'PHP-FPM: Listen queue, max'
          type: DEPENDENT
          key: php-fpm.listen_queue_max
          delay: '0'
          history: 7d
          description: 'The maximum number of requests in the queue of pending connections since this FPM pool has started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''max listen queue'']'
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: 9c0a29e0da454a0bb43ca71dd33ba668
          name: 'PHP-FPM: Queue usage'
          type: CALCULATED
          key: php-fpm.listen_queue_usage
          history: 7d
          value_type: FLOAT
          units: '%'
          params: 'last(//php-fpm.listen_queue)/(last(//php-fpm.listen_queue_len)+(last(//php-fpm.listen_queue_len)=0))*100'
          description: 'Queue utilization'
          tags:
            - tag: Application
              value: PHP-FPM
          triggers:
            - uuid: b4dbc689bd8f499b8f1dc5e94ddf0b04
              expression: 'min(/Monitoring HTTP AWNET - PHP/php-fpm.listen_queue_usage,15m)  > {$PHP_FPM.QUEUE.WARN.MAX}'
              name: 'PHP-FPM: Queue utilization is high (over {$PHP_FPM.QUEUE.WARN.MAX}% for 15m)'
              priority: WARNING
              description: 'The queue for this pool reached {$PHP_FPM.QUEUE.WARN.MAX}% of its maximum capacity. Items in queue represent the current number of connections that have been initiated on this pool, but not yet accepted.'
        - uuid: 047799c9fe31465ba3e450ae81cbb755
          name: 'PHP-FPM: Max children reached'
          type: DEPENDENT
          key: php-fpm.max_children
          delay: '0'
          history: 7d
          description: 'The number of times that pm.max_children has been reached since the php-fpm pool started'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''max children reached'']'
            - type: SIMPLE_CHANGE
              parameters:
                - ''
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: 6c65341ed101462d89f6ef4eaf3fac6e
          name: 'PHP-FPM: Pool name'
          type: DEPENDENT
          key: php-fpm.name
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'The name of current pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pool
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: d55bd360ac85416aa4a2c9fd233c7076
          name: 'PHP-FPM: Ping'
          type: DEPENDENT
          key: php-fpm.ping
          delay: '0'
          history: 7d
          preprocessing:
            - type: REGEX
              parameters:
                - '{$PHP_FPM.PING.REPLY}($|\n)'
                - '1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: php-fpm.get_ping
          tags:
            - tag: Application
              value: PHP-FPM
          triggers:
            - uuid: a2cbca03ee18478cba2771ceed2eb3cc
              expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.ping)=0 or nodata(/Monitoring HTTP AWNET - PHP/php-fpm.ping,3m)=1'
              name: 'PHP-FPM: Service is down'
              priority: HIGH
              manual_close: 'YES'
        - uuid: 3f4b713fd09c40fabd843f19ce78dac4
          name: 'PHP-FPM: Processes, active'
          type: DEPENDENT
          key: php-fpm.processes_active
          delay: '0'
          history: 7d
          description: 'The total number of active processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''active processes'']'
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: 48f6cbea84a849f498d6e834960da817
          name: 'PHP-FPM: Processes, idle'
          type: DEPENDENT
          key: php-fpm.processes_idle
          delay: '0'
          history: 7d
          description: 'The total number of idle processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''idle processes'']'
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: e60f966ef0d3496188054307d963583e
          name: 'PHP-FPM: Processes, max active'
          type: DEPENDENT
          key: php-fpm.processes_max_active
          delay: '0'
          history: 7d
          description: 'The highest value that ''active processes'' has reached since the php-fpm server started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''max active processes'']'
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: eca836fc846b4140bfb8a7dcd77f2a6b
          name: 'PHP-FPM: Processes, total'
          type: DEPENDENT
          key: php-fpm.processes_total
          delay: '0'
          history: 7d
          description: 'The total number of server processes currently running.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''total processes'']'
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: 8f0bc115b7a94021a56d82858cc020cd
          name: 'PHP-FPM: Process manager'
          type: DEPENDENT
          key: php-fpm.process_manager
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'The method used by the process manager to control the number of child processes for this pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''process manager'']'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
          triggers:
            - uuid: 5303f276e90746dba1909c6a8d24455e
              expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.process_manager,#1)<>last(/Monitoring HTTP AWNET - PHP/php-fpm.process_manager,#2)'
              name: 'PHP-FPM: Manager  changed (new value received: {ITEM.VALUE})'
              priority: INFO
              description: 'PHP-FPM manager changed. Ack to close.'
              manual_close: 'YES'
        - uuid: d362245503f4424e8a794bc2374a6f93
          name: 'PHP-FPM: Slow requests'
          type: DEPENDENT
          key: php-fpm.slow_requests
          delay: '0'
          history: 7d
          description: 'The number of requests that exceeded your request_slowlog_timeout value.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''slow requests'']'
            - type: SIMPLE_CHANGE
              parameters:
                - ''
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
          triggers:
            - uuid: 97c7a387c57245a6a9a4a23f3fb3ef58
              expression: 'min(/Monitoring HTTP AWNET - PHP/php-fpm.slow_requests,#3)>0'
              name: 'PHP-FPM: Detected slow requests'
              priority: WARNING
              description: 'PHP-FPM detected slow request. A slow request means that it took more time to execute than expected (defined in the configuration of your pool).'
        - uuid: bed55b93e18041c8ad623ee4c9895f1f
          name: 'PHP-FPM: Start time'
          type: DEPENDENT
          key: php-fpm.start_time
          delay: '0'
          history: 7d
          units: unixtime
          description: 'The time when this pool was started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''start time'']'
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
        - uuid: e8fdb88860454b6cb9a0f78f57838cd3
          name: 'PHP-FPM: Uptime'
          type: DEPENDENT
          key: php-fpm.uptime
          delay: '0'
          history: 7d
          units: s
          description: 'How long has this pool been running.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''start since'']'
          master_item:
            key: php-fpm.get_status
          tags:
            - tag: Application
              value: PHP-FPM
          triggers:
            - uuid: cb7285bc9a4a473a909354c9b9dabce4
              expression: 'nodata(/Monitoring HTTP AWNET - PHP/php-fpm.uptime,30m)=1'
              name: 'PHP-FPM: Failed to fetch info data (or no data for 30m)'
              priority: INFO
              description: 'Zabbix has not received data for items for the last 30 minutes'
              manual_close: 'YES'
              dependencies:
                - name: 'PHP-FPM: Service is down'
                  expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.ping)=0 or nodata(/Monitoring HTTP AWNET - PHP/php-fpm.ping,3m)=1'
            - uuid: 81a7e762da1e4c56841206a60940c123
              expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.uptime)<10m'
              name: 'PHP-FPM: has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes'
              manual_close: 'YES'
        - uuid: 7f6ef0a370074296972af02183ea9551
          name: 'PHP-FPM: Version'
          type: DEPENDENT
          key: php-fpm.version
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Current version PHP. Get from HTTP-Header "X-Powered-By" and may not work if you change default HTTP-headers.'
          preprocessing:
            - type: REGEX
              parameters:
                - '^[.\s\S]*X-Powered-By: PHP/([.\d]{1,})'
                - \1
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: php-fpm.get_ping
          tags:
            - tag: Application
              value: PHP-FPM
          triggers:
            - uuid: ce0882caba9b4b8a8ab5d8b119713757
              expression: 'last(/Monitoring HTTP AWNET - PHP/php-fpm.version,#1)<>last(/Monitoring HTTP AWNET - PHP/php-fpm.version,#2) and length(last(/Monitoring HTTP AWNET - PHP/php-fpm.version))>0'
              name: 'PHP-FPM: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'PHP-FPM version has changed. Ack to close.'
              manual_close: 'YES'
      macros:
        - macro: '{$PHP_FPM.PING.PAGE}'
          value: /php_ping
        - macro: '{$PHP_FPM.PING.REPLY}'
          value: pong
        - macro: '{$PHP_FPM.QUEUE.WARN.MAX}'
          value: '50'
        - macro: '{$PHP_FPM.SCHEME}'
          value: http
        - macro: '{$PHP_FPM.STATUS.PAGE}'
          value: /php_status
  triggers:
    - uuid: 963920735f48419eb8894454bf7f9806
      expression: 'last(/Monitoring HTTP AWNET/web.test.fail[Основная проверка])<>0 and (length(last(/Monitoring HTTP AWNET/web.test.error[Основная проверка]))=0 or length(last(/Monitoring HTTP AWNET/web.test.error[Основная проверка]))<>0)'
      name: 'Ошибка сервиса'
      opdata: 'Ошибка: {ITEM.VALUE2}'
      priority: HIGH
      dependencies:
        - name: 'Сервис не доступен'
          expression: 'last(/Monitoring HTTP AWNET/net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT}"])=0'
      tags:
        - tag: Application
          value: Доступность
    - uuid: 7902643a93f84303b7df08b3fd9634a3
      expression: 'last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,max])=0 or last(/Monitoring HTTP AWNET/icmppingsec["{HOST.CONN}",10,700,1000,5000,min])=0'
      name: 'Потеря сетевой связности с сервисом'
      priority: HIGH
      tags:
        - tag: Application
          value: Доступность
  graphs:
    - uuid: ee0d4a5ec50c4ce09275e9b214311338
      name: 'PHP-FPM: Process'
      graph_items:
        - color: 1A7C11
          item:
            host: 'Monitoring HTTP AWNET - PHP'
            key: php-fpm.processes_max_active
        - sortorder: '1'
          color: 2774A4
          item:
            host: 'Monitoring HTTP AWNET - PHP'
            key: php-fpm.processes_idle
        - sortorder: '2'
          color: F63100
          item:
            host: 'Monitoring HTTP AWNET - PHP'
            key: php-fpm.processes_total
        - sortorder: '3'
          color: A54F10
          item:
            host: 'Monitoring HTTP AWNET - PHP'
            key: php-fpm.processes_active
    - uuid: 14dc2b1cb210498aa0f912d0316f4799
      name: 'PHP-FPM: Queue'
      graph_items:
        - color: 1A7C11
          item:
            host: 'Monitoring HTTP AWNET - PHP'
            key: php-fpm.listen_queue_len
        - sortorder: '1'
          color: 2774A4
          item:
            host: 'Monitoring HTTP AWNET - PHP'
            key: php-fpm.listen_queue
        - sortorder: '2'
          color: F63100
          item:
            host: 'Monitoring HTTP AWNET - PHP'
            key: php-fpm.listen_queue_max
    - uuid: 1e7b8c02fbf341379c938e24e3196574
      name: 'Время доступа к сервису'
      graph_items:
        - color: 1A7C11
          calc_fnc: ALL
          item:
            host: 'Monitoring HTTP AWNET'
            key: 'net.tcp.service.perf[tcp,"{HOST.CONN}","{$AW.HTTP.PORT}"]'
        - sortorder: '1'
          color: '274482'
          calc_fnc: ALL
          item:
            host: 'Monitoring HTTP AWNET'
            key: 'icmppingsec["{HOST.CONN}",10,700,1000,5000,max]'
        - sortorder: '2'
          color: F63100
          calc_fnc: ALL
          item:
            host: 'Monitoring HTTP AWNET'
            key: 'icmppingsec["{HOST.CONN}",10,700,1000,5000,min]'
        - sortorder: '3'
          color: 2774A4
          yaxisside: RIGHT
          calc_fnc: ALL
          item:
            host: 'Monitoring HTTP AWNET'
            key: 'web.test.time[Основная проверка,Запрос страницы проверки,resp]'
