zabbix_export:
  version: '7.0'
  template_groups:
    - uuid: 87e5b93c342e42b1a8bc9a051ae7d9aa
      name: Templates/VMware
  host_groups:
    - uuid: 74b3193728e54e7b9e15cd250191cb39
      name: 'АПК ИС3_/Виртуализация/Vmware/Hosts'
    - uuid: e45d391d87b64e4aa3c37a8fbf8063a0
      name: 'АПК МНС/Виртуализация/Vmware/Hosts'
    - uuid: b68bdf1da3004455bd4a86deb1f64e98
      name: 'АПК МНС/Виртуализация/Vmware/MGMT/Hosts'
  templates:
    - uuid: 4477cf68b00648569404ae0b1d6f8495
      template: 'VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor'
      name: 'VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor'
      description: |
        Увеличен timeout для айтемов performance counter до 5 мин
        (снижение нагрузки и устранение ошибки Performance counter data is not available)
      groups:
        - name: Templates/VMware
      items:
        - uuid: 470497d6b7c44aa08b707c50eec300ea
          name: 'Host get check'
          type: DEPENDENT
          key: Host.get.check
          delay: '0'
          trends: '0'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
            - type: JSONPATH
              parameters:
                - $.length()
              error_handler: DISCARD_VALUE
          master_item:
            key: 'vmware.hv.discovery[{$VMWARE.URL}]'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 467a9c0dc9f642f4a4906e0d62057cbe
              expression: 'nodata(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/Host.get.check,20m)=1 or max(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/Host.get.check,20m)=0'
              name: 'Nodata get about hosts from vCenter for last 20 min'
              priority: INFO
              description: |
                Не получена информация о хостах из vCenter за последние 20 мин.
                Не критично при отсутствии других аварий на оборудовании и сервисах.
                Уведомить ГРСМ по почте.
              manual_close: 'YES'
              dependencies:
                - name: 'Веб-интерфейс vcenter ("{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}") недоступен. Ошибка: {ITEM.VALUE1}'
                  expression: 'length(last(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/web.test.error["{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}"]))>0 and min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/web.test.fail["{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}"],#3) >0'
                  recovery_expression: 'last(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/web.test.fail["{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}"])=0'
        - uuid: 55a2646649d849329ea10eaa27b2fe2a
          name: 'Get alarms'
          type: SIMPLE
          key: 'vmware.alarms.get[{$VMWARE.URL}]'
          history: '0'
          value_type: TEXT
          trends: '0'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Get alarm status.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
          tags:
            - tag: component
              value: raw
        - uuid: 6234af2a7bd7485a9f8a7e50b53eade1
          name: 'Event log'
          type: SIMPLE
          key: 'vmware.eventlog[{$VMWARE.URL},skip,"error"]'
          value_type: LOG
          trends: '0'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Collect VMware event log. See also: https://www.zabbix.com/documentation/7.0/manual/config/items/preprocessing/examples#filtering_vmware_event_log_records'
          tags:
            - tag: component
              value: log
        - uuid: cd841a37a366479ea39a4b7d1ff17156
          name: 'VMware hypervisor discovery'
          type: SIMPLE
          key: 'vmware.hv.discovery[{$VMWARE.URL}]'
          delay: 5m
          history: '0'
          value_type: TEXT
          trends: '0'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of hypervisors. Master aitem'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '0'
                - 'Timeout was reached'
          tags:
            - tag: component
              value: raw
        - uuid: 2b9fe2cf329a488ea7e672d1e1105e18
          name: Version
          type: SIMPLE
          key: 'vmware.version[{$VMWARE.URL}]'
          delay: 1d
          value_type: CHAR
          trends: '0'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware service version.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
      discovery_rules:
        - uuid: 9f560109c4ab4694bc0df7f63445cbcd
          name: 'VMware hypervisor for IS3 discovery'
          type: DEPENDENT
          key: IS3.hypervisor.discovery
          delay: '0'
          filter:
            conditions:
              - macro: '{#CLUSTER.NAME}'
                value: pk3
                formulaid: A
          description: 'Discovery of hypervisors.'
          host_prototypes:
            - uuid: ca21b8ae9998480b84274c8fd1edb682
              host: '{#HV.NAME}'
              name: '{#HV.NAME}'
              group_links:
                - group:
                    name: 'АПК ИС3_/Виртуализация/Vmware/Hosts'
              templates:
                - name: 'VMware Hypervisor for APK IS3-MNS'
              macros:
                - macro: '{$VMWARE.CLUSTER.NAME}'
                  value: '{#CLUSTER.NAME}'
                - macro: '{$VMWARE.HV.ID}'
                  value: '{#HV.ID}'
                - macro: '{$VMWARE.HV.UUID}'
                  value: '{#HV.UUID}'
                  description: 'UUID of hypervisor.'
              tags:
                - tag: cluster
                  value: '{#CLUSTER.NAME}'
                - tag: email
                  value: ОЭиРРП
                - tag: 'Monitored by'
                  value: zabbix-proxy-cloudstack
                - tag: АПК
                  value: ИС3
                - tag: Отв
                  value: ОЭиРРП
              custom_interfaces: 'YES'
              interfaces:
                - ip: '{#HV.IP}'
          master_item:
            key: 'vmware.hv.discovery[{$VMWARE.URL}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 7d
        - uuid: d7005165096441d0a4a47cbf8b6e0f4c
          name: 'VMware hypervisor for MGMT discovery'
          type: DEPENDENT
          key: MGMT.hypervisor.discovery
          delay: '0'
          filter:
            conditions:
              - macro: '{#CLUSTER.NAME}'
                value: mgmt
                formulaid: A
          lifetime: 3d
          description: 'Discovery of hypervisors.'
          host_prototypes:
            - uuid: 94647405965349669f5a8761eb4fe9c0
              host: '{#HV.NAME}'
              name: '{#HV.NAME}'
              group_links:
                - group:
                    name: 'АПК МНС/Виртуализация/Vmware/MGMT/Hosts'
              templates:
                - name: 'VMware Hypervisor for APK IS3-MNS'
              macros:
                - macro: '{$VMWARE.CLUSTER.NAME}'
                  value: '{#CLUSTER.NAME}'
                - macro: '{$VMWARE.HV.ID}'
                  value: '{#HV.ID}'
                - macro: '{$VMWARE.HV.UUID}'
                  value: '{#HV.UUID}'
                  description: 'UUID of hypervisor.'
              tags:
                - tag: cluster
                  value: '{#CLUSTER.NAME}'
                - tag: email
                  value: ОЭиРРП
                - tag: Management
                - tag: 'Monitored by'
                  value: zabbix-proxy-cloudstack
                - tag: АПК
                  value: МНС
                - tag: Отв
                  value: ОЭиРРП
              custom_interfaces: 'YES'
              interfaces:
                - ip: '{#HV.IP}'
          master_item:
            key: 'vmware.hv.discovery[{$VMWARE.URL}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 7d
        - uuid: 7305a2d1e1514c699cee80d23f87c7e9
          name: 'VMware hypervisor for MNS discovery'
          type: DEPENDENT
          key: MNS.hypervisor.discovery
          delay: '0'
          filter:
            conditions:
              - macro: '{#CLUSTER.NAME}'
                value: pk3|mgmt
                operator: NOT_MATCHES_REGEX
                formulaid: A
          lifetime: 3d
          description: 'Discovery of hypervisors.'
          host_prototypes:
            - uuid: ae3b10ec0ef64e96ad4ff909facd88c5
              host: '{#HV.NAME}'
              name: '{#HV.NAME}'
              group_links:
                - group:
                    name: 'АПК МНС/Виртуализация/Vmware/Hosts'
              templates:
                - name: 'VMware Hypervisor for APK IS3-MNS'
              macros:
                - macro: '{$VMWARE.CLUSTER.NAME}'
                  value: '{#CLUSTER.NAME}'
                - macro: '{$VMWARE.HV.ID}'
                  value: '{#HV.ID}'
                - macro: '{$VMWARE.HV.UUID}'
                  value: '{#HV.UUID}'
                  description: 'UUID of hypervisor.'
              tags:
                - tag: cluster
                  value: '{#CLUSTER.NAME}'
                - tag: email
                  value: ОЭиРРП
                - tag: 'Monitored by'
                  value: zabbix-proxy-cloudstack
                - tag: АПК
                  value: МНС
                - tag: Отв
                  value: ОЭиРРП
              custom_interfaces: 'YES'
              interfaces:
                - ip: '{#HV.IP}'
          master_item:
            key: 'vmware.hv.discovery[{$VMWARE.URL}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 7d
        - uuid: c13206fdbcc740829553c3bc0f46199d
          name: 'VMware alarm discovery'
          type: DEPENDENT
          key: vmware.alarms.discovery
          delay: '0'
          filter:
            conditions:
              - macro: '{#VMWARE.ALARMS.ACKNOWLEDGED}'
                value: 'false'
                formulaid: A
              - macro: '{#VMWARE.ALARMS.KEY}'
                value: '{$VMWARE.ALARMS.KEYS_NOT_MATCH}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
              - macro: '{#VMWARE.ALARMS.SYSTEM_NAME}'
                value: '{$VMWARE.ALARM.FILTER.SYSTEM_NAME}'
                operator: NOT_MATCHES_REGEX
                formulaid: C
          lifetime: 3d
          description: 'Discovery of alarms.'
          item_prototypes:
            - uuid: 4dda82ef726546f1837f7ba34fa8e60c
              name: 'Alarm: {#VMWARE.ALARMS.NAME}'
              type: DEPENDENT
              key: 'vmware.alarms.status["{#VMWARE.ALARMS.KEY}"]'
              delay: '0'
              value_type: CHAR
              trends: '0'
              description: |
                VMware alarm status.
                Description: {#VMWARE.ALARMS.DESC}
                Alarm system_name: {#VMWARE.ALARMS.SYSTEM_NAME}
              preprocessing:
                - type: CHECK_NOT_SUPPORTED
                  parameters:
                    - '-1'
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.key == "{#VMWARE.ALARMS.KEY}")].key.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '-1'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'vmware.alarms.get[{$VMWARE.URL}]'
              tags:
                - tag: component
                  value: alarms
              trigger_prototypes:
                - uuid: ce82252f517e4597a4fd14fef1231164
                  expression: 'last(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.alarms.status["{#VMWARE.ALARMS.KEY}"])<>-1'
                  name: 'VMware: {#VMWARE.ALARMS.NAME}'
                  url_name: vRealize
                  url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
                  description: |
                    Alarm description: {#VMWARE.ALARMS.DESC}
                    Alarm system_name: {#VMWARE.ALARMS.SYSTEM_NAME}
          master_item:
            key: 'vmware.alarms.get[{$VMWARE.URL}]'
          lld_macro_paths:
            - lld_macro: '{#VMWARE.ALARMS.ACKNOWLEDGED}'
              path: $.acknowledged
            - lld_macro: '{#VMWARE.ALARMS.DESC}'
              path: $.description
            - lld_macro: '{#VMWARE.ALARMS.KEY}'
              path: $.key
            - lld_macro: '{#VMWARE.ALARMS.NAME}'
              path: $.name
            - lld_macro: '{#VMWARE.ALARMS.STATUS}'
              path: $.overall_status
            - lld_macro: '{#VMWARE.ALARMS.SYSTEM_NAME}'
              path: $.system_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Trigger priority red'
              step: '1'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: red
                    formulaid: A
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: HIGH
            - name: 'Trigger priority yellow'
              step: '2'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: yellow
                    formulaid: A
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: WARNING
            - name: 'Trigger priority green'
              step: '3'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: green
                    formulaid: A
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: INFO
        - uuid: 72a162b3cff7466890b290f8e190d8bd
          name: 'VMware cluster discovery'
          type: SIMPLE
          key: 'vmware.cluster.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          lifetime: 3d
          description: 'Discovery of clusters.'
          item_prototypes:
            - uuid: e3e9c8982db24ad5baaefa706d7c7cfb
              name: 'Status of cluster: {#CLUSTER.NAME}'
              type: SIMPLE
              key: 'vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}]'
              delay: 5m
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: |
                VMware cluster status. One of the following:
                - Gray: Unknown;
                - Green: OK;
                - Yellow: It might have a problem;
                - Red: It has a problem.
              valuemap:
                name: 'VMware status'
              tags:
                - tag: cluster
                  value: '{#CLUSTER.NAME}'
              trigger_prototypes:
                - uuid: a35e9458272e408f98e02dd0d41d1af0
                  expression: 'min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}],10)=3'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}],10m)<3'
                  name: 'VMware cluster: {#CLUSTER.NAME} status is Red'
                  url_name: vRealize
                  url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
                  priority: HIGH
                  description: |
                    VMware cluster status. One of the following:
                    - Gray: Unknown;
                    - Green: OK;
                    - Yellow: It might have a problem;
                    - Red: It has a problem.
                    
                    A cluster enabled for DRS becomes invalid (red) when the tree is no longer internally consistent, that is, when resource constraints are not observed.
                  manual_close: 'YES'
                - uuid: a105138a08b04e2d9472d039514fd4a2
                  expression: 'max(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}],15m)=0'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=1'
                  name: 'VMware cluster {#CLUSTER.NAME} status is Unknown'
                  url_name: vRealize
                  url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
                  priority: INFO
                  description: |
                    VMware cluster status. One of the following:
                    - Gray: Unknown;
                    - Green: OK;
                    - Yellow: It might have a problem;
                    - Red: It has a problem.
                  manual_close: 'YES'
                  dependencies:
                    - name: 'VMware cluster: {#CLUSTER.NAME} status is Red'
                      expression: 'min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}],10)=3'
                      recovery_expression: 'max(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}],10m)<3'
                    - name: 'VMware cluster {#CLUSTER.NAME} status is Yellow'
                      expression: 'count(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}],#3,"eq",2)=3'
                - uuid: 93aadce692ec4fe88cde4bedc490493e
                  expression: 'count(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}],#3,"eq",2)=3'
                  name: 'VMware cluster {#CLUSTER.NAME} status is Yellow'
                  url_name: vRealize
                  url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
                  priority: WARNING
                  description: |
                    VMware cluster status. One of the following:
                    - Gray: Unknown;
                    - Green: OK;
                    - Yellow: It might have a problem;
                    - Red: It has a problem.
                    
                    A cluster becomes overcommitted (yellow) when the tree of resource pools and virtual machines is internally consistent but the cluster does not have the capacity to support all the resources reserved by the child resource pools.
                  manual_close: 'YES'
                  dependencies:
                    - name: 'VMware cluster: {#CLUSTER.NAME} status is Red'
                      expression: 'min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}],10)=3'
                      recovery_expression: 'max(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}],10m)<3'
        - uuid: cbedba0f17ee456083219e4efeb6fa44
          name: 'VMware datastore discovery'
          type: SIMPLE
          key: 'vmware.datastore.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          filter:
            conditions:
              - macro: '{#DATASTORE}'
                value: '{$DATASTORE.NAME_NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: A
              - macro: '{#DATASTORE.TYPE}'
                value: '{$DATASTORE.TYPE_NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          lifetime: 3d
          description: 'Discovery of VMware datastores.'
          item_prototypes:
            - uuid: 9bb4175b194342aabed389f19d676933
              name: 'Average read latency of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
              delay: 5m
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'Amount of time for a read operation from the datastore (milliseconds).'
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
            - uuid: f8b5bed767df437c974d578b4fd0a984
              name: 'Average read IOPS of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
              delay: 5m
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'IOPS for a read operation from the datastore (milliseconds).'
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
            - uuid: 1ed5acb6c617414dbc72891c5d99dc8f
              name: 'Free space on datastore [{#DATASTORE}] (percentage)'
              type: SIMPLE
              key: 'vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree]'
              delay: 1h
              value_type: FLOAT
              units: '%'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware datastore free space (percentage from the total).'
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
              trigger_prototypes:
                - uuid: 0aef7f1101c641f0a79a1d11b921c94f
                  expression: 'max(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree],12h)<{$VMWARE.DATASTORE.SPACE.INFO:"{#DATASTORE}"} and min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree],12h:now-12h)>{$VMWARE.DATASTORE.SPACE.INFO:"{#DATASTORE}"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree],2h)>={$VMWARE.DATASTORE.SPACE.INFO:"{#DATASTORE}"}'
                  name: 'VMware Datastore free space is low'
                  event_name: 'VMware Datastore: {#DATASTORE} free space is low < {$VMWARE.DATASTORE.SPACE.INFO:"{#DATASTORE}"}%'
                  priority: INFO
                  description: |
                    Datastore free space has fallen below the warning threshold.
                    DATASTORE.UUID: {#DATASTORE.UUID}
                  manual_close: 'YES'
                  dependencies:
                    - name: 'VMware datastore: {#DATASTORE} Total size < 1T'
                      expression: 'last(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID}])<1T'
                    - name: 'VMware Datastore free space is low'
                      expression: 'max(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree],12h)<{$VMWARE.DATASTORE.SPACE.WARN:"{#DATASTORE}"} and min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree],12h)>{$VMWARE.DATASTORE.SPACE.WARN:"{#DATASTORE}"}'
                      recovery_expression: 'min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree],6h)>={$VMWARE.DATASTORE.SPACE.WARN:"{#DATASTORE}"}'
                - uuid: 5aba025907cf41b386e2abfb875c4d23
                  expression: 'max(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree],12h)<{$VMWARE.DATASTORE.SPACE.WARN:"{#DATASTORE}"} and min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree],12h)>{$VMWARE.DATASTORE.SPACE.WARN:"{#DATASTORE}"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree],6h)>={$VMWARE.DATASTORE.SPACE.WARN:"{#DATASTORE}"}'
                  name: 'VMware Datastore free space is low'
                  event_name: 'VMware Datastore: {#DATASTORE} free space is low < {$VMWARE.DATASTORE.SPACE.WARN:"{#DATASTORE}"}%'
                  url_name: vRealize
                  url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
                  priority: WARNING
                  description: |
                    Datastore free space has fallen below the warning threshold.
                    DATASTORE.UUID: {#DATASTORE.UUID}
                  manual_close: 'YES'
                  dependencies:
                    - name: 'VMware datastore: {#DATASTORE} Total size < 1T'
                      expression: 'last(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID}])<1T'
            - uuid: 8255667797874b3aaa621e5a3e4c6d2f
              name: 'Total size of datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID}]'
              delay: 1h
              units: B
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware datastore space in bytes.'
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
              trigger_prototypes:
                - uuid: 869bce79c76a4f398fcc3863c371c7bf
                  expression: 'last(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID}])<1T'
                  name: 'VMware datastore: {#DATASTORE} Total size < 1T'
                  priority: INFO
                  description: 'Для определения Datastore < 1TB и отключения их в мониторинг (добавление в фильтр для исключения в discovery)'
            - uuid: cc7e705e723643c89b2013b52142260f
              name: 'Average write latency of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
              delay: 5m
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'Amount of time for a write operation to the datastore (milliseconds).'
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
            - uuid: b71d73ac8c6542cf9cf5395250ae2656
              name: 'Average write IOPS of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
              delay: 5m
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'IOPS for a write operation to the datastore (milliseconds).'
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
          overrides:
            - name: 'Disable IO perfCounter'
              step: '1'
              filter:
                conditions:
                  - macro: '{#DATASTORE.TYPE}'
                    value: vsan|nfs|NFS
                    formulaid: A
              operations:
                - operationobject: ITEM_PROTOTYPE
                  operator: LIKE
                  value: Average
                  discover: NO_DISCOVER
      httptests:
        - uuid: 91bc77949c7d43af997dd5a969df3320
          name: '{{$VMWARE.URL}.iregsub("(http.+)\/sdk",\1)}'
          delay: 5m
          attempts: '2'
          steps:
            - name: '{{$VMWARE.URL}.iregsub("(http.+)\/sdk",\1)}'
              url: '{{$VMWARE.URL}.iregsub("(http.+)\/sdk",\1)}'
              follow_redirects: 'NO'
              retrieve_mode: BOTH
              timeout: 30s
              required: VMware
              status_codes: '200'
      macros:
        - macro: '{$DATASTORE.NAME_NOT_MATCHES}'
          value: Veeam
        - macro: '{$DATASTORE.TYPE_NOT_MATCHES}'
          value: 'Datastore Type for filtering'
        - macro: '{$VMWARE.ALARM.FILTER.SYSTEM_NAME}'
          value: alarm\.Vm|HostCPUUsageAlarm|HostMemoryUsageAlarm|StoragePodSDRSRecommendation|HAvmMonitoring|DatastoreDiskUsage|StoragePodOutOfSpace|HostConnectionStateAlarm|TPMAttestationAlarm
        - macro: '{$VMWARE.ALARMS.KEYS_NOT_MATCH}'
          value: alarm-\d+\.vm-\d+
        - macro: '{$VMWARE.DATASTORE.SPACE.INFO}'
          value: '10'
        - macro: '{$VMWARE.DATASTORE.SPACE.WARN}'
          value: '5'
          description: 'The warning threshold of the datastore free space.'
        - macro: '{$VMWARE.PASSWORD}'
          description: 'VMware service `{$USERNAME}` user password.'
        - macro: '{$VMWARE.PROXY}'
          description: 'Sets the HTTP proxy for script items. If this parameter is empty, then no proxy is used.'
        - macro: '{$VMWARE.URL}'
          value: 'https://vcsa-cs.aisrp.local'
          description: 'VMware service (vCenter or ESX hypervisor) SDK URL (https://servername/sdk).'
        - macro: '{$VMWARE.USERNAME}'
          value: esm
          description: 'VMware service user name.'
        - macro: '{$VMWARE.VM.POWERSTATE}'
          value: poweredOn|poweredOff|suspended
          description: 'Possibility to filter out VMs by power state.'
      valuemaps:
        - uuid: fb87237cb49d42db95f8a6ff7a69b62a
          name: 'VMware Overall Health VC State'
          mappings:
            - value: '0'
              newvalue: Green
            - value: '1'
              newvalue: Yellow
            - value: '2'
              newvalue: Orange
            - value: '3'
              newvalue: Red
            - value: '4'
              newvalue: Gray
            - value: '5'
              newvalue: Unknown
            - value: '6'
              newvalue: 'Not available'
        - uuid: 51039de49d194949a67214440e51aabe
          name: 'VMware status'
          mappings:
            - value: '0'
              newvalue: Gray
            - value: '1'
              newvalue: Green
            - value: '2'
              newvalue: Yellow
            - value: '3'
              newvalue: Red
    - uuid: c16fb28252a04c2a87f5d997d36bb4c0
      template: 'VMware Hypervisor for APK IS3-MNS'
      name: 'VMware Hypervisor for APK IS3-MNS'
      groups:
        - name: Templates/VMware
      items:
        - uuid: 95faaa28b4a247659345c0c7579faa32
          name: 'Memory usage %'
          type: CALCULATED
          key: hv.memory.used.percenteg
          delay: 5m
          value_type: FLOAT
          units: '%'
          params: '100*last(//vmware.hv.memory.used[{$VMWARE.URL},{$VMWARE.HV.UUID}])/last(//vmware.hv.hw.memory[{$VMWARE.URL},{$VMWARE.HV.UUID}])'
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 1733cf5b3a2041b1864e13a7e55d1847
              expression: 'min(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,{$HOST.MEMORY.PUSED_WARN_TIMEOUT})>={$HOST.MEMORY.PUSED_WARN}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,10m)<={$HOST.MEMORY.PUSED_WARN}-5'
              name: 'VMware Hypervisor high memory used'
              event_name: 'VMware Hypervisor  memory used > {$HOST.MEMORY.PUSED_WARN}%  ({ITEM.VALUE})'
              priority: INFO
              manual_close: 'YES'
        - uuid: 12bcb768d2a7444c91425bc7415f5e63
          name: 'VMware: Get alarms'
          type: SIMPLE
          key: 'vmware.hv.alarms.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          history: '0'
          value_type: TEXT
          trends: '0'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Get alarm status.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '0'
                - 'Timeout was reached'
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '0'
                - 'Received response has no valid XML data'
          tags:
            - tag: component
              value: raw
        - uuid: daeceb4722744eeea30d7f1147bb9027
          name: 'Connection state'
          type: SIMPLE
          key: 'vmware.hv.connectionstate[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 5m
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: |
            VMware hypervisor connection state. One of the following:
            - Connected;
            - Disconnected;
            - Not responding.
          valuemap:
            name: 'VMware Connection state'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = [
                  	'connected',
                  	'disconnected',
                  	'notResponding'
                  ].indexOf(value);
                  return idx !== -1 ? idx : 3;
          tags:
            - tag: component
              value: availability
          triggers:
            - uuid: 370ed8842df44ea587cb21b50d63fe2d
              expression: 'min(/VMware Hypervisor for APK IS3-MNS/vmware.hv.connectionstate[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)>0'
              name: 'Hypervisor connection state is {ITEM.VALUE}'
              url_name: vRealize
              url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
              priority: WARNING
              manual_close: 'YES'
        - uuid: a331c699cfb6411eaa609e8687636538
          name: 'CPU usage in percent'
          type: SIMPLE
          key: 'vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 5m
          value_type: FLOAT
          units: '%'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'CPU usage as a percentage during the interval.'
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 5e68cc424ceb4ed784d749919155ce8a
              expression: 'min(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$HOST.CPU.PUSED_WARN_TIMEOUT})>={$HOST.CPU.PUSED_WARN}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)<={$HOST.CPU.PUSED_WARN}-5'
              name: 'VMware Hypervisor high CPU used'
              event_name: 'VMware Hypervisor CPU used > {$HOST.CPU.PUSED_WARN}%  ({ITEM.VALUE})'
              url_name: vRealize
              url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
              priority: INFO
              manual_close: 'YES'
        - uuid: ae8c09f7ad4148b7a39a67beb6b9bf4c
          name: 'CPU usage in MHz'
          type: SIMPLE
          key: 'vmware.hv.cpu.usage[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 5m
          units: Hz
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Aggregated CPU usage across all cores on the host in Hz. This is only available if the host is connected.'
          tags:
            - tag: component
              value: cpu
        - uuid: 5f68fbfafe794e17993b8172f36dcd15
          name: 'Total memory'
          type: SIMPLE
          key: 'vmware.hv.hw.memory[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The physical memory size.'
          tags:
            - tag: component
              value: memory
        - uuid: 109b1bfd639442a6ad991070d565cd88
          name: 'Used memory'
          type: SIMPLE
          key: 'vmware.hv.memory.used[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 5m
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Physical memory usage on the host.'
          tags:
            - tag: component
              value: memory
        - uuid: d6945e2c6d6b4a6abce318b9296be676
          name: 'Number of bytes received'
          type: SIMPLE
          key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},bps]'
          delay: 5m
          units: Bps
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network input statistics (bytes per second).'
          tags:
            - tag: component
              value: network
        - uuid: 25a7f11bd0204517a3be1922221bdbd8
          name: 'Number of broadcasts received'
          type: SIMPLE
          key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},broadcast]'
          delay: 5m
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network input statistics (broadcasts).'
          tags:
            - tag: component
              value: network
        - uuid: 4193ffd9cf544a1f83001cd9d78f5db3
          name: 'Number of dropped received packets'
          type: SIMPLE
          key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},dropped]'
          delay: 5m
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network input statistics (packets dropped).'
          tags:
            - tag: component
              value: network
        - uuid: 9058e353f743418bb3e7b54e0784bd1b
          name: 'Number of errors received'
          type: SIMPLE
          key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},errors]'
          delay: 5m
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network input statistics (errors).'
          tags:
            - tag: component
              value: network
        - uuid: 629a73aa3aa74d99b104fc21d04a9415
          name: 'Number of bytes transmitted'
          type: SIMPLE
          key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},bps]'
          delay: 5m
          units: Bps
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network output statistics (bytes per second).'
          tags:
            - tag: component
              value: network
        - uuid: a731fa4cb81b4ba293753694ce4e7f42
          name: 'Number of broadcasts transmitted'
          type: SIMPLE
          key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},broadcast]'
          delay: 5m
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network output statistics (broadcasts).'
          tags:
            - tag: component
              value: network
        - uuid: e9e802792d494c1dacef01b20775c26d
          name: 'Number of dropped transmitted packets'
          type: SIMPLE
          key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},dropped]'
          delay: 5m
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network output statistics (packets dropped).'
          tags:
            - tag: component
              value: network
        - uuid: c63bd572da4a4cd98dd1e86d0c24cad0
          name: 'Number of errors transmitted'
          type: SIMPLE
          key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},errors]'
          delay: 5m
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network output statistics (errors).'
          tags:
            - tag: component
              value: network
        - uuid: 1847494f77b94c3b97158ac416b3644a
          name: 'Get sensors'
          type: SIMPLE
          key: 'vmware.hv.sensors.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 5m
          history: '0'
          value_type: TEXT
          trends: '0'
          status: DISABLED
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Master item for sensor data.'
          tags:
            - tag: component
              value: raw
        - uuid: 75a0e8fc8e0d49a88595afcdaa68170d
          name: 'Overall status'
          type: SIMPLE
          key: 'vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 5m
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: |
            The overall alarm status of the host. One of the following:
            - Gray: Unknown;
            - Green: OK;
            - Yellow: It might have a problem;
            - Red: It has a problem.
          valuemap:
            name: 'VMware status'
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: 415b356f9ab447eda2c576c95b3c437e
              expression: 'nodata(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$VMWARE_NODATA_TIMEOUT})=1'
              name: 'Nodata received about host for last {$VMWARE_NODATA_TIMEOUT}'
              priority: INFO
              description: |
                Не получена информация о хосте из vCenter за последние {$VMWARE_NODATA_TIMEOUT}.
                Не критично при отсутствии других аварий на оборудовании и сервисах.
                Уведомить ГРСМ по почте.
              manual_close: 'YES'
              dependencies:
                - name: 'Nodata get about hosts from vCenter for last 20 min'
                  expression: 'nodata(/g01vc.g1mnscloud.local/Host.get.check,20m)=1 or max(/g01vc.g1mnscloud.local/Host.get.check,20m)=0'
                - name: 'Веб-интерфейс vcenter ("{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}") недоступен. Ошибка: {ITEM.VALUE1}'
                  expression: 'length(last(/g01vc.g1mnscloud.local/web.test.error["{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}"]))>0 and min(/g01vc.g1mnscloud.local/web.test.fail["{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}"],#3) >0'
                  recovery_expression: 'last(/g01vc.g1mnscloud.local/web.test.fail["{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}"])=0'
            - uuid: 527c72ab1e9945c8a4603349e53f0b85
              expression: 'max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)=0'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'last(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=1'
              name: 'VMware Hypervisor overall alarm status is Gray (Unknown)'
              url_name: vRealize
              url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
              priority: INFO
              description: |
                The overall alarm status of the host. One of the following:
                - Gray: Unknown;
                - Green: OK;
                - Yellow: It might have a problem;
                - Red: It has a problem.
              manual_close: 'YES'
              dependencies:
                - name: 'VMware Hypervisor overall alarm status is Red'
                  expression: 'min(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)=3 and max(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,15m)<90 and max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],15m)<90 and avg(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m:now-10m)<3'
                  recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)<3'
                - name: 'VMware Hypervisor overall alarm status is Yellow'
                  expression: 'min(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$VMWARE.HV.STATUS.YELLOW.TIMEOUT})>1 and max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$VMWARE.HV.STATUS.YELLOW.TIMEOUT})<3 and max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],15m)<75 and max(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,15m)<90 and avg(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$VMWARE.HV.STATUS.YELLOW.TIMEOUT}:now-30m)<2'
                  recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)<2'
        - uuid: bf3633d765cd46a4ba79a370fc98fa92
          name: Uptime
          type: SIMPLE
          key: 'vmware.hv.uptime[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 5m
          units: uptime
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'System uptime.'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: ce8405ebcc904095932fea3aac7e5743
              expression: 'last(/VMware Hypervisor for APK IS3-MNS/vmware.hv.uptime[{$VMWARE.URL},{$VMWARE.HV.UUID}])<10m'
              name: 'VMware Hypervisor has been restarted (uptime < 10m)'
              priority: INFO
              description: |
                Uptime is less than 10 minutes.
                
                Hypervisor ID: {$VMWARE.HV.ID}
                Hypervisor UUID: {$VMWARE.HV.UUID}
              manual_close: 'YES'
        - uuid: 80818084db804f8e85bb920d25c50432
          name: 'Number of guest VMs'
          type: SIMPLE
          key: 'vmware.hv.vm.num[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 5m
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Number of guest virtual machines.'
          tags:
            - tag: component
              value: system
      discovery_rules:
        - uuid: 593b14df85cb4cb5834d78f2c0186b1a
          name: 'VMware alarm discovery'
          type: DEPENDENT
          key: vmware.alarms.discovery
          delay: '0'
          filter:
            conditions:
              - macro: '{#VMWARE.ALARMS.ACKNOWLEDGED}'
                value: 'false'
                formulaid: A
              - macro: '{#VMWARE.ALARMS.SYSTEM_NAME}'
                value: '{$VMWARE.ALARM.FILTER.SYSTEM_NAME}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          lifetime: 3d
          description: 'Discovery of alarms.'
          item_prototypes:
            - uuid: 4e5ede6f997847cfb22cb7772d1f7a37
              name: 'Alarm: {#VMWARE.ALARMS.NAME}'
              type: DEPENDENT
              key: 'vmware.alarms.status["{#VMWARE.ALARMS.KEY}"]'
              delay: '0'
              value_type: CHAR
              trends: '0'
              description: 'VMware alarm status.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.key == "{#VMWARE.ALARMS.KEY}")].key.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '-1'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'vmware.hv.alarms.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
              tags:
                - tag: component
                  value: alarms
              trigger_prototypes:
                - uuid: 651fb3731014482ea092bba4775fbf7a
                  expression: 'last(/VMware Hypervisor for APK IS3-MNS/vmware.alarms.status["{#VMWARE.ALARMS.KEY}"])<>-1'
                  name: 'VMware: {#VMWARE.ALARMS.NAME}'
                  description: |
                    Alarm description: {#VMWARE.ALARMS.DESC}
                    Alarm system_name: {#VMWARE.ALARMS.SYSTEM_NAME}
                  manual_close: 'YES'
          master_item:
            key: 'vmware.hv.alarms.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          lld_macro_paths:
            - lld_macro: '{#VMWARE.ALARMS.ACKNOWLEDGED}'
              path: $.acknowledged
            - lld_macro: '{#VMWARE.ALARMS.DESC}'
              path: $.description
            - lld_macro: '{#VMWARE.ALARMS.KEY}'
              path: $.key
            - lld_macro: '{#VMWARE.ALARMS.NAME}'
              path: $.name
            - lld_macro: '{#VMWARE.ALARMS.STATUS}'
              path: $.overall_status
            - lld_macro: '{#VMWARE.ALARMS.SYSTEM_NAME}'
              path: $.system_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Trigger priority red'
              step: '1'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: red
                    formulaid: A
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: HIGH
            - name: 'Trigger priority yellow'
              step: '2'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: yellow
                    formulaid: A
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: WARNING
            - name: 'Trigger priority green'
              step: '3'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: green
                    formulaid: A
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: INFO
        - uuid: a4293d34ce4d47449379b41449617039
          name: 'Healthcheck discovery'
          type: DEPENDENT
          key: vmware.hv.healthcheck.discovery
          delay: '0'
          description: 'VMware Rollup Health State sensor discovery.'
          item_prototypes:
            - uuid: d5b0c16e52ca4306b55f7ca58e3f08dd
              name: 'Health state rollup'
              type: DEPENDENT
              key: 'vmware.hv.sensor.health.state[{#SINGLETON}]'
              delay: '0'
              description: |
                The host's Rollup Health State sensor value. One of the following:
                - Gray: Unknown;
                - Green: OK;
                - Yellow: It might have a problem;
                - Red: It has a problem.
              valuemap:
                name: 'VMware status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..HostNumericSensorInfo[?(@.name=="VMware Rollup Health State")].healthState.label.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'gray',
                      	'green',
                      	'yellow',
                      	'red'
                      ].indexOf(value.toLowerCase());
                      return idx !== -1 ? idx : 0;
              master_item:
                key: 'vmware.hv.sensors.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
              tags:
                - tag: component
                  value: health
              trigger_prototypes:
                - uuid: ee80196da917494481b7110235b98290
                  expression: 'last(/VMware Hypervisor for APK IS3-MNS/vmware.hv.sensor.health.state[{#SINGLETON}])=3'
                  name: 'VMware Hypervisor Rollup Health State sensor value is Red'
                  priority: HIGH
                  description: |
                    One or more components in the appliance might be in an unusable status and the appliance might soon become unresponsive. Security patches might be available.
                    
                    Hypervisor ID: {$VMWARE.HV.ID}
                    Hypervisor UUID: {$VMWARE.HV.UUID}
                    
                    The host's Rollup Health State sensor value. One of the following:
                    - Gray: Unknown;
                    - Green: OK;
                    - Yellow: It might have a problem;
                    - Red: It has a problem.
                  manual_close: 'YES'
                - uuid: cde16b7597b54188a8f06ebcbc5ceb6b
                  expression: 'last(/VMware Hypervisor for APK IS3-MNS/vmware.hv.sensor.health.state[{#SINGLETON}])=2'
                  name: 'VMware Hypervisor Rollup Health State sensor value is Yellow'
                  priority: AVERAGE
                  description: |
                    One or more components in the appliance might soon become overloaded.
                    
                    Hypervisor ID: {$VMWARE.HV.ID}
                    Hypervisor UUID: {$VMWARE.HV.UUID}
                    
                    The host's Rollup Health State sensor value. One of the following:
                    - Gray: Unknown; 
                    - Green: OK;
                    - Yellow: It might have a problem;
                    - Red: It has a problem.
                  manual_close: 'YES'
                  dependencies:
                    - name: 'VMware Hypervisor Rollup Health State sensor value is Red'
                      expression: 'last(/VMware Hypervisor for APK IS3-MNS/vmware.hv.sensor.health.state[{#SINGLETON}])=3'
          master_item:
            key: 'vmware.hv.sensors.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$..HostNumericSensorInfo[?(@.name=="VMware Rollup Health State")]'
              error_handler: CUSTOM_VALUE
              error_handler_params: '[]'
            - type: JAVASCRIPT
              parameters:
                - 'return JSON.stringify(value != "[]" ? [{''{#SINGLETON}'': ''''}] : []);'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 068dea16e54542668827cb4f341b313e
          name: 'Network interface discovery'
          type: SIMPLE
          key: 'vmware.hv.net.if.discovery[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1d
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          lifetime: 3d
          description: 'Discovery of VMware hypervisor network interfaces.'
          item_prototypes:
            - uuid: ea1717940db94e38a3c476eb460b65ab
              name: '[{#IFNAME}] network interface speed'
              type: SIMPLE
              key: 'vmware.hv.network.linkspeed[{$VMWARE.URL},{$VMWARE.HV.UUID},{#IFNAME}]'
              units: bps
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware hypervisor network interface speed.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#IFNAME}'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 7d
        - uuid: 4b57bc3030a34c97a8cc550d224fc6a6
          name: 'Sensor discovery'
          type: DEPENDENT
          key: vmware.hv.sensors.discovery
          delay: '0'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.MATCHES}'
                formulaid: A
              - macro: '{#NAME}'
                value: 'VMware Rollup Health State'
                operator: NOT_MATCHES_REGEX
                formulaid: B
              - macro: '{#NAME}'
                value: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: C
          description: 'VMware hardware sensor discovery. The data is retrieved from numeric sensor probes and provides information about the health of the physical system.'
          item_prototypes:
            - uuid: bcc3aff24e2e4c2cb9fb5a1797f16f25
              name: 'Sensor [{#NAME}] health state'
              type: DEPENDENT
              key: 'vmware.hv.sensor.state["{#NAME}"]'
              delay: '0'
              description: |
                VMware hardware sensor health state. One of the following:
                - Gray: Unknown;
                - Green: OK;
                - Yellow: It might have a problem;
                - Red: It has a problem.
              valuemap:
                name: 'VMware status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..HostNumericSensorInfo[?(@.name=="{#NAME}")].healthState.label.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'gray',
                      	'green',
                      	'yellow',
                      	'red'
                      ].indexOf(value.toLowerCase());
                      return idx !== -1 ? idx : 0;
              master_item:
                key: 'vmware.hv.sensors.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
              tags:
                - tag: component
                  value: health
                - tag: component
                  value: sensor
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: e0fb84bf4ae54df0aa4801f27f714f4d
                  expression: 'last(/VMware Hypervisor for APK IS3-MNS/vmware.hv.sensor.state["{#NAME}"])=3'
                  name: 'VMware Hypervisor: Sensor [{#NAME}] health state is Red'
                  discover: NO_DISCOVER
                  priority: HIGH
                  description: 'One or more components in the appliance might be in an unusable status and the appliance might soon become unresponsive.'
                - uuid: 251a66b72b894695b14c92bc890da808
                  expression: 'last(/VMware Hypervisor for APK IS3-MNS/vmware.hv.sensor.state["{#NAME}"])=2'
                  name: 'VMware Hypervisor: Sensor [{#NAME}] health state is Yellow'
                  discover: NO_DISCOVER
                  priority: AVERAGE
                  description: 'One or more components in the appliance might soon become overloaded.'
                  dependencies:
                    - name: 'VMware Hypervisor: Sensor [{#NAME}] health state is Red'
                      expression: 'last(/VMware Hypervisor for APK IS3-MNS/vmware.hv.sensor.state["{#NAME}"])=3'
          master_item:
            key: 'vmware.hv.sensors.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var result = [],
                  	sensors = JSON.parse(value)['val']['HostNumericSensorInfo'],
                  	discovery_flag = '{$VMWARE.HV.SENSOR.DISCOVERY}'.toLowerCase().trim();
                  
                  if (!(discovery_flag == 'true' || discovery_flag == 'false')) {
                  	throw 'Incorrect value of macro "{$' + 'VMWARE.HV.SENSOR.DISCOVERY}". Can be used only "true" or "false". Actual value: ' + discovery_flag;
                  }
                  
                  if (discovery_flag !== 'true' || typeof sensors === "undefined") {
                  	return JSON.stringify([]);
                  }
                  
                  sensors.forEach(function(sensor) {
                  	result.push({"{#NAME}": sensor['name'], "{#TYPE}": sensor['sensorType'].toLowerCase()});
                  })
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      macros:
        - macro: '{$HOST.CPU.PUSED_WARN}'
          value: '95'
        - macro: '{$HOST.CPU.PUSED_WARN_TIMEOUT}'
          value: 1h
        - macro: '{$HOST.MEMORY.PUSED_WARN}'
          value: '95'
        - macro: '{$HOST.MEMORY.PUSED_WARN_TIMEOUT}'
          value: 1h
        - macro: '{$VMWARE.ALARM.FILTER.SYSTEM_NAME}'
          value: HostCPUUsageAlarm|HostMemoryUsageAlarm
        - macro: '{$VMWARE.CLUSTER.NAME}'
        - macro: '{$VMWARE.HV.DATASTORE.SPACE.CRIT}'
          value: '10'
          description: 'The critical threshold of the datastore free space.'
        - macro: '{$VMWARE.HV.DATASTORE.SPACE.WARN}'
          value: '20'
          description: 'The warning threshold of the datastore free space.'
        - macro: '{$VMWARE.HV.ID}'
        - macro: '{$VMWARE.HV.SENSOR.DISCOVERY}'
          value: 'false'
          description: 'Set to "true"/"false" to enable or disable the monitoring of hardware sensors.'
        - macro: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of hardware sensor names to be allowed in discovery.'
        - macro: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of hardware sensor names to be ignored in discovery.'
        - macro: '{$VMWARE.HV.STATUS.YELLOW.TIMEOUT}'
          value: 15m
          description: '!!!!!!Если значение >=30m необходимо изменить значение сдвига времени в тригере (now-30m) на большее. Например now-35m'
        - macro: '{$VMWARE.HV.UUID}'
          description: 'UUID of hypervisor.'
        - macro: '{$VMWARE.PASSWORD}'
          description: 'VMware service `{$USERNAME}` user password.'
        - macro: '{$VMWARE.URL}'
          description: 'VMware service (vCenter or ESX hypervisor) SDK URL (https://servername/sdk).'
        - macro: '{$VMWARE.USERNAME}'
          description: 'VMware service user name.'
        - macro: '{$VMWARE_NODATA_TIMEOUT}'
          value: 30m
      dashboards:
        - uuid: 08e3755f88f24d7384fbded5d4b02659
          name: 'Hypervisor overview'
          pages:
            - name: 'VMware: Hypervisor Overview'
              widgets:
                - type: item
                  name: 'Overall status'
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_size
                      value: '7'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: STRING
                      name: thresholds.0.color
                      value: D2D2D2
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: 32CD32
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: FFF176
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.3.color
                      value: F44336
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '3'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: svggraph
                  name: 'Used memory'
                  'y': '4'
                  width: '32'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.memory.used[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: svggraph
                  name: 'CPU usage MHz'
                  'y': '10'
                  width: '32'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00BFFF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.cpu.usage[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: LWRFH
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: item
                  name: 'Connection state'
                  x: '18'
                  width: '14'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.connectionstate[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: STRING
                      name: thresholds.0.color
                      value: 32CD32
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: F44336
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: FFDAB9
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: item
                  name: Uptime
                  x: '32'
                  width: '14'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.uptime[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: svggraph
                  name: 'Used memory %'
                  x: '32'
                  'y': '4'
                  width: '40'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: hv.memory.used.percenteg
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: SEJFX
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'CPU usage %'
                  x: '32'
                  'y': '10'
                  width: '40'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00BFFF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: VXSAT
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: item
                  name: 'Total memory'
                  x: '46'
                  width: '14'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.hw.memory[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Number VMs'
                  x: '60'
                  width: '12'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.vm.num[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
            - name: 'VMware: Network'
              widgets:
                - type: svggraph
                  name: 'Number of broadcast'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00BFFF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},broadcast]'
                    - type: STRING
                      name: ds.1.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.1.fill
                      value: '5'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},broadcast]'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: svggraph
                  name: 'Number of bytes'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00BFFF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},bps]'
                    - type: STRING
                      name: ds.1.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.1.fill
                      value: '5'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},bps]'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graphprototype
                  name: 'Network interface speed'
                  'y': '8'
                  width: '72'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.network.linkspeed[{$VMWARE.URL},{$VMWARE.HV.UUID},{#IFNAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAF
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: svggraph
                  name: 'Number of dropped'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00BFFF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},dropped]'
                    - type: STRING
                      name: ds.1.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.1.fill
                      value: '5'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},dropped]'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: svggraph
                  name: 'Number of errors'
                  x: '36'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00BFFF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},errors]'
                    - type: STRING
                      name: ds.1.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.1.fill
                      value: '5'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'VMware Hypervisor for APK IS3-MNS'
                        key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},errors]'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAH
      valuemaps:
        - uuid: b100b320b8d14a8eba84c3fa6519b245
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
        - uuid: 98779b07d71d45ad9c22ee4e290056d3
          name: 'VMware Connection state'
          mappings:
            - value: '0'
              newvalue: Connected
            - value: '1'
              newvalue: Disconnected
            - value: '2'
              newvalue: 'Not responding'
            - value: '3'
              newvalue: Unknown
        - uuid: 967291fc10dc4d37a7cb1a68ce56a71c
          name: 'VMware status'
          mappings:
            - value: '0'
              newvalue: Gray
            - value: '1'
              newvalue: Green
            - value: '2'
              newvalue: Yellow
            - value: '3'
              newvalue: Red
  triggers:
    - uuid: d5675d6ccbb44d13895366c828565e1f
      expression: 'min(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)=3 and max(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,15m)<90 and max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],15m)<90 and avg(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m:now-10m)<3'
      recovery_mode: RECOVERY_EXPRESSION
      recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)<3'
      name: 'VMware Hypervisor overall alarm status is Red'
      opdata: 'Memory:{ITEM.LASTVALUE2}, CPU:{ITEM.LASTVALUE3}'
      url_name: vRealize
      url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
      priority: HIGH
      description: |
        One or more components in the appliance might be in an unusable status and the appliance might soon become unresponsive. Security patches might be available.
        
        Hypervisor ID: {$VMWARE.HV.ID}
        Hypervisor UUID: {$VMWARE.HV.UUID}
        
        The overall alarm status of the host. One of the following:
        - Gray: Unknown;
        - Green: OK;
        - Yellow: It might have a problem;
        - Red: It has a problem.
      manual_close: 'YES'
      dependencies:
        - name: 'VMware Hypervisor high CPU used'
          expression: 'min(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$HOST.CPU.PUSED_WARN_TIMEOUT})>={$HOST.CPU.PUSED_WARN}'
          recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)<={$HOST.CPU.PUSED_WARN}-5'
        - name: 'VMware Hypervisor high memory used'
          expression: 'min(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,{$HOST.MEMORY.PUSED_WARN_TIMEOUT})>={$HOST.MEMORY.PUSED_WARN}'
          recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,10m)<={$HOST.MEMORY.PUSED_WARN}-5'
    - uuid: 4521f60f8c874b85ab4c08849d76bd5a
      expression: 'min(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$VMWARE.HV.STATUS.YELLOW.TIMEOUT})>1 and max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$VMWARE.HV.STATUS.YELLOW.TIMEOUT})<3 and max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],15m)<75 and max(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,15m)<90 and avg(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$VMWARE.HV.STATUS.YELLOW.TIMEOUT}:now-30m)<2'
      recovery_mode: RECOVERY_EXPRESSION
      recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)<2'
      name: 'VMware Hypervisor overall alarm status is Yellow'
      opdata: 'Memory:{ITEM.LASTVALUE4}, CPU:{ITEM.LASTVALUE3}'
      url_name: vRealize
      url: 'https://10.70.1.234/ui/index.action#/home/quickStart'
      priority: WARNING
      description: |
        One or more components in the appliance might soon become overloaded.
        
        The overall alarm status of the host. One of the following:
        - Gray: Unknown;
        - Green: OK;
        - Yellow: It might have a problem;
        - Red: It has a problem.
      manual_close: 'YES'
      dependencies:
        - name: 'VMware Hypervisor high CPU used'
          expression: 'min(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],{$HOST.CPU.PUSED_WARN_TIMEOUT})>={$HOST.CPU.PUSED_WARN}'
          recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)<={$HOST.CPU.PUSED_WARN}-5'
        - name: 'VMware Hypervisor high memory used'
          expression: 'min(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,{$HOST.MEMORY.PUSED_WARN_TIMEOUT})>={$HOST.MEMORY.PUSED_WARN}'
          recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,10m)<={$HOST.MEMORY.PUSED_WARN}-5'
        - name: 'VMware Hypervisor overall alarm status is Red'
          expression: 'min(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)=3 and max(/VMware Hypervisor for APK IS3-MNS/hv.memory.used.percenteg,15m)<90 and max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}],15m)<90 and avg(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m:now-10m)<3'
          recovery_expression: 'max(/VMware Hypervisor for APK IS3-MNS/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}],10m)<3'
    - uuid: bdc37673e5ec46e6aeb66a1cb8d47435
      expression: 'length(last(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/web.test.error["{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}"]))>0 and min(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/web.test.fail["{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}"],#3) >0'
      recovery_mode: RECOVERY_EXPRESSION
      recovery_expression: 'last(/VMware FQDN Vcenter for APK IS3-MNS with distributed discovery for Hypervisor/web.test.fail["{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}"])=0'
      name: 'Веб-интерфейс vcenter ("{{$VMWARE.URL}.iregsub(\"(http.+)\/sdk\",\1)}") недоступен. Ошибка: {ITEM.VALUE1}'
      priority: WARNING
      manual_close: 'YES'
