zabbix_export:
  version: '8.0'
  template_groups:
    - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
    - uuid: 36bff6c29af64692839d077febfc7079
      name: 'Templates/Network devices'
    - uuid: e960332b3f6c46a1956486d4f3f99fce
      name: 'Templates/Server hardware'
  host_groups:
    - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Applications
  templates:
    - uuid: f74adf26d9ab44ada318002d31fd2881
      template: 'HashiCorp Nomad by HTTP'
      name: 'HashiCorp Nomad by HTTP'
      description: |
        Discover HashiCorp Nomad servers and clients automatically.
        
        Don't forget to change macro {$NOMAD.ENDPOINT.API.URL}, {$NOMAD.TOKEN} values.
        
        You can discuss this template or leave feedback on our forum: https://www.zabbix.com/forum/zabbix-suggestions-and-feedback.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed to monitor HashiCorp Nomad by Zabbix.
        It works without any external scripts.
        Currently the template supports Nomad servers and clients discovery.
        
        ## Setup
        
        1. Create a synthetic Nomad host. It should be one of the Nomad cluster members, load-balancing service (if cluster is used) or a single node in a selected Nomad region.
        2. Define the `API endpoint URL` host wizard configuration field value with correct web protocol, host and port.
        3. Prepare an ACL token with `node:read`, `namespace:read-job`, `agent:read` and `management` permissions applied. Define the `Authentication token` host wizard configuration field value.
        > Refer to the vendor documentation about [`Nomad native ACL`](https://developer.hashicorp.com/nomad/tutorials/access-control/access-control-policies) or [`Nomad Vault-generated tokens`](https://developer.hashicorp.com/nomad/tutorials/access-control/vault-nomad-secrets) if you have the HashiCorp Vault integration configured.
        
        **Additional information**:
        
        * Synthetic Nomad host will be used just as an endpoint for servers and clients discovery (general cluster information), it will not be monitored as a Nomad server or client, so that to prevent duplicate entities.
        * If you're not using ACL - skip 3rd setup step.
        * The Nomad servers/clients discovery is limited by region. If you're using multi-region cluster- create one synthetic host per region.
        * The Nomad server/client templates are ready for separate usage. Feel free to use if you prefer manual host creation.
        
        **Useful links**
        * [HashiCorp Nomad multi-region federation](https://developer.hashicorp.com/nomad/tutorials/manage-clusters/federation)
        * [HashiCorp Nomad agent API reference](https://developer.hashicorp.com/nomad/api-docs/agent)
        * [HashiCorp Nomad raft operator API reference](https://developer.hashicorp.com/nomad/api-docs/operator/raft)
        * [HashiCorp Nomad nodes API reference](https://developer.hashicorp.com/nomad/api-docs/nodes)
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 50bf00cc5c9f41c887add07d0bba3cc1
          name: 'Client nodes API response'
          type: DEPENDENT
          key: nomad.client.nodes.api.response
          value_type: TEXT
          description: 'Client nodes API response message.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var response = Object.keys(JSON.parse(value).header).filter(function (f) {
                  		return f.match(/HTTP\/[\d.]+\s+\d{3}/);
                  	});
                  
                  	return response.pop();
                  }
                  catch (error) {
                  	return "HTTP/1.1 408 Request timeout";
                  }
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.client.nodes.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: f2e1cbbf808946ca902c1f378747e936
              expression: 'find(/HashiCorp Nomad by HTTP/nomad.client.nodes.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              name: 'HashiCorp Nomad: Client nodes API connection has failed'
              event_name: 'HashiCorp Nomad: Client nodes API connection has failed. HTTP response code: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+(\d{3})", \1")}. Response message: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+\d{3}\s+(.*)", \1")}'
              priority: AVERAGE
              description: |
                Client nodes API connection has failed.
                Ensure that Nomad API URL and the necessary permissions have been defined correctly, check the service state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 99d8cd0768094bef93995e4baa475186
          name: 'Nomad clients get'
          type: HTTP_AGENT
          key: nomad.client.nodes.get
          delay: 1h
          history: '0'
          value_type: TEXT
          description: 'Nomad clients data in raw format.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"header":{"HTTP/1.1 408 Request timeout":""}}'
          timeout: '{$NOMAD.DATA.TIMEOUT}'
          url: '{$NOMAD.ENDPOINT.API.URL}/v1/nodes'
          query_fields:
            - name: os
              value: 'true'
          status_codes: ''
          http_proxy: '{$NOMAD.HTTP.PROXY}'
          headers:
            - name: X-Nomad-Token
              value: '{$NOMAD.TOKEN}'
          retrieve_mode: BOTH
          output_format: JSON
          tags:
            - tag: component
              value: raw
        - uuid: 7a46e18358e641cc941b306de6eb5dc4
          name: 'Nomad clients count'
          type: DEPENDENT
          key: nomad.clients.count
          description: 'Nomad clients count.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.body[?(@.Name)].length()'
          master_item:
            key: nomad.client.nodes.get
          tags:
            - tag: component
              value: environment
        - uuid: e848e135a5574931accf114fcafb89d7
          name: Region
          type: DEPENDENT
          key: nomad.region
          value_type: CHAR
          description: 'Current cluster region.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..region.first()
          master_item:
            key: nomad.server.nodes.get
          tags:
            - tag: component
              value: environment
        - uuid: 53a0c689f27547ccbcb0a57c736a5027
          name: 'Server-related APIs response'
          type: DEPENDENT
          key: nomad.server.api.response
          value_type: TEXT
          description: 'Server-related (`operator/raft/configuration`, `agent/members`) APIs error response message.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
              error_handler_params: 'HTTP/1.1 200 OK'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.server.nodes.get
          triggers:
            - uuid: 1560c32cb7de4fc8a58cf537c7958205
              expression: 'find(/HashiCorp Nomad by HTTP/nomad.server.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              name: 'HashiCorp Nomad: Server-related API connection has failed'
              event_name: 'HashiCorp Nomad: Server-related API connection has failed. HTTP response code: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+(\d{3})", \1")}. Response message: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+\d{3}\s+(.*)", \1")}'
              priority: AVERAGE
              description: |
                Server-related API connection has failed.
                Ensure that Nomad API URL and the necessary permissions have been defined correctly, check the service state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 254354aa21764751bf7e1961e37de7ae
          name: 'Nomad servers get'
          type: SCRIPT
          key: nomad.server.nodes.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            var Nomad = {
            	setParams: function (params) {
            		['api_endpoint'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: "' + field + '".';
            			}
            		});
            
            		Nomad.params = params;
            		if (typeof Nomad.params.api_endpoint === 'string' && !Nomad.params.api_endpoint.endsWith('/')) {
            			Nomad.params.api_endpoint += '/';
            		}
            	},
            
            	request: function (query) {
            		var response,
            			request = new HttpRequest(),
            			url = Nomad.params.api_endpoint + query;
            
            		request.addHeader('Content-Type: application/json');
            		request.addHeader('X-Nomad-Token: ' + Nomad.params.token);
            		if (Nomad.params.http_proxy) {
            			request.setProxy(Nomad.params.http_proxy)
            			Zabbix.log(4, '[ Nomad ] Using http proxy: ' + Nomad.params.http_proxy);
            		}
            
            		Zabbix.log(4, '[ Nomad ] Sending request: ' + url);
            		response = request.get(url);
            
            		Zabbix.log(4, '[ Nomad ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (response !== null) {
            			try {
            				response = JSON.parse(response);
            			}
            			catch (error) {
            				throw 'Failed to parse response received from Nomad agent API.';
            			}
            		}
            
            		return {
            			status: request.getStatus(),
            			response: response
            		};
            	},
            
            	getField: function (data, path) {
            		var steps = path.split('.');
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	getIds: function () {
            		var result = this.request('v1/operator/raft/configuration');
            
            		if (typeof result.response !== 'object' || result.status != 200) {
            			throw 'Cannot get servers list from Nomad agent API.';
            		}
            
            		return this.getField(result, 'response.Servers')
            			.map(function (srv) {
            				return srv['ID'];
            			});
            	},
            
            	getServers: function () {
            		var ids = this.getIds();
            		result = Nomad.request('v1/agent/members');
            
            		if (typeof result.response !== 'object' || result.status != 200) {
            			throw 'Cannot get servers list from Nomad agent API.';
            		}
            
            		return this.getField(result,'response.Members').filter(function (s) {
            			return ids.indexOf(s.Tags.id) >= 0;
            		});
            
            	},
            };
            
            try {
            	Nomad.setParams(JSON.parse(value));
            
            	var servers = Nomad.getServers();
            
            	return JSON.stringify(servers);
            
            }
            catch (error) {
            	error += ((String(error).endsWith('.')) ? '' : '.');
            	Zabbix.log(3, '[ Nomad ] ERROR: ' + error);
            
            	return JSON.stringify({ error: error + ' Check debug log for more information.' });
            }
          description: 'Nomad servers data in raw format.'
          timeout: '{$NOMAD.DATA.TIMEOUT}'
          parameters:
            - name: api_endpoint
              value: '{$NOMAD.ENDPOINT.API.URL}'
            - name: http_proxy
              value: '{$NOMAD.HTTP.PROXY}'
            - name: token
              value: '{$NOMAD.TOKEN}'
          tags:
            - tag: component
              value: raw
        - uuid: 904e226008324cb8aa11f716e0420b51
          name: 'Nomad servers count'
          type: DEPENDENT
          key: nomad.servers.count
          description: 'Nomad servers count.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.Name)].length()'
          master_item:
            key: nomad.server.nodes.get
          tags:
            - tag: component
              value: environment
      discovery_rules:
        - uuid: 0ba167e5638344ab842224df5b8909e1
          name: 'Clients discovery'
          type: DEPENDENT
          key: nomad.clients.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#CLIENT.DC}'
                value: '{$NOMAD.CLIENT.DC.MATCHES}'
              - macro: '{#CLIENT.DC}'
                value: '{$NOMAD.CLIENT.DC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#CLIENT.NAME}'
                value: '{$NOMAD.CLIENT.NAME.MATCHES}'
              - macro: '{#CLIENT.NAME}'
                value: '{$NOMAD.CLIENT.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#CLIENT.SCHEDULE.ELIGIBILITY}'
                value: '{$NOMAD.CLIENT.SCHEDULE.ELIGIBILITY.MATCHES}'
              - macro: '{#CLIENT.SCHEDULE.ELIGIBILITY}'
                value: '{$NOMAD.CLIENT.SCHEDULE.ELIGIBILITY.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Client nodes discovery.'
          host_prototypes:
            - uuid: 8284dcf3055749d3b27720526c665e34
              host: '{#CLIENT.ID}'
              name: '{#CLIENT.NAME}-client'
              group_links:
                - group:
                    name: Applications
              templates:
                - name: 'HashiCorp Nomad Client by HTTP'
              tags:
                - tag: class
                  value: '{#CLIENT.CLASS}'
                - tag: dc
                  value: '{#CLIENT.DC}'
                - tag: drained
                  value: '{#CLIENT.DRAIN.STATE}'
                - tag: os
                  value: '{#CLIENT.OS}'
                - tag: scheduling
                  value: '{#CLIENT.SCHEDULE.ELIGIBILITY}'
                - tag: service
                  value: nomad-client
                - tag: version
                  value: '{#CLIENT.VERSION}'
              custom_interfaces: 'YES'
              interfaces:
                - ip: '{#CLIENT.IP}'
          master_item:
            key: nomad.client.nodes.get
          lld_macro_paths:
            - lld_macro: '{#CLIENT.CLASS}'
              path: $.NodeClass
            - lld_macro: '{#CLIENT.DC}'
              path: $.Datacenter
            - lld_macro: '{#CLIENT.DRAIN.STATE}'
              path: $.Drain
            - lld_macro: '{#CLIENT.ID}'
              path: $.ID
            - lld_macro: '{#CLIENT.IP}'
              path: $.Address
            - lld_macro: '{#CLIENT.NAME}'
              path: $.Name
            - lld_macro: '{#CLIENT.OS}'
              path: '$.Attributes[''os.name'']'
            - lld_macro: '{#CLIENT.SCHEDULE.ELIGIBILITY}'
              path: $.SchedulingEligibility
            - lld_macro: '{#CLIENT.VERSION}'
              path: $.Version
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.body
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 202ee1d0060d48b09a48fe2039d3b081
          name: 'Servers discovery'
          type: DEPENDENT
          key: nomad.servers.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#SERVER.DC}'
                value: '{$NOMAD.SERVER.DC.MATCHES}'
              - macro: '{#SERVER.DC}'
                value: '{$NOMAD.SERVER.DC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#SERVER.NAME}'
                value: '{$NOMAD.SERVER.NAME.MATCHES}'
              - macro: '{#SERVER.NAME}'
                value: '{$NOMAD.SERVER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Server nodes discovery.'
          host_prototypes:
            - uuid: addb1ce7995f44089a13128052171445
              host: '{#SERVER.ID}'
              name: '{#SERVER.NAME}'
              group_links:
                - group:
                    name: Applications
              templates:
                - name: 'HashiCorp Nomad Server by HTTP'
              tags:
                - tag: dc
                  value: '{#SERVER.DC}'
                - tag: region
                  value: '{#SERVER.REGION}'
                - tag: role
                  value: '{#SERVER.ROLE}'
                - tag: service
                  value: nomad-server
                - tag: version
                  value: '{#SERVER.VERSION}'
              custom_interfaces: 'YES'
              interfaces:
                - ip: '{#SERVER.IP}'
          master_item:
            key: nomad.server.nodes.get
          lld_macro_paths:
            - lld_macro: '{#SERVER.DC}'
              path: $.Tags.dc
            - lld_macro: '{#SERVER.ID}'
              path: $.Tags.id
            - lld_macro: '{#SERVER.IP}'
              path: $.Addr
            - lld_macro: '{#SERVER.NAME}'
              path: $.Name
            - lld_macro: '{#SERVER.REGION}'
              path: $.Tags.region
            - lld_macro: '{#SERVER.ROLE}'
              path: $.Tags.role
            - lld_macro: '{#SERVER.VERSION}'
              path: $.Tags.build
          preprocessing:
            - type: CHECK_JSON_ERROR
              parameters:
                - $.error
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: containers
        - tag: subclass
          value: deploy
        - tag: subclass
          value: development
        - tag: target
          value: nomad
      macros:
        - macro: '{$NOMAD.API.RESPONSE.SUCCESS}'
          value: '200'
          description: 'HTTP API successful response code. Availability triggers threshold. Change, if needed.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'API success code'
            description: 'HTTP API successful response code. Availability triggers threshold. Change, if needed.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.CLIENT.DC.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad clients by datacenter belonging.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Clients by datacenter (include)'
            description: 'The filter to include HashiCorp Nomad clients by datacenter belonging.'
        - macro: '{$NOMAD.CLIENT.DC.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad clients by datacenter belonging.'
          config:
            type: TEXT
            priority: '13'
            section_name: Filters
            label: 'Clients by datacenter (exclude)'
            description: 'The filter to exclude HashiCorp Nomad clients by datacenter belonging.'
        - macro: '{$NOMAD.CLIENT.NAME.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad clients by name.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Clients by name (include)'
            description: 'The filter to include HashiCorp Nomad clients by name.'
        - macro: '{$NOMAD.CLIENT.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad clients by name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Clients by name (exclude)'
            description: 'The filter to exclude HashiCorp Nomad clients by name.'
        - macro: '{$NOMAD.CLIENT.SCHEDULE.ELIGIBILITY.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad clients by scheduling eligibility.'
          config:
            type: TEXT
            priority: '14'
            section_name: Filters
            label: 'Clients by scheduling eligibility (include)'
            description: 'The filter to include HashiCorp Nomad clients by scheduling eligibility.'
        - macro: '{$NOMAD.CLIENT.SCHEDULE.ELIGIBILITY.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad clients by scheduling eligibility.'
          config:
            type: TEXT
            priority: '15'
            section_name: Filters
            label: 'Clients by scheduling eligibility (exclude)'
            description: 'The filter to exclude HashiCorp Nomad clients by scheduling eligibility.'
        - macro: '{$NOMAD.DATA.TIMEOUT}'
          value: 15s
          description: 'Response timeout for an API.'
          config:
            type: TEXT
            priority: '3'
            section_name: Other
            label: 'API response timeout'
        - macro: '{$NOMAD.ENDPOINT.API.URL}'
          value: 'http://localhost:4646'
          description: 'API endpoint URL for one of the Nomad cluster members.'
          config:
            type: TEXT
            priority: '1'
            label: 'API endpoint URL'
            description: 'API endpoint URL for one of the Nomad cluster members.'
            required: 'YES'
        - macro: '{$NOMAD.HTTP.PROXY}'
          description: 'Sets the HTTP proxy for script and HTTP agent items. If this parameter is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'HTTP proxy'
            description: 'Sets the HTTP proxy for script and HTTP agent items. If this parameter is empty, then no proxy is used.'
        - macro: '{$NOMAD.SERVER.DC.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad servers by datacenter belonging.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Servers by datacenter (include)'
            description: 'The filter to include HashiCorp Nomad servers by datacenter belonging.'
        - macro: '{$NOMAD.SERVER.DC.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad servers by datacenter belonging.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Servers by datacenter (exclude)'
            description: 'The filter to exclude HashiCorp Nomad servers by datacenter belonging.'
        - macro: '{$NOMAD.SERVER.NAME.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad servers by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Servers by name (include)'
            description: 'The filter to include HashiCorp Nomad servers by name.'
        - macro: '{$NOMAD.SERVER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad servers by name.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Servers by name (exclude)'
            description: 'The filter to exclude HashiCorp Nomad servers by name.'
        - macro: '{$NOMAD.TOKEN}'
          description: 'Nomad authentication token.'
          config:
            type: TEXT
            priority: '2'
            label: 'Authentication token'
            required: 'YES'
      dashboards:
        - uuid: 0b1cb124081f4cf1af2e35245aeb415f
          name: 'Region resources'
          pages:
            - name: 'Region resources'
              widgets:
                - type: item
                  name: Region
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad by HTTP'
                        key: nomad.region
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  name: Servers
                  x: '24'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad by HTTP'
                        key: nomad.servers.count
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  name: Clients
                  x: '48'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad by HTTP'
                        key: nomad.clients.count
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
    - uuid: 44eac6a1abe34999b85ad6d0e40073fd
      template: 'HashiCorp Nomad Client by HTTP'
      name: 'HashiCorp Nomad Client by HTTP'
      description: |
        Get HashiCorp Nomad client metrics by HTTP from metrics endpoint.
        
        More information about metrics is available in the official documentation: https://developer.hashicorp.com/nomad/docs/operations/metrics-reference.
        
        You can discuss this template or leave feedback on our forum: https://www.zabbix.com/forum/zabbix-suggestions-and-feedback.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed to monitor HashiCorp Nomad clients by Zabbix.
        It works without any external scripts.
        
        ## Setup
        
        1. Enable telemetry in HashiCorp Nomad agent configuration file. Set the Prometheus metrics format.
        >Refer to the [`vendor documentation`](https://developer.hashicorp.com/nomad/docs/configuration/telemetry).
        2. Prepare an ACL token with `node:read`, `namespace:read-job` permissions applied. Define the `{$NOMAD.TOKEN}` host wizard configuration field value.
        > Refer to the vendor documentation about [`Nomad native ACL`](https://developer.hashicorp.com/nomad/tutorials/access-control/access-control-policies) or [`Nomad Vault-generated tokens`](https://developer.hashicorp.com/nomad/tutorials/access-control/vault-nomad-secrets) if you're using integration with HashiCorp Vault.
        3. Set the values for the `Nomad API scheme` and `Nomad API port` host wizard configuration fields to define the common Nomad API web schema and connection port.
        
        **Additional information**:
        
        * You have to prepare an additional ACL token only if you wish to monitor Nomad clients as separate entities. If you're using clients discovery - token will be inherited from the master host linked to the HashiCorp Nomad by HTTP template.
        
        * If you're not using ACL - skip 2nd setup step.
        
        * The Nomad clients use the default web schema - `HTTP` and default API port - `4646`. If you're using clients discovery and you need to re-define macros for the particular host created from prototype, use the context macros like {{$NOMAD.CLIENT.API.SCHEME:`NECESSARY.IP`}} or/and {{$NOMAD.CLIENT.API.PORT:`NECESSARY.IP`}} on master host or template level.
        * Some metrics may not be collected depending on your HashiCorp Nomad agent version and configuration.
        
        **Useful links**:
        
        * [HashiCorp Nomad metrics list](https://developer.hashicorp.com/nomad/docs/operations/metrics-reference)
        * [HashiCorp Nomad telemetry configuration reference](https://developer.hashicorp.com/nomad/docs/configuration/telemetry)
        * [HashiCorp Nomad metrics API reference](https://developer.hashicorp.com/nomad/api-docs/metrics)
        * [HashiCorp Nomad nodes API reference](https://developer.hashicorp.com/nomad/api-docs/nodes)
        * [HashiCorp Nomad allocations API reference](https://developer.hashicorp.com/nomad/api-docs/allocations)
        * [Zabbix user macros with context](https://www.zabbix.com/documentation/8.0/manual/config/macros/user_macros_context)
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: f98bd789c9f7409aac2e1902776ddc21
          name: 'Service [rpc] state'
          type: SIMPLE
          key: 'net.tcp.service[tcp,,{$NOMAD.CLIENT.RPC.PORT}]'
          description: 'Current [rpc] service state.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: f368ff4de45e4620963135836eb54092
              expression: 'last(/HashiCorp Nomad Client by HTTP/net.tcp.service[tcp,,{$NOMAD.CLIENT.RPC.PORT}]) = 0'
              name: 'HashiCorp Nomad Client: Service [rpc] is down'
              opdata: 'Service: rpc, Port: {$NOMAD.CLIENT.RPC.PORT}, State: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: |
                Cannot establish the connection to [rpc] service port {$NOMAD.CLIENT.RPC.PORT}.
                Check the Nomad state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 00b39edd70cc42daa565879494f15f38
          name: 'Service [serf] state'
          type: SIMPLE
          key: 'net.tcp.service[tcp,,{$NOMAD.CLIENT.SERF.PORT}]'
          description: 'Current [serf] service state.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 0108c9f85b48433c8b9864e41458994f
              expression: 'last(/HashiCorp Nomad Client by HTTP/net.tcp.service[tcp,,{$NOMAD.CLIENT.SERF.PORT}]) = 0'
              name: 'HashiCorp Nomad Client: Service [serf] is down'
              opdata: 'Service: serf, Port: {$NOMAD.CLIENT.SERF.PORT}, State: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: |
                Cannot establish the connection to [serf] service port {$NOMAD.CLIENT.SERF.PORT}.
                Check the Nomad state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 13aa2136b7634c32a56fe00b29056d2d
          name: 'CPU allocated'
          type: DEPENDENT
          key: nomad.client.allocated.cpu
          units: '!Mhz'
          description: 'Total amount of CPU shares the scheduler has allocated to tasks.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocated_cpu
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: cpu
        - uuid: fb7211ae27c845bba8dca7e75e0083b8
          name: 'Disk allocated'
          type: DEPENDENT
          key: nomad.client.allocated.disk
          units: B
          description: 'Total amount of disk space the scheduler has allocated to tasks.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocated_disk
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1000000'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: storage
        - uuid: 27c71fbb37f14deba301c3b5c7daecb5
          name: 'Memory allocated'
          type: DEPENDENT
          key: nomad.client.allocated.memory
          units: B
          description: 'Total amount of memory the scheduler has allocated to tasks.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocated_memory
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1000000'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: 945d348f2f2d4c02b3a1ec6f32f1290d
          name: 'Allocations blocked'
          type: DEPENDENT
          key: nomad.client.allocations.blocked
          description: 'Number of allocations waiting for previous versions.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocations_blocked
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: f556557bf5de438d9aaf941ab5c8d93b
          name: 'Allocations completed, rate'
          type: DEPENDENT
          key: nomad.client.allocations.complete
          description: 'Number of allocations completed.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocs_complete
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: CHANGE_PER_SECOND
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: 586bc8f63e7f46cf99337c7f70809c43
          name: 'Allocations failed, rate'
          type: DEPENDENT
          key: nomad.client.allocations.failed
          description: 'Number of allocations failed.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocs_failed
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: CHANGE_PER_SECOND
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: 88b2eb8e9e8041df83674d3800b1f8c1
          name: 'Allocations migrating'
          type: DEPENDENT
          key: nomad.client.allocations.migrating
          description: 'Number of allocations migrating data from previous versions.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocations_migrating
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: 717172608fbb4d81bfb65e7f4aa4aaf3
          name: 'Allocations OOM killed'
          type: DEPENDENT
          key: nomad.client.allocations.oom_killed
          description: 'Number of allocations OOM killed.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocs_oom_killed
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
          triggers:
            - uuid: 747de32c46cb4d95851cee8a30c576b0
              expression: 'last(/HashiCorp Nomad Client by HTTP/nomad.client.allocations.oom_killed) > 0'
              name: 'HashiCorp Nomad Client: OOM killed allocations found'
              opdata: 'OOM killed: {ITEM.LASTVALUE}'
              priority: WARNING
              description: 'OOM killed allocations found.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: performance
        - uuid: 9fc77ab432c04cf4b1c0f1941da641d3
          name: 'Allocations pending'
          type: DEPENDENT
          key: nomad.client.allocations.pending
          description: 'Number of allocations pending (received by the client but not yet running).'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocations_pending
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: eae33da538c642868cf9afe9e6495c95
          name: 'Allocations restarted, rate'
          type: DEPENDENT
          key: nomad.client.allocations.restart
          description: 'Number of allocations restarted.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocs_restart
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: CHANGE_PER_SECOND
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: 6a4903e8bfa04f18a44813349ea6b33d
          name: 'Allocations running'
          type: DEPENDENT
          key: nomad.client.allocations.running
          description: 'Number of allocations running.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocations_running
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: 3fcbebb8436d4dec8db6625e44520999
          name: 'Allocations starting'
          type: DEPENDENT
          key: nomad.client.allocations.start
          description: 'Number of allocations starting.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocations_start
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: 166aad9bafeb478abcd8c61ea1d0cc98
          name: 'Allocations terminal'
          type: DEPENDENT
          key: nomad.client.allocations.terminal
          description: 'Number of allocations terminal.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_allocations_terminal
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: 31faeb4af30f4f878050eca21e6f97df
          name: 'CPU idle utilization'
          type: DEPENDENT
          key: nomad.client.cpu.idle
          value_type: FLOAT
          units: '%'
          description: 'CPU utilization in idle state.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_host_cpu_idle
                - function
                - avg
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: cpu
        - uuid: ad75d4b5e69c4e11bc886582791951be
          name: 'CPU system utilization'
          type: DEPENDENT
          key: nomad.client.cpu.system
          value_type: FLOAT
          units: '%'
          description: 'CPU utilization in system space.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_host_cpu_system
                - function
                - avg
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: cpu
        - uuid: 71eb3676049a4d60aa69ef3901005894
          name: 'CPU total utilization'
          type: DEPENDENT
          key: nomad.client.cpu.total
          value_type: FLOAT
          units: '%'
          description: 'Total CPU utilization.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_host_cpu_total
                - function
                - avg
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 59db4f1d22cb48fab0ced8ad9ec39a25
              expression: 'min(/HashiCorp Nomad Client by HTTP/nomad.client.cpu.total, 10m) >= {$NOMAD.CPU.UTIL.MIN}'
              name: 'HashiCorp Nomad Client: High CPU utilization'
              event_name: 'HashiCorp Nomad Client: High CPU utilization: (over >= {$NOMAD.CPU.UTIL.MIN}% over last 10m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: cc0671cc71fb4bdd8cdf7a959e1022fd
          name: 'CPU user utilization'
          type: DEPENDENT
          key: nomad.client.cpu.user
          value_type: FLOAT
          units: '%'
          description: 'CPU utilization in user space.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_host_cpu_user
                - function
                - avg
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: cpu
        - uuid: 71be24cf848a448dbb993a577015bd9e
          name: 'Monitoring API response'
          type: DEPENDENT
          key: nomad.client.data.api.response
          value_type: TEXT
          description: 'Monitoring API response message.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var response = Object.keys(JSON.parse(value).header).filter(function (f) {
                  		return f.match(/HTTP\/[\d.]+\s+\d{3}/);
                  	});
                  
                  	return response.pop();
                  }
                  catch (error) {
                  	return "HTTP/1.1 408 Request timeout";
                  }
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.client.data.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 676e1535cde2424cbda78f18cd9084bf
              expression: 'find(/HashiCorp Nomad Client by HTTP/nomad.client.data.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              name: 'HashiCorp Nomad Client: Monitoring API connection has failed'
              event_name: 'HashiCorp Nomad Client: Monitoring API connection has failed. HTTP response code: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+(\d{3})", \1")}. Response message: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+\d{3}\s+(.*)", \1")}'
              priority: AVERAGE
              description: |
                Monitoring API connection has failed.
                Ensure that Nomad API URL and the necessary permissions have been defined correctly, check the service state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: fe07fd88f3e14273b3f0b135aab26236
          name: 'Telemetry get'
          type: HTTP_AGENT
          key: nomad.client.data.get
          history: '0'
          value_type: TEXT
          description: 'Telemetry data in raw format.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"header":{"HTTP/1.1 408 Request timeout":""}}'
          timeout: '{$NOMAD.DATA.TIMEOUT}'
          url: '{$NOMAD.CLIENT.API.SCHEME}://{HOST.IP}:{$NOMAD.CLIENT.API.PORT}/v1/metrics'
          query_fields:
            - name: format
              value: prometheus
          status_codes: ''
          http_proxy: '{$NOMAD.HTTP.PROXY}'
          headers:
            - name: X-Nomad-Token
              value: '{$NOMAD.TOKEN}'
          retrieve_mode: BOTH
          output_format: JSON
          tags:
            - tag: component
              value: raw
        - uuid: c9bfa74720ea4e228e5d200ab1f38074
          name: 'Allocations API response'
          type: DEPENDENT
          key: nomad.client.job.allocs.api.response
          value_type: TEXT
          description: 'Allocations API response message.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var response = Object.keys(JSON.parse(value).header).filter(function (f) {
                  		return f.match(/HTTP\/[\d.]+\s+\d{3}/);
                  	});
                  
                  	return response.pop();
                  }
                  catch (error) {
                  	return "HTTP/1.1 408 Request timeout";
                  }
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.client.job.allocs.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 300f5fba0f45465aa6868a3f1d16633d
              expression: 'find(/HashiCorp Nomad Client by HTTP/nomad.client.job.allocs.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              name: 'HashiCorp Nomad Client: Allocations API connection has failed'
              event_name: 'HashiCorp Nomad Client: Allocations API connection has failed. HTTP response code: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+(\d{3})", \1")}. Response message: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+\d{3}\s+(.*)", \1")}'
              priority: AVERAGE
              description: |
                Allocations API connection has failed.
                Ensure that Nomad API URL and the necessary permissions have been defined correctly, check the service state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              dependencies:
                - name: 'HashiCorp Nomad Client: Monitoring API connection has failed'
                  expression: 'find(/HashiCorp Nomad Client by HTTP/nomad.client.data.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              tags:
                - tag: scope
                  value: availability
        - uuid: 9948608c5b3a4dad9d1b433483296427
          name: 'Allocated jobs get'
          type: HTTP_AGENT
          key: nomad.client.job.allocs.get
          delay: 1h
          history: '0'
          value_type: TEXT
          description: 'Allocated jobs data in raw format.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"header":{"HTTP/1.1 408 Request timeout":""}}'
          timeout: '{$NOMAD.DATA.TIMEOUT}'
          url: '{$NOMAD.CLIENT.API.SCHEME}://{HOST.IP}:{$NOMAD.CLIENT.API.PORT}/v1/allocations'
          query_fields:
            - name: reverse
              value: 'true'
            - name: task_states
              value: 'false'
            - name: filter
              value: 'NodeID == "{HOST.HOST}" and DesiredStatus == "run" and ClientStatus == "running"'
          status_codes: ''
          http_proxy: '{$NOMAD.HTTP.PROXY}'
          headers:
            - name: X-Nomad-Token
              value: '{$NOMAD.TOKEN}'
          retrieve_mode: BOTH
          output_format: JSON
          tags:
            - tag: component
              value: raw
        - uuid: f312a5ba5758426d83c5c3c414d765fd
          name: 'Memory available'
          type: DEPENDENT
          key: nomad.client.memory.available
          value_type: FLOAT
          units: B
          description: 'Total amount of memory available to processes which includes free and cached memory.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_host_memory_available
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: e379e923ed6b45a682f1da192b3a328d
          name: 'Memory free'
          type: DEPENDENT
          key: nomad.client.memory.free
          value_type: FLOAT
          units: B
          description: 'Amount of memory which is free.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_host_memory_free
                - value
                - ''
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: 50d152cf3c654e818aa7303841d5444a
          name: 'Memory size'
          type: DEPENDENT
          key: nomad.client.memory.total
          value_type: FLOAT
          units: B
          description: 'Total amount of physical memory on the node.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_host_memory_total
                - value
                - ''
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: b2638e0b928e46cd825304a3f1ca1682
          name: 'Memory used'
          type: DEPENDENT
          key: nomad.client.memory.used
          value_type: FLOAT
          units: B
          description: 'Amount of memory used by processes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_host_memory_used
                - value
                - ''
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: 933621a61d2241d084b48ec6b3bd5b74
          name: Metrics
          type: DEPENDENT
          key: nomad.client.metrics.get
          history: '0'
          value_type: TEXT
          description: 'Nomad client metrics in raw format.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.body
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.client.data.get
          tags:
            - tag: component
              value: raw
        - uuid: 39430d6dceaa42a68c72ef68f67b1a12
          name: 'Nodes API response'
          type: DEPENDENT
          key: nomad.client.node.info.api.response
          value_type: TEXT
          description: 'Nodes API response message.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var response = Object.keys(JSON.parse(value).header).filter(function (f) {
                  		return f.match(/HTTP\/[\d.]+\s+\d{3}/);
                  	});
                  
                  	return response.pop();
                  }
                  catch (error) {
                  	return "HTTP/1.1 408 Request timeout";
                  }
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.client.node.info.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 3ea14e12d6154492a4505c4b51003ed3
              expression: 'find(/HashiCorp Nomad Client by HTTP/nomad.client.node.info.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              name: 'HashiCorp Nomad Client: Nodes API connection has failed'
              event_name: 'HashiCorp Nomad Client: Nodes API connection has failed. HTTP response code: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+(\d{3})", \1")}. Response message: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+\d{3}\s+(.*)", \1")}'
              priority: AVERAGE
              description: |
                Nodes API connection has failed.
                Ensure that Nomad API URL and the necessary permissions have been defined correctly, check the service state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              dependencies:
                - name: 'HashiCorp Nomad Client: Monitoring API connection has failed'
                  expression: 'find(/HashiCorp Nomad Client by HTTP/nomad.client.data.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              tags:
                - tag: scope
                  value: availability
        - uuid: 36eb68c80b194a4591208cf210fb6d6e
          name: 'Node info get'
          type: HTTP_AGENT
          key: nomad.client.node.info.get
          delay: 1h
          history: '0'
          value_type: TEXT
          description: 'Node info data in raw format.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"header":{"HTTP/1.1 408 Request timeout":""}}'
          timeout: '{$NOMAD.DATA.TIMEOUT}'
          url: '{$NOMAD.CLIENT.API.SCHEME}://{HOST.IP}:{$NOMAD.CLIENT.API.PORT}/v1/nodes'
          query_fields:
            - name: filter
              value: 'ID == "{HOST.HOST}"'
          status_codes: ''
          http_proxy: '{$NOMAD.HTTP.PROXY}'
          headers:
            - name: X-Nomad-Token
              value: '{$NOMAD.TOKEN}'
          retrieve_mode: BOTH
          output_format: JSON
          tags:
            - tag: component
              value: raw
        - uuid: 18e57950b0c041e0a2abc0dbd0644b33
          name: 'CPU unallocated'
          type: DEPENDENT
          key: nomad.client.unallocated.cpu
          units: '!Mhz'
          description: 'Total amount of CPU shares free for the scheduler to allocate to tasks.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_unallocated_cpu
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: cpu
        - uuid: 44619e3740a9403581d54c6555ecd967
          name: 'Disk unallocated'
          type: DEPENDENT
          key: nomad.client.unallocated.disk
          units: B
          description: 'Total amount of disk space free for the scheduler to allocate to tasks.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_unallocated_disk
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1000000'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: storage
        - uuid: bc0928fcff2f458f83874d7442274e61
          name: 'Memory unallocated'
          type: DEPENDENT
          key: nomad.client.unallocated.memory
          units: B
          description: 'Total amount of memory free for the scheduler to allocate to tasks.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_unallocated_memory
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1000000'
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: 3561fb69284f4c88a7f5d8c7f04c3b14
          name: Uptime
          type: DEPENDENT
          key: nomad.client.uptime
          units: uptime
          description: 'Uptime of the host running the Nomad client.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_client_uptime
                - value
                - ''
          master_item:
            key: nomad.client.metrics.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 74fe77871e8c4161b5944f30dd4d1c84
              expression: 'last(/HashiCorp Nomad Client by HTTP/nomad.client.uptime) < 10m'
              name: 'HashiCorp Nomad Client: The host has been restarted'
              event_name: 'HashiCorp Nomad Client: The host has been restarted: (uptime < 10m)'
              priority: WARNING
              description: 'The host uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 872961bd507c4f6380168d2284ead1ae
          name: 'Nomad client version'
          type: DEPENDENT
          key: nomad.client.version
          value_type: CHAR
          description: 'Nomad client version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.body..Version.first()
          master_item:
            key: nomad.client.node.info.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: afac97bced6f49bc994ae633b662722c
              expression: 'change(/HashiCorp Nomad Client by HTTP/nomad.client.version)<>0'
              name: 'HashiCorp Nomad Client: Nomad client version has changed'
              event_name: 'HashiCorp Nomad Client: Nomad client version has changed to {ITEM.LASTVALUE}'
              priority: INFO
              description: 'Nomad client version has changed.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: c41a6405aea7400fb90c207ce95c6594
          name: 'Allocated jobs discovery'
          type: DEPENDENT
          key: nomad.client.alloc.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#JOB.NAME}'
                value: '{$NOMAD.JOB.NAME.MATCHES}'
              - macro: '{#JOB.NAME}'
                value: '{$NOMAD.JOB.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#JOB.NAMESPACE}'
                value: '{$NOMAD.JOB.NAMESPACE.MATCHES}'
              - macro: '{#JOB.NAMESPACE}'
                value: '{$NOMAD.JOB.NAMESPACE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#JOB.TASK.GROUP}'
                value: '{$NOMAD.JOB.TASK.GROUP.MATCHES}'
              - macro: '{#JOB.TASK.GROUP}'
                value: '{$NOMAD.JOB.TASK.GROUP.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#JOB.TYPE}'
                value: '{$NOMAD.JOB.TYPE.MATCHES}'
              - macro: '{#JOB.TYPE}'
                value: '{$NOMAD.JOB.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          lifetime: '0'
          description: 'Allocated jobs discovery.'
          item_prototypes:
            - uuid: ba9e5a022dbc4f7aa28a1db2ef6d73bb
              name: 'Job ["{#JOB.NAME}"] CPU allocated'
              type: DEPENDENT
              key: 'nomad.client.allocs.cpu.allocated["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: '!Mhz'
              description: 'Total CPU resources allocated by the ["{#JOB.NAME}"] job across all cores.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_cpu_allocated{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: job
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: 85daa0ce6d4f41ab83a3a65ceb8359a9
              name: 'Job ["{#JOB.NAME}"] CPU system utilization'
              type: DEPENDENT
              key: 'nomad.client.allocs.cpu.system["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: '%'
              description: 'Total CPU resources consumed by the ["{#JOB.NAME}"] job in system space.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_cpu_system{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: job
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: d5ec55f8d9a74c99924a01acb206295e
              name: 'Job ["{#JOB.NAME}"] CPU throttled periods time'
              type: DEPENDENT
              key: 'nomad.client.allocs.cpu.throttled_periods["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: s
              description: 'Total number of CPU periods that the ["{#JOB.NAME}"] job was throttled.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_cpu_throttled_periods{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
                - type: MULTIPLIER
                  parameters:
                    - '1.0E-9'
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: job
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: 3122f6d0c1b24ea7bac7a3af4fc00fb2
              name: 'Job ["{#JOB.NAME}"] CPU throttled time'
              type: DEPENDENT
              key: 'nomad.client.allocs.cpu.throttled_time["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: s
              description: 'Total time that the ["{#JOB.NAME}"] job was throttled.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_cpu_throttled_time{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '1.0E-9'
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: job
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: 5ff1ea02768243f4971339bf70f89772
              name: 'Job ["{#JOB.NAME}"] CPU total utilization'
              type: DEPENDENT
              key: 'nomad.client.allocs.cpu.total_percent["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: '%'
              description: 'Total CPU resources consumed by the ["{#JOB.NAME}"] job across all cores.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_cpu_total_percent{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: job
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: 14179529be9d47bc898a5330ff37a9c5
              name: 'Job ["{#JOB.NAME}"] CPU ticks'
              type: DEPENDENT
              key: 'nomad.client.allocs.cpu.total_ticks["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              description: 'CPU ticks consumed by the process for the ["{#JOB.NAME}"] job in the last collection interval.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_cpu_total_ticks{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: job
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: 9fb3e3b461874e86aee9483d5af65535
              name: 'Job ["{#JOB.NAME}"] CPU user utilization'
              type: DEPENDENT
              key: 'nomad.client.allocs.cpu.user["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: '%'
              description: 'Total CPU resources consumed by the ["{#JOB.NAME}"] job in user space.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_cpu_user{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: job
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: c353af0be02b47faa27036dfdd173176
              name: 'Job ["{#JOB.NAME}"] Memory allocated'
              type: DEPENDENT
              key: 'nomad.client.allocs.memory.allocated["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: B
              description: 'Amount of memory allocated by the ["{#JOB.NAME}"] job.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_memory_allocated{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: job
                - tag: component
                  value: memory
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: 7bd7a486864b4d0f82242676da2370ed
              name: 'Job ["{#JOB.NAME}"] Memory cached'
              type: DEPENDENT
              key: 'nomad.client.allocs.memory.cache["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: B
              description: 'Amount of memory cached by the ["{#JOB.NAME}"] job.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_memory_cache{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: job
                - tag: component
                  value: memory
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: b1419d5017cf4f8ba23e8c774c451772
              name: 'Job ["{#JOB.NAME}"] Memory swapped'
              type: DEPENDENT
              key: 'nomad.client.allocs.memory.swap["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: B
              description: 'Amount of memory swapped by the ["{#JOB.NAME}"] job.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_memory_swap{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: job
                - tag: component
                  value: memory
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
            - uuid: 09ba4987f69c496ebeab3fb08f4b499b
              name: 'Job ["{#JOB.NAME}"] Memory used'
              type: DEPENDENT
              key: 'nomad.client.allocs.memory.usage["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
              value_type: FLOAT
              units: B
              description: 'Total amount of memory used by the ["{#JOB.NAME}"] job.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_allocs_memory_usage{job="{#JOB.NAME}",task_group="{#JOB.TASK.GROUP}",namespace="{#JOB.NAMESPACE}"}'
                    - function
                    - avg
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: job
                - tag: component
                  value: memory
                - tag: job
                  value: '{#JOB.NAME}'
                - tag: namespace
                  value: '{#JOB.NAMESPACE}'
                - tag: task-group
                  value: '{#JOB.TASK.GROUP}'
          graph_prototypes:
            - uuid: 2c82c2841f414986b26fc6890707d36d
              name: 'HashiCorp Nomad Client: Job ["{#JOB.NAME}"] task ["{#JOB.TASK.GROUP}"] namespace ["{#JOB.NAMESPACE}"] memory utilization'
              type: STACKED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.allocs.memory.allocated["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.allocs.memory.cache["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.allocs.memory.swap["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.allocs.memory.usage["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
            - uuid: bb8bbdb0180f4b35800144deec4456bb
              name: 'HashiCorp Nomad Client: Job [{#JOB.NAME}] task ["{#JOB.TASK.GROUP}"] namespace ["{#JOB.NAMESPACE}"] CPU throttling'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.allocs.cpu.throttled_time["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.allocs.cpu.throttled_periods["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
            - uuid: f25a5178570e44ecac6a48cb8351cdd3
              name: 'HashiCorp Nomad Client: Job [{#JOB.NAME}] task ["{#JOB.TASK.GROUP}"] namespace ["{#JOB.NAMESPACE}"] CPU utilization'
              type: STACKED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.allocs.cpu.system["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.allocs.cpu.total_percent["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.allocs.cpu.user["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
          master_item:
            key: nomad.client.job.allocs.get
          lld_macro_paths:
            - lld_macro: '{#JOB.NAMESPACE}'
              path: $.Namespace
            - lld_macro: '{#JOB.NAME}'
              path: $.JobID
            - lld_macro: '{#JOB.TASK.GROUP}'
              path: $.TaskGroup
            - lld_macro: '{#JOB.TYPE}'
              path: $.JobType
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var raw = JSON.parse(value),
                  	body = raw.body,
                  	exist_key = [],
                  	result = [];
                  
                  function getField(data, path) {
                  	var steps = path.split('.');
                  	for (var i = 0; i < steps.length; i++) {
                  		var step = steps[i];
                  		if (typeof data !== 'object' || typeof data[step] === 'undefined') {
                  			throw 'Required field "' + path + '" is not present in data received.';
                  		}
                  		data = data[step];
                  	}
                  	return data;
                  }
                  
                  for (i in body) {
                  	var uniq_element = true;
                  
                  	for (key in exist_key) {
                  		if ((exist_key[key].JobID == getField(body[i], 'JobID')) &&
                  			(exist_key[key].TaskGroup == getField(body[i], 'TaskGroup')) &&
                  			(exist_key[key].Namespace == getField(body[i], 'Namespace'))) {
                  			uniq_element = false;
                  		}
                  	}
                  
                  	if (uniq_element) {
                  		exist_key.push({ 'JobID': body[i].JobID, 'TaskGroup': body[i].TaskGroup, 'Namespace': body[i].Namespace });
                  		result.push(body[i]);
                  	}
                  }
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: e2955bd147ed43cb894f0981c6eb3985
          name: 'Physical disks discovery'
          type: DEPENDENT
          key: nomad.client.disk.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DEV.NAME}'
                value: '{$NOMAD.DISK.NAME.MATCHES}'
              - macro: '{#DEV.NAME}'
                value: '{$NOMAD.DISK.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Physical disks discovery.'
          item_prototypes:
            - uuid: 4a79c99027494bb98b474e6f81db5e18
              name: 'Disk ["{#DEV.NAME}"] space available'
              type: DEPENDENT
              key: 'nomad.client.disk.available["{#DEV.NAME}"]'
              value_type: FLOAT
              units: B
              description: 'Amount of space which is available on ["{#DEV.NAME}"] disk.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_host_disk_available{disk="{#DEV.NAME}"}'
                    - value
                    - ''
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: storage
                - tag: disk
                  value: '{#DEV.NAME}'
            - uuid: 21043b0ed4424e3086a00a567d134d45
              name: 'Disk ["{#DEV.NAME}"] inodes utilization'
              type: DEPENDENT
              key: 'nomad.client.disk.inodes_percent["{#DEV.NAME}"]'
              value_type: FLOAT
              units: '%'
              description: 'Disk space consumed by the inodes on ["{#DEV.NAME}"] disk.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_host_disk_inodes_percent{disk="{#DEV.NAME}"}'
                    - value
                    - ''
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: inodes
                - tag: component
                  value: storage
                - tag: disk
                  value: '{#DEV.NAME}'
              trigger_prototypes:
                - uuid: 433c2227305a4aeb82eb1d390621a81e
                  expression: 'min(/HashiCorp Nomad Client by HTTP/nomad.client.disk.inodes_percent["{#DEV.NAME}"],5m) >= {$NOMAD.INODES.FREE.MIN.CRIT:"{#DEV.NAME}"}'
                  name: 'HashiCorp Nomad Client: Running out of free inodes on [{#DEV.NAME}] device'
                  event_name: 'HashiCorp Nomad Client: Running out of free inodes on [{#DEV.NAME}]  (free < {$NOMAD.INODES.FREE.MIN.CRIT:"{#DEV.NAME}"}%)'
                  opdata: 'Free inodes: {ITEM.VALUE}'
                  priority: AVERAGE
                  description: |
                    It may become impossible to write to a disk if there are no index nodes left.
                    The following error messages may be returned as symptoms, even though the free space:
                    - No space left on device;
                    - Disk is full.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: d0f2aacaada545c4a81d35f0eb454532
                  expression: 'min(/HashiCorp Nomad Client by HTTP/nomad.client.disk.inodes_percent["{#DEV.NAME}"],5m) >= {$NOMAD.INODES.FREE.MIN.WARN:"{#DEV.NAME}"}'
                  name: 'HashiCorp Nomad Client: Running out of free inodes on [{#DEV.NAME}] device'
                  event_name: 'HashiCorp Nomad Client: Running out of free inodes on [{#DEV.NAME}]  (free < {$NOMAD.INODES.FREE.MIN.WARN:"{#DEV.NAME}"}%)'
                  opdata: 'Free inodes: {ITEM.VALUE}'
                  priority: WARNING
                  description: |
                    It may become impossible to write to a disk if there are no index nodes left.
                    The following error messages may be returned as symptoms, even though the free space:
                    - No space left on device;
                    - Disk is full.
                  manual_close: 'YES'
                  dependencies:
                    - name: 'HashiCorp Nomad Client: Running out of free inodes on [{#DEV.NAME}] device'
                      expression: 'min(/HashiCorp Nomad Client by HTTP/nomad.client.disk.inodes_percent["{#DEV.NAME}"],5m) >= {$NOMAD.INODES.FREE.MIN.CRIT:"{#DEV.NAME}"}'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: 4358e8accdd0400496b491cda7edc909
              name: 'Disk ["{#DEV.NAME}"] size'
              type: DEPENDENT
              key: 'nomad.client.disk.size["{#DEV.NAME}"]'
              value_type: FLOAT
              units: B
              description: 'Total size of the ["{#DEV.NAME}"] device.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_host_disk_size{disk="{#DEV.NAME}"}'
                    - value
                    - ''
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: storage
                - tag: disk
                  value: '{#DEV.NAME}'
            - uuid: 778f4609e236434d8b216b62bfebf885
              name: 'Disk ["{#DEV.NAME}"] space used'
              type: DEPENDENT
              key: 'nomad.client.disk.used["{#DEV.NAME}"]'
              value_type: FLOAT
              units: B
              description: 'Amount of disk ["{#DEV.NAME}"] space which has been used.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_host_disk_used{disk="{#DEV.NAME}"}'
                    - value
                    - ''
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: storage
                - tag: disk
                  value: '{#DEV.NAME}'
            - uuid: aec5d7147bd64f508e793d7539a8524b
              name: 'Disk ["{#DEV.NAME}"] space utilization'
              type: DEPENDENT
              key: 'nomad.client.disk.used_percent["{#DEV.NAME}"]'
              value_type: FLOAT
              units: '%'
              description: 'Percentage of disk ["{#DEV.NAME}"] space used.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'nomad_client_host_disk_used_percent{disk="{#DEV.NAME}"}'
                    - value
                    - ''
              master_item:
                key: nomad.client.metrics.get
              tags:
                - tag: component
                  value: storage
                - tag: disk
                  value: '{#DEV.NAME}'
              trigger_prototypes:
                - uuid: b3e22e93d51a4a8d825b0bd2e45fc7a2
                  expression: 'min(/HashiCorp Nomad Client by HTTP/nomad.client.disk.used_percent["{#DEV.NAME}"],5m) >= {$NOMAD.DISK.UTIL.MIN.CRIT:"{#DEV.NAME}"}'
                  name: 'HashiCorp Nomad Client: High disk [{#DEV.NAME}] utilization'
                  event_name: 'HashiCorp Nomad Client: Disk [{#DEV.NAME}] space low (utilization: >= {$NOMAD.DISK.UTIL.MIN.CRIT:"{#DEV.NAME}"}%)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'High disk [{#DEV.NAME}] utilization.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 05c3e6cd711f4a98a21c581a4437ffb5
                  expression: 'min(/HashiCorp Nomad Client by HTTP/nomad.client.disk.used_percent["{#DEV.NAME}"],5m) >= {$NOMAD.DISK.UTIL.MIN.WARN:"{#DEV.NAME}"}'
                  name: 'HashiCorp Nomad Client: High disk [{#DEV.NAME}] utilization'
                  event_name: 'HashiCorp Nomad Client: Disk [{#DEV.NAME}] space low (utilization: >= {$NOMAD.DISK.UTIL.MIN.WARN:"{#DEV.NAME}"}%)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE}'
                  priority: WARNING
                  description: 'High disk [{#DEV.NAME}] utilization.'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'HashiCorp Nomad Client: Running out of free inodes on [{#DEV.NAME}] device'
                      expression: 'min(/HashiCorp Nomad Client by HTTP/nomad.client.disk.inodes_percent["{#DEV.NAME}"],5m) >= {$NOMAD.INODES.FREE.MIN.CRIT:"{#DEV.NAME}"}'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: e29168187396478ebec8c80825da070d
              name: 'HashiCorp Nomad Client: Disk ["{#DEV.NAME}"] usage'
              type: STACKED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.disk.size["{#DEV.NAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.disk.available["{#DEV.NAME}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.disk.used["{#DEV.NAME}"]'
            - uuid: 3b9290be87e94bd5987eb595debe5f26
              name: 'HashiCorp Nomad Client: Disk ["{#DEV.NAME}"] utilization'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.disk.inodes_percent["{#DEV.NAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'HashiCorp Nomad Client by HTTP'
                    key: 'nomad.client.disk.used_percent["{#DEV.NAME}"]'
          master_item:
            key: nomad.client.metrics.get
          lld_macro_paths:
            - lld_macro: '{#DEV.NAME}'
              path: $.labels.disk
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - 'nomad_client_host_disk_available{disk=~".*"}'
        - uuid: cfa76f8c4aaf49c5888ef82d6d7d484d
          name: 'Drivers discovery'
          type: DEPENDENT
          key: nomad.client.drivers.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DRIVER.DETECTED}'
                value: '{$NOMAD.DRIVER.DETECT.MATCHES}'
              - macro: '{#DRIVER.DETECTED}'
                value: '{$NOMAD.DRIVER.DETECT.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#DRIVER.NAME}'
                value: '{$NOMAD.DRIVER.NAME.MATCHES}'
              - macro: '{#DRIVER.NAME}'
                value: '{$NOMAD.DRIVER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Client drivers discovery.'
          item_prototypes:
            - uuid: 6ffea3b88b29451ea6491cbd34a61148
              name: 'Driver [{#DRIVER.NAME}] detection state'
              type: DEPENDENT
              key: 'nomad.client.driver.detected["{#DRIVER.NAME}"]'
              description: 'Driver [{#DRIVER.NAME}] detection state.'
              valuemap:
                name: 'Detection state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.body..Drivers.{#DRIVER.NAME}.Detected.first()'
                - type: BOOL_TO_DECIMAL
              master_item:
                key: nomad.client.node.info.get
              tags:
                - tag: component
                  value: driver
                - tag: detected
                  value: '{#DRIVER.DETECTED}'
                - tag: driver
                  value: '{#DRIVER.NAME}'
              trigger_prototypes:
                - uuid: 576192afab06466f80c95c1b17c1e6fa
                  expression: 'change(/HashiCorp Nomad Client by HTTP/nomad.client.driver.detected["{#DRIVER.NAME}"]) <> 0'
                  name: 'HashiCorp Nomad Client: Driver [{#DRIVER.NAME}] detection state has changed'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: INFO
                  description: 'The [{#DRIVER.NAME}] driver detection state has changed.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: fdff50758360474dafffee8cb7ba6289
              name: 'Driver [{#DRIVER.NAME}] state'
              type: DEPENDENT
              key: 'nomad.client.driver.state["{#DRIVER.NAME}"]'
              description: 'Driver [{#DRIVER.NAME}] state.'
              valuemap:
                name: 'Driver state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.body..Drivers.{#DRIVER.NAME}.Healthy.first()'
                - type: BOOL_TO_DECIMAL
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: nomad.client.node.info.get
              tags:
                - tag: component
                  value: driver
                - tag: detected
                  value: '{#DRIVER.DETECTED}'
                - tag: driver
                  value: '{#DRIVER.NAME}'
          trigger_prototypes:
            - uuid: 5630f8b3585f4f5b8faf4a30d95755b8
              expression: 'last(/HashiCorp Nomad Client by HTTP/nomad.client.driver.state["{#DRIVER.NAME}"]) = 0 and last(/HashiCorp Nomad Client by HTTP/nomad.client.driver.detected["{#DRIVER.NAME}"]) = 1'
              name: 'HashiCorp Nomad Client: Driver [{#DRIVER.NAME}] is in unhealthy state'
              priority: WARNING
              description: 'The [{#DRIVER.NAME}] driver detected, but its state is unhealthy.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
          master_item:
            key: nomad.client.node.info.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var raw = JSON.parse(value),
                  	body = raw.body[0],
                  	arr = [];
                  
                  function getField(data, path) {
                  	var steps = path.split('.');
                  	for (var i = 0; i < steps.length; i++) {
                  		var step = steps[i];
                  		if (typeof data !== 'object' || typeof data[step] === 'undefined') {
                  			throw 'Required field "' + path + '" is not present in data received.';
                  		}
                  		data = data[step];
                  	}
                  	return data;
                  }
                  
                  var keys = Object.keys(getField(body,'Drivers'));
                  
                  	for (k in keys) {
                  		arr.push({
                  			'{#DRIVER.NAME}': keys[k],
                  			'{#DRIVER.DETECTED}': getField(body.Drivers[keys[k]],'Detected'),
                  		});
                  	}
                  
                  	return JSON.stringify(arr);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: containers
        - tag: subclass
          value: deploy
        - tag: subclass
          value: development
        - tag: target
          value: nomad-client
      macros:
        - macro: '{$NOMAD.API.RESPONSE.SUCCESS}'
          value: '200'
          description: 'HTTP API successful response code. Availability triggers threshold. Change, if needed.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'HTTP API success code threshold'
            description: 'HTTP API successful response code. Availability triggers threshold. Change, if needed.'
        - macro: '{$NOMAD.CLIENT.API.PORT}'
          value: '4646'
          description: 'Nomad client API port.'
          config:
            type: TEXT
            priority: '2'
            label: 'Nomad API port'
            description: 'In the range from 1 to 65535 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.CLIENT.API.SCHEME}'
          value: http
          description: 'Nomad client API scheme.'
          config:
            type: LIST
            priority: '1'
            label: 'Nomad API scheme'
            required: 'YES'
            options:
              - value: http
                text: http
              - value: https
                text: https
        - macro: '{$NOMAD.CLIENT.OPEN.FDS.MAX.WARN}'
          value: '90'
          description: 'Maximum percentage of used file descriptors.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Max file descriptors usage (%)'
            description: 'Maximum percentage of used file descriptors. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.CLIENT.RPC.PORT}'
          value: '4647'
          description: 'Nomad RPC service port.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Nomad RPC service port'
        - macro: '{$NOMAD.CLIENT.SERF.PORT}'
          value: '4648'
          description: 'Nomad serf service port.'
          config:
            type: TEXT
            priority: '8'
            section_name: Other
            label: 'Nomad serf service port'
        - macro: '{$NOMAD.CPU.UTIL.MIN}'
          value: '90'
          description: 'CPU utilization threshold. Measured as a percentage.'
          config:
            type: TEXT
            priority: '24'
            section_name: Thresholds
            label: 'CPU utilization threshold (%)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.DATA.TIMEOUT}'
          value: 15s
          description: 'Response timeout for an API.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'API response timeout'
        - macro: '{$NOMAD.DISK.NAME.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad client disks by name.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Client disks by name (include)'
            description: 'The filter to include HashiCorp Nomad client disks by name.'
        - macro: '{$NOMAD.DISK.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad client disks by name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Client disks by name (exclude)'
            description: 'The filter to exclude HashiCorp Nomad client disks by name.'
        - macro: '{$NOMAD.DRIVER.DETECT.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad client drivers by detection state. Possible filtering values: `true`, `false`.'
          config:
            type: TEXT
            priority: '22'
            section_name: Filters
            label: 'Client drivers by detection state (include)'
            description: 'The filter to include HashiCorp Nomad client drivers by detection state. Possible filtering values: `true`, `false`.'
        - macro: '{$NOMAD.DRIVER.DETECT.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad client drivers by detection state. Possible filtering values: `true`, `false`.'
          config:
            type: TEXT
            priority: '23'
            section_name: Filters
            label: 'Client drivers by detection state (exclude)'
            description: 'The filter to exclude HashiCorp Nomad client drivers by detection state. Possible filtering values: `true`, `false`.'
        - macro: '{$NOMAD.DRIVER.NAME.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad client drivers by name.'
          config:
            type: TEXT
            priority: '20'
            section_name: Filters
            label: 'Client drivers by name (include)'
            description: 'The filter to include HashiCorp Nomad client drivers by name.'
        - macro: '{$NOMAD.DRIVER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad client drivers by name.'
          config:
            type: TEXT
            priority: '21'
            section_name: Filters
            label: 'Client drivers by name (exclude)'
            description: 'The filter to exclude HashiCorp Nomad client drivers by name.'
        - macro: '{$NOMAD.HTTP.PROXY}'
          description: 'Sets the HTTP proxy for HTTP agent item. If this parameter is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'HTTP proxy for agent item'
            description: 'Sets the HTTP proxy for HTTP agent item. If this parameter is empty, then no proxy is used.'
        - macro: '{$NOMAD.INODES.FREE.MIN.CRIT}'
          value: '10'
          description: 'Critical threshold of the filesystem metadata utilization. Measured as a percentage.'
          config:
            type: TEXT
            priority: '27'
            section_name: Thresholds
            label: 'Filesystem metadata threshold (critical, %)'
            description: 'Critical threshold of the filesystem metadata utilization. Measured as a percentage. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.INODES.FREE.MIN.WARN}'
          value: '20'
          description: 'Warning threshold of the filesystem metadata utilization. Measured as a percentage.'
          config:
            type: TEXT
            priority: '26'
            section_name: Thresholds
            label: 'Filesystem metadata threshold (warning, %)'
            description: 'Warning threshold of the filesystem metadata utilization. Measured as a percentage. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.JOB.NAME.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad client jobs by name.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Client jobs by name (include)'
            description: 'The filter to include HashiCorp Nomad client jobs by name.'
        - macro: '{$NOMAD.JOB.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad client jobs by name.'
          config:
            type: TEXT
            priority: '13'
            section_name: Filters
            label: 'Client jobs by name (exclude)'
            description: 'The filter to exclude HashiCorp Nomad client jobs by name.'
        - macro: '{$NOMAD.JOB.NAMESPACE.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad client jobs by namespace.'
          config:
            type: TEXT
            priority: '14'
            section_name: Filters
            label: 'Client jobs by namespace (include)'
            description: 'The filter to include HashiCorp Nomad client jobs by namespace.'
        - macro: '{$NOMAD.JOB.NAMESPACE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad client jobs by namespace.'
          config:
            type: TEXT
            priority: '15'
            section_name: Filters
            label: 'Client jobs by namespace (exclude)'
            description: 'The filter to exclude HashiCorp Nomad client jobs by namespace.'
        - macro: '{$NOMAD.JOB.TASK.GROUP.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad client jobs by task group belonging.'
          config:
            type: TEXT
            priority: '18'
            section_name: Filters
            label: 'Client jobs by task group (include)'
            description: 'The filter to include HashiCorp Nomad client jobs by task group belonging.'
        - macro: '{$NOMAD.JOB.TASK.GROUP.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad client jobs by task group belonging.'
          config:
            type: TEXT
            priority: '19'
            section_name: Filters
            label: 'Client jobs by task group (exclude)'
            description: 'The filter to exclude HashiCorp Nomad client jobs by task group belonging.'
        - macro: '{$NOMAD.JOB.TYPE.MATCHES}'
          value: '.*'
          description: 'The filter to include HashiCorp Nomad client jobs by type.'
          config:
            type: TEXT
            priority: '16'
            section_name: Filters
            label: 'Client jobs by type (include)'
            description: 'The filter to include HashiCorp Nomad client jobs by type.'
        - macro: '{$NOMAD.JOB.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude HashiCorp Nomad client jobs by type.'
          config:
            type: TEXT
            priority: '17'
            section_name: Filters
            label: 'Client jobs by type (exclude)'
            description: 'The filter to exclude HashiCorp Nomad client jobs by type.'
        - macro: '{$NOMAD.RAM.AVAIL.MIN}'
          value: '5'
          description: 'CPU utilization threshold. Measured as a percentage.'
          config:
            type: TEXT
            priority: '25'
            section_name: Thresholds
            label: 'RAM available threshold (%)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.TOKEN}'
          description: 'Nomad authentication token.'
          config:
            type: TEXT
            priority: '3'
            label: 'Nomad authentication token'
            required: 'YES'
      dashboards:
        - uuid: 6cb91bf47abb4c29b5fdf6de15ee5f9e
          name: Allocations
          pages:
            - name: Allocations
              widgets:
                - type: item
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: nomad.client.allocations.running
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  'y': '5'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: nomad.client.allocations.complete
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  'y': '10'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: nomad.client.allocations.migrating
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '24'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: nomad.client.allocations.start
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '24'
                  'y': '5'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: nomad.client.allocations.blocked
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '24'
                  'y': '10'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: nomad.client.allocations.terminal
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '48'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: nomad.client.allocations.pending
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '48'
                  'y': '5'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: nomad.client.allocations.restart
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '48'
                  'y': '10'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: nomad.client.allocations.failed
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
        - uuid: 9df94875bc944537860bad6bbe832ca8
          name: 'Job resources'
          pages:
            - name: 'Job resources'
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        name: 'HashiCorp Nomad Client: Job [{#JOB.NAME}] task ["{#JOB.TASK.GROUP}"] namespace ["{#JOB.NAMESPACE}"] CPU utilization'
                    - type: STRING
                      name: reference
                      value: AAAAF
                - type: graphprototype
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: 'nomad.client.allocs.cpu.allocated["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
                    - type: STRING
                      name: reference
                      value: AAAAH
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        name: 'HashiCorp Nomad Client: Job ["{#JOB.NAME}"] task ["{#JOB.TASK.GROUP}"] namespace ["{#JOB.NAMESPACE}"] memory utilization'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                - type: graphprototype
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        name: 'HashiCorp Nomad Client: Job [{#JOB.NAME}] task ["{#JOB.TASK.GROUP}"] namespace ["{#JOB.NAMESPACE}"] CPU throttling'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graphprototype
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        key: 'nomad.client.allocs.cpu.total_ticks["{#JOB.NAME}","{#JOB.TASK.GROUP}","{#JOB.NAMESPACE}"]'
                    - type: STRING
                      name: reference
                      value: AAAAI
                    - type: INTEGER
                      name: source_type
                      value: '3'
        - uuid: 040a905f916a4311a52ecc2b084175a4
          name: 'Node resources'
          pages:
            - name: 'Node resources'
              widgets:
                - type: graph
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        name: 'HashiCorp Nomad Client: CPU utilization'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        name: 'HashiCorp Nomad Client: Memory utilization'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graphprototype
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        name: 'HashiCorp Nomad Client: Disk ["{#DEV.NAME}"] usage'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        name: 'HashiCorp Nomad Client: Memory allocation'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graphprototype
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Client by HTTP'
                        name: 'HashiCorp Nomad Client: Disk ["{#DEV.NAME}"] utilization'
                    - type: STRING
                      name: reference
                      value: AAAAE
      valuemaps:
        - uuid: 766a3c43981147bf85e9e157eb69c510
          name: 'Detection state'
          mappings:
            - value: '0'
              newvalue: Undetected
            - value: '1'
              newvalue: Detected
        - uuid: c202a63acca7407bb6d61bf631696691
          name: 'Driver state'
          mappings:
            - value: '0'
              newvalue: Unhealthy
            - value: '1'
              newvalue: Healthy
        - uuid: 40e17de6519d44bb80b4566e0569c31b
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 8598d0e2bd6f4903832ec91b7b300062
      template: 'HashiCorp Nomad Server by HTTP'
      name: 'HashiCorp Nomad Server by HTTP'
      description: |
        Get HashiCorp Nomad server metrics by HTTP from metrics endpoint.
        
        More information about metrics is available in the official documentation: https://developer.hashicorp.com/nomad/docs/operations/metrics-reference.
        
        You can discuss this template or leave feedback on our forum: https://www.zabbix.com/forum/zabbix-suggestions-and-feedback.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed to monitor HashiCorp Nomad servers by Zabbix.
        It works without any external scripts.
        
        ## Setup
        
        1. Enable telemetry in HashiCorp Nomad agent configuration file. Set the Prometheus metrics format.
        >Refer to the [`vendor documentation`](https://developer.hashicorp.com/nomad/docs/configuration/telemetry).
        2. Set the values for the `Nomad API scheme` and `Nomad API port` host wizard configuration fields to define the common Nomad API web schema and connection port.
        
        **Additional information**:
        
        * The Nomad servers use the default web schema - `HTTP` and default API port - `4646`. If you're using servers discovery and you need to re-define macros for the particular host created from prototype, use the context macros like {{$NOMAD.SERVER.API.SCHEME:`NECESSARY.IP`}} or/and {{$NOMAD.SERVER.API.PORT:`NECESSARY.IP`}} on master host or template level.
        * Some metrics may not be collected depending on your HashiCorp Nomad agent version, configuration and cluster role.
        * Don't forget to define the `Redundant server count` host wizard configuration field value, based on your cluster nodes amount to configure the failure tolerance triggers correctly.
        
        **Useful links**:
        
        * [HashiCorp Nomad metrics list](https://developer.hashicorp.com/nomad/docs/operations/metrics-reference)
        * [HashiCorp Nomad telemetry configuration reference](https://developer.hashicorp.com/nomad/docs/configuration/telemetry)
        * [HashiCorp Nomad metrics API reference](https://developer.hashicorp.com/nomad/api-docs/metrics)
        * [HashiCorp Nomad agent API reference](https://developer.hashicorp.com/nomad/api-docs/agent#query-self)
        * [HashiCorp Nomad cluster failure tolerance reference](https://developer.hashicorp.com/nomad/docs/concepts/consensus#deployment-table)
        * [Zabbix user macros with context](https://www.zabbix.com/documentation/8.0/manual/config/macros/user_macros_context)
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: c5903e91262b4877be8c7e8f304b2862
          name: 'Service [rpc] state'
          type: SIMPLE
          key: 'net.tcp.service[tcp,,{$NOMAD.SERVER.RPC.PORT}]'
          description: 'Current [rpc] service state.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 0b534fa4c6cd4e89bd0a44ca8e810fa2
              expression: 'last(/HashiCorp Nomad Server by HTTP/net.tcp.service[tcp,,{$NOMAD.SERVER.RPC.PORT}]) = 0'
              name: 'HashiCorp Nomad Server: Service [rpc] is down'
              opdata: 'Service: rpc, Port: {$NOMAD.SERVER.RPC.PORT}, State: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: |
                Cannot establish the connection to [rpc] service port {$NOMAD.SERVER.RPC.PORT}.
                Check the Nomad state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 9eecc3ee79f04448991c83ac93459597
          name: 'Service [serf] state'
          type: SIMPLE
          key: 'net.tcp.service[tcp,,{$NOMAD.SERVER.SERF.PORT}]'
          description: 'Current [serf] service state.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 00799e8927b547308fc9caab4ba2d24d
              expression: 'last(/HashiCorp Nomad Server by HTTP/net.tcp.service[tcp,,{$NOMAD.SERVER.SERF.PORT}]) = 0'
              name: 'HashiCorp Nomad Server: Service [serf] is down'
              opdata: 'Service: serf, Port: {$NOMAD.SERVER.SERF.PORT}, State: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: |
                Cannot establish the connection to [serf] service port {$NOMAD.SERVER.SERF.PORT}.
                Check the Nomad state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 04821dab074f43e785dec52fbf69240e
          name: 'Nomad raft version'
          type: DEPENDENT
          key: nomad.raft.version
          value_type: CHAR
          description: 'Nomad raft version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.body.stats.raft.protocol_version
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.stats.get
          tags:
            - tag: component
              value: system
        - uuid: 6ad163ebdefa4f5aa1e3712b7ddac7a7
          name: 'FSM allocation client update time'
          type: DEPENDENT
          key: nomad.server.alloc_client_update
          value_type: FLOAT
          units: s
          description: 'Time elapsed to apply AllocClientUpdate raft entry.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_fsm_alloc_client_update_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fsm
        - uuid: 22947f9cc2734f95997a55d9e6392b77
          name: 'Autopilot failure tolerance'
          type: DEPENDENT
          key: nomad.server.autopilot.failure_tolerance
          description: 'The number of redundant healthy servers that can fail without causing an outage.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_autopilot_failure_tolerance
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: autopilot
          triggers:
            - uuid: fbb6d007481a4aab8d107a1d25a8c7ad
              expression: 'last(/HashiCorp Nomad Server by HTTP/nomad.server.autopilot.failure_tolerance) < {$NOMAD.REDUNDANCY.MIN} and nodata(/HashiCorp Nomad Server by HTTP/nomad.server.autopilot.failure_tolerance,5m) = 0'
              name: 'HashiCorp Nomad Server: Autopilot redundancy is low'
              event_name: 'HashiCorp Nomad Server: Autopilot redundancy is low (less than {$NOMAD.REDUNDANCY.MIN})'
              priority: WARNING
              description: |
                The autopilot redundancy is low.
                Cluster crash risk is high due to one more server failure.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 05ce375320dd402ab6c75f8fffba74cb
          name: 'Autopilot state'
          type: DEPENDENT
          key: nomad.server.autopilot.state
          description: 'Current autopilot state.'
          valuemap:
            name: 'Autopilot state'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_autopilot_healthy
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: autopilot
          triggers:
            - uuid: 73c14eec055e47c6af6d8728ba0fb416
              expression: 'last(/HashiCorp Nomad Server by HTTP/nomad.server.autopilot.state) = 0 and nodata(/HashiCorp Nomad Server by HTTP/nomad.server.autopilot.state,5m) = 0'
              name: 'HashiCorp Nomad Server: Autopilot is unhealthy'
              priority: AVERAGE
              description: 'The autopilot is in unhealthy state. The successful failover probability is extremely low.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: ace31f3772fe4ffe84741554e3fba8bc
          name: 'CPU shares for blocked evaluations'
          type: DEPENDENT
          key: nomad.server.blocked_evals.cpu
          value_type: FLOAT
          description: 'Amount of CPU shares requested by blocked evals.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_blocked_evals_cpu
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: cpu
            - tag: component
              value: evaluations
        - uuid: d7fe536b4d0445328dfbf3b1188bea70
          name: 'CPU shares for blocked job evaluations'
          type: DEPENDENT
          key: nomad.server.blocked_evals.job.cpu
          value_type: FLOAT
          description: 'Amount of CPU shares requested by blocked evals of a job.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_blocked_evals_job_cpu
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: cpu
            - tag: component
              value: evaluations
            - tag: component
              value: jobs
        - uuid: 2f07cbd6ec11449cae787a6e84fa5fbf
          name: 'Memory shares for blocked job evaluations'
          type: DEPENDENT
          key: nomad.server.blocked_evals.job.memory
          value_type: FLOAT
          description: 'Amount of memory requested by blocked evals of a job.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_blocked_evals_job_memory
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
            - tag: component
              value: jobs
            - tag: component
              value: memory
        - uuid: 5460a81df8174fb5a7596b4243162d05
          name: 'Memory shares by blocked evaluations'
          type: DEPENDENT
          key: nomad.server.blocked_evals.memory
          value_type: FLOAT
          description: 'Amount of memory requested by blocked evals.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_blocked_evals_memory
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
            - tag: component
              value: memory
        - uuid: 474d05060b0d4a608f6a2d319235af91
          name: 'Evaluations blocked'
          type: DEPENDENT
          key: nomad.server.blocked_evals.total_blocked
          value_type: FLOAT
          description: 'Count of evals in the blocked state for any reason (cluster resource exhaustion or quota limits).'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_blocked_evals_total_blocked
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: 80f5edf18daf407ba6b64374084a555b
          name: 'Evaluations escaped'
          type: DEPENDENT
          key: nomad.server.blocked_evals.total_escaped
          value_type: FLOAT
          description: |
            Count of evals that have escaped computed node classes.
            This indicates a scheduler optimization was skipped and is not usually a source of concern.
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_blocked_evals_total_escaped
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: 356dec0f5d5b45d981db4b590ef7dd73
          name: 'Evaluations blocked due to quota limit'
          type: DEPENDENT
          key: nomad.server.blocked_evals.total_quota_limit
          value_type: FLOAT
          description: 'Count of blocked evals due to quota limits (the resources for these jobs are not counted in other blocked_evals metrics, except for total_blocked).'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_blocked_evals_total_quota_limit
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: 54ddea6f2fa04e6c8ceb456d4d67c530
          name: 'Evaluations enqueue time'
          type: DEPENDENT
          key: nomad.server.broker.eval_waiting
          value_type: FLOAT
          units: s
          description: 'Average time elapsed with evaluations waiting to be enqueued.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_eval_ack_sum
                - function
                - avg
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: 7df3a4b80f6b44c6a03b672182d3f73f
          name: 'Services ready to schedule'
          type: DEPENDENT
          key: nomad.server.broker.service_ready
          value_type: FLOAT
          description: 'Count of service evals ready to be scheduled.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_broker_service_ready
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: services
        - uuid: 0da8881c8ddf4cd18e04b38201b83b7d
          name: 'Services unacknowledged'
          type: DEPENDENT
          key: nomad.server.broker.service_unacked
          value_type: FLOAT
          description: 'Count of unacknowledged service evals.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_broker_service_unacked
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: services
        - uuid: 2a38602920224c31a221696cf65c6abc
          name: 'System evaluations ready to schedule'
          type: DEPENDENT
          key: nomad.server.broker.system_ready
          value_type: FLOAT
          description: 'Count of service evals ready to be scheduled.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_broker_system_ready
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: 3faaaa69672c4b999a12f054dbd8b980
          name: 'System evaluations unacknowledged'
          type: DEPENDENT
          key: nomad.server.broker.system_unacked
          value_type: FLOAT
          description: 'Count of unacknowledged system evals.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_broker_system_unacked
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: 2e556f5894c9492a80b34c84ceb69dba
          name: 'Evaluations pending'
          type: DEPENDENT
          key: nomad.server.broker.total_pending
          value_type: FLOAT
          description: 'Evaluations that are pending until an existing evaluation for the same job completes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_broker_total_pending
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: 01e11850732a46709942c225d294a8ef
          name: 'Evaluations ready'
          type: DEPENDENT
          key: nomad.server.broker.total_ready
          value_type: FLOAT
          description: 'Number of evaluations ready to be processed.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_broker_total_ready
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: d57805e0d8a24117bb64992a9aeb3dc3
          name: 'Evaluations unacked'
          type: DEPENDENT
          key: nomad.server.broker.total_unacked
          value_type: FLOAT
          description: 'Evaluations dispatched for processing but incomplete.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_broker_total_unacked
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: ac1d1422adc248b48ba65268f9a43be8
          name: 'Evaluations waiting'
          type: DEPENDENT
          key: nomad.server.broker.total_waiting
          description: 'Count of evals waiting to be enqueued.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_broker_total_waiting
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: evaluations
        - uuid: de3e13f7635e4058bd2ca12f6f454668
          name: 'RPC eval dequeue time'
          type: DEPENDENT
          key: nomad.server.client.dequeue
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Eval.Dequeue RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_eval_dequeue_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: ac2a5b69fef546d0924d631a9ed9cffd
          name: 'RPC get client allocs time'
          type: DEPENDENT
          key: nomad.server.client.get_client_allocs
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Node.GetClientAllocs RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_client_get_client_allocs_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: 758f3474636c42378fac78a2f5e3b63b
          name: 'RPC list time'
          type: DEPENDENT
          key: nomad.server.client.list
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Node.List RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_client_list_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: 588bb9b304634852af149d7903d42798
          name: 'RPC update allocations time'
          type: DEPENDENT
          key: nomad.server.client.update_alloc
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Node.UpdateAlloc RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_client_update_alloc_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: 1e1ce033c99b45a3892df8674deaf1f4
          name: 'RPC update status time'
          type: DEPENDENT
          key: nomad.server.client.update_status
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Node.UpdateStatus RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_client_update_status_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: c5bd6a645e9f49ba83fe065b2af6248e
          name: 'CPU time, rate'
          type: DEPENDENT
          key: nomad.server.cpu.time
          value_type: FLOAT
          units: s
          description: 'Total user and system CPU time spent in seconds.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_cpu_seconds_total
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: cpu
        - uuid: dbbee3bb99d347f9a9a5325b4f64a894
          name: 'Monitoring API response'
          type: DEPENDENT
          key: nomad.server.data.api.response
          value_type: TEXT
          description: 'Monitoring API response message.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var response = Object.keys(JSON.parse(value).header).filter(function (f) {
                  		return f.match(/HTTP\/[\d.]+\s+\d{3}/);
                  	});
                  
                  	return response.pop();
                  }
                  catch (error) {
                  	return "HTTP/1.1 408 Request timeout";
                  }
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.server.data.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 9dc8cd0bcbad4ee7a2afe45e33db53a7
              expression: 'find(/HashiCorp Nomad Server by HTTP/nomad.server.data.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              name: 'HashiCorp Nomad Server: Monitoring API connection has failed'
              event_name: 'HashiCorp Nomad Server: Monitoring API connection has failed. HTTP response code: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+(\d{3})", \1")}. Response message: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+\d{3}\s+(.*)", \1")}'
              priority: AVERAGE
              description: |
                Monitoring API connection has failed.
                Ensure that Nomad API URL and the necessary permissions have been defined correctly, check the service state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: b7ba2f4a56b04de298fde77cbf5afb6a
          name: 'Telemetry get'
          type: HTTP_AGENT
          key: nomad.server.data.get
          history: '0'
          value_type: TEXT
          description: 'Telemetry data in raw format.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"header":{"HTTP/1.1 408 Request timeout":""}}'
          timeout: '{$NOMAD.DATA.TIMEOUT}'
          url: '{$NOMAD.SERVER.API.SCHEME}://{HOST.IP}:{$NOMAD.SERVER.API.PORT}/v1/metrics'
          query_fields:
            - name: format
              value: prometheus
          status_codes: ''
          http_proxy: '{$NOMAD.HTTP.PROXY}'
          headers:
            - name: X-Nomad-Token
              value: '{$NOMAD.TOKEN}'
          retrieve_mode: BOTH
          output_format: JSON
          tags:
            - tag: component
              value: raw
        - uuid: 7241c9923d714970ad950f9b7aa8ab52
          name: 'RPC evaluation acknowledgement time'
          type: DEPENDENT
          key: nomad.server.eval.ack
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Eval.Ack RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_eval_ack_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: b9085e173cec4ce2b2fa6fd68041695e
          name: 'FSM apply plan results time'
          type: DEPENDENT
          key: nomad.server.fsm.apply_plan_results
          value_type: FLOAT
          units: s
          description: 'Time elapsed to apply ApplyPlanResults raft entry.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_fsm_apply_plan_results_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fsm
        - uuid: 62b19ce1b2bb4fdaacff02d70101a10f
          name: 'FSM job registration time'
          type: DEPENDENT
          key: nomad.server.fsm.register_job
          value_type: FLOAT
          units: s
          description: 'Time elapsed to apply RegisterJob raft entry.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_fsm_register_job_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fsm
        - uuid: 2d0b9f09bfb5480ebd6d6cf96c15278e
          name: 'FSM update evaluation time'
          type: DEPENDENT
          key: nomad.server.fsm.update_eval
          value_type: FLOAT
          units: s
          description: 'Time elapsed to apply UpdateEval raft entry.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_fsm_update_eval_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fsm
        - uuid: 0abce7a087874e58a7da20acb3599535
          name: 'Heartbeats active'
          type: DEPENDENT
          key: nomad.server.heartbeat.active
          description: |
            Number of active heartbeat timers.
            Each timer represents a Nomad client connection.
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_heartbeat_active
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
        - uuid: dc95deb3590148a9bc50ea151a0d46b7
          name: 'RPC job allocations time'
          type: DEPENDENT
          key: nomad.server.job.allocations
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Job.Allocations RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_allocations_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: 11e18e811fe7461181417ca1f5dad915
          name: 'RPC job evaluations time'
          type: DEPENDENT
          key: nomad.server.job.evaluations
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Job.Evaluations RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_evaluations_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: 0efaac3a59d44ce09d31435ddfa6aada
          name: 'RPC get job time'
          type: DEPENDENT
          key: nomad.server.job.get_job
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Job.GetJob RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_get_job_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: 5ab3191f1f744682bab6d3142a1c39a4
          name: 'Jobs dead'
          type: DEPENDENT
          key: nomad.server.job_status.dead
          description: 'Number of dead jobs.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_status_dead
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
          triggers:
            - uuid: 44dcd52ebf54404e871501a4c4825424
              expression: 'last(/HashiCorp Nomad Server by HTTP/nomad.server.job_status.dead) > 0 and nodata(/HashiCorp Nomad Server by HTTP/nomad.server.job_status.dead,5m) = 0'
              name: 'HashiCorp Nomad Server: Dead jobs found'
              opdata: 'Current amount: {ITEM.LASTVALUE}'
              priority: WARNING
              description: |
                Jobs with the `Dead` state discovered.
                Check the {$NOMAD.SERVER.API.SCHEME}://{HOST.IP}:{$NOMAD.SERVER.API.PORT}/v1/jobs URL for the details.
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 39a27315e33549dc88c6cb426a5a05c9
          name: 'Jobs pending'
          type: DEPENDENT
          key: nomad.server.job_status.pending
          description: 'Number of pending jobs.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_status_pending
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
        - uuid: 97907d8816b14fb69063a55bdea22701
          name: 'Jobs running'
          type: DEPENDENT
          key: nomad.server.job_status.running
          description: 'Number of running jobs.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_status_running
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
        - uuid: 4be8c941477046dd9dcc549020d687e7
          name: 'Job allocations completed'
          type: DEPENDENT
          key: nomad.server.job_summary.complete
          description: 'Number of complete allocations for a job.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_summary_complete
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
        - uuid: 6f6ad9a70b4e4759bc2e4cc213d697bb
          name: 'Job allocations failed'
          type: DEPENDENT
          key: nomad.server.job_summary.failed
          description: 'Number of failed allocations for a job.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_summary_failed
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
        - uuid: 7a267a1b82b24157a19b52e6f285f0ce
          name: 'RPC job summary time'
          type: DEPENDENT
          key: nomad.server.job_summary.get_job_summary
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Job.Summary RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_summary_get_job_summary_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: 0c408dff86604486b0f23efed00f4348
          name: 'Job allocations lost'
          type: DEPENDENT
          key: nomad.server.job_summary.lost
          description: 'Number of lost allocations for a job.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_summary_lost
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
        - uuid: d0de68553b484d2d9311b356a7b5a9e7
          name: 'Job allocations queued'
          type: DEPENDENT
          key: nomad.server.job_summary.queued
          description: 'Number of queued allocations for a job.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_summary_queued
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
        - uuid: 98ab06dce1f84ef5993e8cc793114008
          name: 'Job allocations running'
          type: DEPENDENT
          key: nomad.server.job_summary.running
          description: 'Number of running allocations for a job.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_summary_running
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
        - uuid: e3cc96bd72924bb5bd0334018a5a88be
          name: 'Job allocations starting'
          type: DEPENDENT
          key: nomad.server.job_summary.starting
          description: 'Number of starting allocations for a job.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_summary_starting
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
        - uuid: 244a84e136c94a47b1b64b92d08ac20f
          name: 'Job allocations unknown'
          type: DEPENDENT
          key: nomad.server.job_summary.unknown
          description: 'Number of unknown allocations for a job.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_job_summary_unknown
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: jobs
        - uuid: 478f45d1095646bca5ffd3a6d923dddf
          name: 'Leader barrier time'
          type: DEPENDENT
          key: nomad.server.leader.barrier
          value_type: FLOAT
          units: s
          description: 'Time elapsed to establish a raft barrier during leader transition.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_leader_barrier_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: leader
            - tag: component
              value: raft
        - uuid: 8425336f75704a259bc066c795df1516
          name: 'Total reconcile time'
          type: DEPENDENT
          key: nomad.server.leader.reconcile
          value_type: FLOAT
          units: s
          description: 'Time elapsed to reconcile all serf peers with state store.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_leader_reconcile_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: leader
            - tag: component
              value: raft
        - uuid: a5b6d36142174dd683e2aec5dd4ee1e9
          name: 'Reconcile peer time'
          type: DEPENDENT
          key: nomad.server.leader.reconcile_member
          value_type: FLOAT
          units: s
          description: 'Time elapsed to reconcile a serf peer with state store.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_leader_reconcileMember_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: leader
            - tag: component
              value: raft
        - uuid: af6eda309cc545b2aa65efc0af103a02
          name: 'Gossip time'
          type: DEPENDENT
          key: nomad.server.memberlist.gossip
          value_type: FLOAT
          units: s
          description: 'Time elapsed to broadcast gossip messages.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_memberlist_gossip_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: gossip
        - uuid: 25372c89439641d09521348033b1e324
          name: Metrics
          type: DEPENDENT
          key: nomad.server.metrics.get
          history: '0'
          value_type: TEXT
          description: 'Nomad server metrics in raw format.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.body
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.data.get
          tags:
            - tag: component
              value: raw
        - uuid: 8a003df55bae4bf0a14fefc6f02f28bf
          name: 'Namespace list time'
          type: DEPENDENT
          key: nomad.server.namespace.list_namespace
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Namespace.ListNamespaces.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_namespace_list_namespace_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: namespaces
        - uuid: dd8d8b5cdf914002ac58183b667ceb06
          name: 'Plan apply time'
          type: DEPENDENT
          key: nomad.server.plan.apply
          value_type: FLOAT
          units: s
          description: 'Time elapsed to apply a plan.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_plan_apply_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: plan
        - uuid: d8d69f231d23457e82c6d3941f09cf5d
          name: 'Plan evaluate time'
          type: DEPENDENT
          key: nomad.server.plan.evaluate
          value_type: FLOAT
          units: s
          description: 'Time elapsed to evaluate a plan.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_plan_evaluate_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: plan
        - uuid: ee7b59fd19644bc4813696f8d806955f
          name: 'Plan queue'
          type: DEPENDENT
          key: nomad.server.plan.queue_depth
          value_type: FLOAT
          description: 'Count of evals in the plan queue.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_plan_queue_depth
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: plan
        - uuid: 9df85708b74d40509d9c9412a15e5ce5
          name: 'RPC plan submit time'
          type: DEPENDENT
          key: nomad.server.plan.submit
          value_type: FLOAT
          units: s
          description: 'Time elapsed for Plan.Submit RPC call.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_plan_submit_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: plan
            - tag: component
              value: rpc
        - uuid: 851eea2a548644ba884ca852c2759d90
          name: 'Plan raft index processing time'
          type: DEPENDENT
          key: nomad.server.plan.wait_for_index
          value_type: FLOAT
          units: s
          description: 'Time elapsed that planner waits for the raft index of the plan to be processed.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_plan_wait_for_index_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: plan
        - uuid: 505ee2804b4e451892103b36cc38abde
          name: 'Open file descriptors, max'
          type: DEPENDENT
          key: nomad.server.process_max_fds
          description: 'Maximum number of open file descriptors.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_max_fds
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fds
        - uuid: cba898eca0c84a84a1ea0309e04b9f84
          name: 'Open file descriptors'
          type: DEPENDENT
          key: nomad.server.process_open_fds
          description: 'Number of open file descriptors.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_open_fds
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fds
        - uuid: 1dd455d2776f4378a39980cfa8eba33c
          name: 'FSM index'
          type: DEPENDENT
          key: nomad.server.raft.applied_index
          description: 'Current index applied to FSM.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_appliedIndex
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fsm
        - uuid: bad74d0dc4b2431fbb5a442bc2fc1236
          name: 'Raft transactions, rate'
          type: DEPENDENT
          key: nomad.server.raft.apply
          description: 'Number of Raft transactions.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_apply
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: raft
        - uuid: 804693ed989b44e3903bcd81159dd51d
          name: 'Raft calls blocked, rate'
          type: DEPENDENT
          key: nomad.server.raft.barrier
          description: 'Count of blocking raft API calls.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_barrier
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: raft
        - uuid: f7d1bc6c6a82475dabcdaaec7472fe02
          name: 'BoltDB freelist bytes'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.freelist_bytes
          units: B
          description: 'Number of freelist bytes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_freelistBytes
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: b3f246d0991746589f4d0d68653eb4e9
          name: 'BoltDB free page bytes'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.free_page_bytes
          value_type: FLOAT
          units: B
          description: 'Number of free page bytes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_freePageBytes
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: e3d0d6f656f5484f8e8a8ca1195aad59
          name: 'BoltDB free pages'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.num_free_pages
          description: 'Number of BoltDB free pages.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_numFreePages
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: 73f359bcb02d46a0adb6fdd51284afcf
          name: 'BoltDB pending pages'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.num_pending_pages
          description: 'Number of BoltDB pending pages.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_numPendingPages
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: 08afe7430e3c49e388f0a87c8bbf2ff4
          name: 'BoltDB open read transactions'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.open_read_txn
          description: 'Number of current open read transactions.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_openReadTxn
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: 36e89e86c9124e868670e9cb7b247899
          name: 'BoltDB read transactions, rate'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.total_read_txn
          description: 'Count of total read transactions.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_totalReadTxn
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: 2733afd943b346e38c8605259bea038c
          name: 'BoltDB cursors'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.cursor_count
          description: 'Count of total database cursors.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_cursorCount
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: 1641576e376c4c82a8b1882b4810db4c
          name: 'BoltDB nodes, rate'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.node_count
          description: 'Count of total database nodes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_nodeCount
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: f0151f3431254030a3bcd538e8d2068b
          name: 'BoltDB node dereferences, rate'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.node_deref
          value_type: FLOAT
          description: 'Count of total database node dereferences.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_nodeDeref
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: 27a8a38acfc34e14b3fbb13aa58ad5d4
          name: 'BoltDB page allocations, rate'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.page_alloc
          value_type: FLOAT
          description: 'Number of page allocations.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_pageAlloc
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: 14a5fc715dad4eacaddb2f277e1f85f6
          name: 'BoltDB pages in use'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.page_count
          description: 'Number of pages in use.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_pageCount
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: dd9729e812614ab59c595b7183a883b0
          name: 'BoltDB rebalance operations, rate'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.rebalance
          value_type: FLOAT
          description: 'Count of total rebalance operations.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_rebalance
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: d270aa05d1ca4f3d9ee606937f1703cc
          name: 'BoltDB rebalance time'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.rebalance_time
          value_type: FLOAT
          units: s
          description: 'Sample of rebalance operation times.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_rebalanceTime_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: 621478ee2bea482abffd6b8c80df5ee1
          name: 'BoltDB spill operations, rate'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.spill
          description: 'Count of total spill operations.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_spill
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: 2ca3e7572bf04b04961107e7d9304887
          name: 'BoltDB spill time'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.spill_time
          value_type: FLOAT
          units: s
          description: 'Sample of spill operation times.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_spillTime_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: bd14547f789540618db85057eceb70db
          name: 'BoltDB split operations, rate'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.split
          description: 'Count of total split operations.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_split
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: b13b7b9eb66940c9bf4d14e711ee0279
          name: 'BoltDB write operations, rate'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.write
          description: 'Count of total write operations.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_write
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: e9b31f3434aa4df0908a79ff5352a29e
          name: 'BoltDB write time'
          type: DEPENDENT
          key: nomad.server.raft.boltdb.txstats.write_time
          value_type: FLOAT
          units: s
          description: 'Sample of write operation times.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_boltdb_txstats_writeTime_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: boltdb
        - uuid: dce75575b01e4cf8bd84d6a40c74f22b
          name: 'Cluster role'
          type: DEPENDENT
          key: nomad.server.raft.cluster_role
          description: 'Current role in the cluster.'
          valuemap:
            name: 'Cluster role'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.body.stats.raft.state
              error_handler: DISCARD_VALUE
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = [
                  	'Leader',
                  	'Follower',
                  	'Candidate',
                  ].indexOf(value);
                  return idx !== -1 ? idx : 10;
          master_item:
            key: nomad.server.stats.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 1bc6ee807acd4532a58b4527f8865c1c
              expression: 'change(/HashiCorp Nomad Server by HTTP/nomad.server.raft.cluster_role) <> 0'
              name: 'HashiCorp Nomad Server: Cluster role has changed'
              event_name: 'HashiCorp Nomad Server: Cluster role has changed to {ITEM.LASTVALUE}'
              priority: INFO
              description: 'Cluster role has changed.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: a994ee525886407486adace82ea5ef90
          name: 'Raft commit logs enqueued'
          type: DEPENDENT
          key: nomad.server.raft.commit_num_logs
          description: 'Count of logs enqueued.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_commitNumLogs
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: raft
        - uuid: 3160d5b81e1540aab3244f1cf6bce95d
          name: 'Raft commit time'
          type: DEPENDENT
          key: nomad.server.raft.commit_time
          value_type: FLOAT
          units: s
          description: 'Time elapsed to commit writes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_worker_dequeue_eval_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: raft
        - uuid: 09f1baf6fc2443f48e01814b939c0749
          name: 'FSM apply time'
          type: DEPENDENT
          key: nomad.server.raft.fsm.apply
          value_type: FLOAT
          units: s
          description: 'Time elapsed to apply write to FSM.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_fsm_apply_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fsm
        - uuid: 18689de9474f4812ba9ed34d311ad3a1
          name: 'FSM autopilot time'
          type: DEPENDENT
          key: nomad.server.raft.fsm.autopilot
          value_type: FLOAT
          units: s
          description: 'Time elapsed to apply Autopilot raft entry.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_fsm_autopilot_sum
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fsm
        - uuid: 6846f262148e49288ecb7aa0ad18f7d2
          name: 'FSM enqueue time'
          type: DEPENDENT
          key: nomad.server.raft.fsm.enqueue
          value_type: FLOAT
          units: s
          description: 'Time elapsed to enqueue write to FSM.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_fsm_enqueue_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fsm
        - uuid: 4e2d0557fc984ed9858316c8409edd0e
          name: 'FSM register node time'
          type: DEPENDENT
          key: nomad.server.raft.fsm.register_node
          value_type: FLOAT
          units: s
          description: 'Time elapsed to apply RegisterNode raft entry.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_fsm_register_node_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: fsm
        - uuid: bb65ca263f3244fc883d9102bbf9bef7
          name: 'Raft last index'
          type: DEPENDENT
          key: nomad.server.raft.last_index
          description: 'Most recent index seen.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_lastIndex
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: raft
        - uuid: bda052f13e3c4dacaafc4ddefbc98036
          name: 'Dispatch log time'
          type: DEPENDENT
          key: nomad.server.raft.leader.dispatch_log
          value_type: FLOAT
          units: s
          description: 'Time elapsed to write log, mark in flight, and start replication.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_leader_dispatchLog_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: leader
            - tag: component
              value: raft
        - uuid: f915e5e162814786943cd4cc85bb7aff
          name: 'Logs dispatched'
          type: DEPENDENT
          key: nomad.server.raft.leader.dispatch_num_logs
          description: 'Count of logs dispatched.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_leader_dispatchNumLogs
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: leader
            - tag: component
              value: raft
        - uuid: 7f9db272307c43e7b87b8a4a4a6eae16
          name: 'Leader last contact'
          type: DEPENDENT
          key: nomad.server.raft.leader.lastContact
          value_type: FLOAT
          units: s
          description: |
            Time since last contact to leader.
            General indicator of Raft latency.
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - 'nomad_raft_leader_lastContact{quantile="0.99"}'
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: STR_REPLACE
              parameters:
                - NaN
                - '0'
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: leader
            - tag: component
              value: raft
          triggers:
            - uuid: 65c69469e9354e81a632485a74bc711d
              expression: 'min(/HashiCorp Nomad Server by HTTP/nomad.server.raft.leader.lastContact,5m) >= {$NOMAD.SERVER.LEADER.LATENCY} and nodata(/HashiCorp Nomad Server by HTTP/nomad.server.raft.leader.lastContact,5m) = 0'
              name: 'HashiCorp Nomad Server: Leader last contact timeout exceeded'
              event_name: 'HashiCorp Nomad Server: Leader last contact timeout exceeded: over {$NOMAD.SERVER.LEADER.LATENCY} for the last 5 minutes'
              priority: WARNING
              description: |
                The nomad.raft.leader.lastContact metric is a general indicator of Raft latency which can be used to observe how Raft timing is performing and guide infrastructure provisioning.
                If this number trends upwards, look at CPU, disk IOPs, and network latency. nomad.raft.leader.lastContact should not get too close to the leader lease timeout of 500ms.
              tags:
                - tag: scope
                  value: performance
        - uuid: bca59612c439447ebe78ae68e68fd6cb
          name: 'Raft peers'
          type: DEPENDENT
          key: nomad.server.raft.peers
          description: 'Current cluster raft peers amount.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.body.stats.raft.num_peers
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.stats.get
          tags:
            - tag: component
              value: system
        - uuid: 36ff560da62740a0b4657b4afabcf902
          name: 'Raft transaction commit time'
          type: DEPENDENT
          key: nomad.server.raft.replication.appendEntries
          units: s
          description: 'Raft transaction commit time.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_replication_appendEntries_rpc
                - function
                - avg
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: raft
        - uuid: 662cd8712bbe4a4080a540f878b4ec44
          name: 'Heartbeat fails'
          type: DEPENDENT
          key: nomad.server.raft.transition.heartbeat_timeout
          description: 'Count of failing to heartbeat and starting election.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_raft_transition_heartbeat_timeout
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: raft
        - uuid: 3dae4fd461fa4a5abdba717e538b8405
          name: 'Resident memory size'
          type: DEPENDENT
          key: nomad.server.resident_memory_bytes
          value_type: FLOAT
          units: B
          description: 'Resident memory size in bytes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_resident_memory_bytes
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: ec2d018e121442be9d3fb350f6572ca6
          name: 'RPC queries, rate'
          type: DEPENDENT
          key: nomad.server.rpc.query
          description: 'Number of RPC queries.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_rpc_query
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: 406d9bc9db1e44509a77acd11963f406
          name: 'RPC requests, rate'
          type: DEPENDENT
          key: nomad.server.rpc.request
          description: 'Number of RPC requests being handled.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_rpc_request
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: 0ef3cfaf0e694625bbc3f3a117ff9f06
          name: 'RPC error requests, rate'
          type: DEPENDENT
          key: nomad.server.rpc.request_error
          description: 'Number of RPC requests being handled that result in an error.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_rpc_request
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: network
            - tag: component
              value: rpc
        - uuid: a0e7b48174de4e569762dc1654d63267
          name: 'Memory used'
          type: DEPENDENT
          key: nomad.server.runtime.alloc_bytes
          value_type: FLOAT
          units: B
          description: 'Memory utilization in bytes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_runtime_alloc_bytes
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: 7d8883065c2c494f9c4853afe50d157c
          name: 'Objects freed, rate'
          type: DEPENDENT
          key: nomad.server.runtime.free_count
          value_type: FLOAT
          description: 'Count of objects freed from heap by go runtime GC.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_runtime_free_count
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: runtime
        - uuid: 02b0699a706742d1bb557e32ed1b52ea
          name: 'GC pause time'
          type: DEPENDENT
          key: nomad.server.runtime.gc_pause_ns
          value_type: FLOAT
          units: s
          description: 'Go runtime GC pause times.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_runtime_gc_pause_ns_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: runtime
        - uuid: c3fc612a6bec45ee9ffd51d168801974
          name: 'Heap objects'
          type: DEPENDENT
          key: nomad.server.runtime.heap_objects
          description: |
            Number of objects on the heap.
            General memory pressure indicator.
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_runtime_heap_objects
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: 9b1bcd0020b5413e920ce12af6124687
          name: Goroutines
          type: DEPENDENT
          key: nomad.server.runtime.num_goroutines
          description: 'Number of goroutines and general load pressure indicator.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_runtime_num_goroutines
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: 71256d39cf844c22be8d25a9170e61f2
          name: 'GC metadata size'
          type: DEPENDENT
          key: nomad.server.runtime.sys_bytes
          value_type: FLOAT
          units: B
          description: 'Go runtime GC metadata size in bytes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_runtime_sys_bytes
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: runtime
        - uuid: 733b18dd02d7404bb8cf4c7447a374ae
          name: 'GC runs'
          type: DEPENDENT
          key: nomad.server.runtime.total_gc_runs
          description: 'Count of go runtime GC runs.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_runtime_total_gc_runs
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: runtime
        - uuid: c7f327a390884c928ebf228d8ebb3a4c
          name: 'Allocation reschedule attempts'
          type: DEPENDENT
          key: nomad.server.scheduler.allocs.rescheduled.attempted
          description: 'Count of attempts to reschedule an allocation.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_scheduler_allocs_reschedule_attempted
                - function
                - sum
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: allocations
        - uuid: 8293b40a695b4b24ab9b6576a0f9a4d8
          name: 'Memberlist events'
          type: DEPENDENT
          key: nomad.server.serf.queue.event
          value_type: FLOAT
          description: 'Count of memberlist events received.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_serf_queue_Event_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: memberlist
        - uuid: 8aacc54e455b49b0ab0cfed4559829f7
          name: 'Memberlist changes'
          type: DEPENDENT
          key: nomad.server.serf.queue.intent
          value_type: FLOAT
          description: 'Count of memberlist changes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_serf_queue_Intent_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: memberlist
        - uuid: 1c5f383a89f74934a6cb211bfd586856
          name: 'Memberlist queries'
          type: DEPENDENT
          key: nomad.server.serf.queue.queries
          value_type: FLOAT
          description: 'Count of memberlist queries.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_serf_queue_Query_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: memberlist
        - uuid: e645f371b4ae48e2b2b782f4b0d0fae4
          name: 'Snapshot index'
          type: DEPENDENT
          key: nomad.server.state.snapshot.index
          description: 'Current snapshot index.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_state_snapshotIndex
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: state
        - uuid: 02ba826868414a16909f13b98cc4c445
          name: 'Internal stats API response'
          type: DEPENDENT
          key: nomad.server.stats.api.response
          value_type: TEXT
          description: 'Internal stats API response message.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var response = Object.keys(JSON.parse(value).header).filter(function (f) {
                  		return f.match(/HTTP\/[\d.]+\s+\d{3}/);
                  	});
                  
                  	return response.pop();
                  }
                  catch (error) {
                  	return "HTTP/1.1 408 Request timeout";
                  }
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nomad.server.stats.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: b60dd78bd2d24c22afec63a8b420bcd6
              expression: 'find(/HashiCorp Nomad Server by HTTP/nomad.server.stats.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              name: 'HashiCorp Nomad Server: Internal stats API connection has failed'
              event_name: 'HashiCorp Nomad Server: Internal stats API connection has failed. HTTP response code: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+(\d{3})", \1")}. Response message: {{ITEM.VALUE}.regsub("HTTP\/[\d.]+\s+\d{3}\s+(.*)", \1")}'
              priority: AVERAGE
              description: |
                Internal stats API connection has failed.
                Ensure that Nomad API URL and the necessary permissions have been defined correctly, check the service state and network connectivity between Nomad and Zabbix.
              manual_close: 'YES'
              dependencies:
                - name: 'HashiCorp Nomad Server: Monitoring API connection has failed'
                  expression: 'find(/HashiCorp Nomad Server by HTTP/nomad.server.data.api.response,,"like","{$NOMAD.API.RESPONSE.SUCCESS}")=0'
              tags:
                - tag: scope
                  value: availability
        - uuid: f8d3a680e6f94250ab0a1ef8169889e3
          name: 'Internal stats get'
          type: HTTP_AGENT
          key: nomad.server.stats.get
          delay: 1h
          history: '0'
          value_type: TEXT
          description: 'Internal stats data in raw format.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"header":{"HTTP/1.1 408 Request timeout":""}}'
          timeout: '{$NOMAD.DATA.TIMEOUT}'
          url: '{$NOMAD.SERVER.API.SCHEME}://{HOST.IP}:{$NOMAD.SERVER.API.PORT}/v1/agent/self'
          query_fields:
            - name: filter
              value: 'ID == "{HOST.HOST}"'
          status_codes: ''
          http_proxy: '{$NOMAD.HTTP.PROXY}'
          headers:
            - name: X-Nomad-Token
              value: '{$NOMAD.TOKEN}'
          retrieve_mode: BOTH
          output_format: JSON
          tags:
            - tag: component
              value: raw
        - uuid: 9593fe46e0d941f2b4ddef96baa39b0e
          name: 'Vault tokens revoked'
          type: DEPENDENT
          key: nomad.server.vault.distributed_tokens_revoked
          value_type: FLOAT
          description: 'Count of revoked tokens.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_vault_distributed_tokens_revoking
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: vault
        - uuid: 40c41426ab96476c84647a18511af6e8
          name: 'Vault token last renewal'
          type: DEPENDENT
          key: nomad.server.vault.token_last_renewal
          value_type: FLOAT
          units: s
          description: 'Time since last successful Vault token renewal.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_vault_token_last_renewal
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: vault
        - uuid: f62d8cf1e4b94c9b8796bd30fa799f7a
          name: 'Vault token next renewal'
          type: DEPENDENT
          key: nomad.server.vault.token_next_renewal
          value_type: FLOAT
          units: s
          description: 'Time until next Vault token renewal attempt.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_vault_token_next_renewal
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: vault
        - uuid: c619c340887b43e1a4db750e74f1d4aa
          name: 'Vault token TTL'
          type: DEPENDENT
          key: nomad.server.vault.token_ttl
          value_type: FLOAT
          units: s
          description: 'Time to live for Vault token.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_vault_token_ttl
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: vault
        - uuid: 921fc50044f94aceaa9d0789be854496
          name: 'Nomad server version'
          type: DEPENDENT
          key: nomad.server.version
          value_type: CHAR
          description: 'Nomad server version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.body.config.Version.Version
          master_item:
            key: nomad.server.stats.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 3c7dfd5ec21144b6b58c603d60142200
              expression: 'change(/HashiCorp Nomad Server by HTTP/nomad.server.version)<>0'
              name: 'HashiCorp Nomad Server: Nomad server version has changed'
              event_name: 'HashiCorp Nomad Server: Nomad server version has changed to {ITEM.LASTVALUE}'
              priority: INFO
              description: 'Nomad server version has changed.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: d769576e16df4aed86004498055d5a94
          name: 'Virtual memory size'
          type: DEPENDENT
          key: nomad.server.virtual_memory_bytes
          value_type: FLOAT
          units: B
          description: 'Virtual memory size in bytes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_virtual_memory_bytes
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: memory
        - uuid: d1addab9628140b09adb60c2820c1829
          name: 'Worker evaluation create time'
          type: DEPENDENT
          key: nomad.server.worker.create_eval
          value_type: FLOAT
          units: s
          description: 'Time elapsed for worker to create an eval.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_worker_dequeue_eval_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: workers
        - uuid: 0875726948384b9696158d4db2b64691
          name: 'Worker evaluation dequeue time'
          type: DEPENDENT
          key: nomad.server.worker.dequeue_eval
          value_type: FLOAT
          units: s
          description: 'Time elapsed for worker to dequeue an eval.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_worker_dequeue_eval_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: workers
        - uuid: 5bc2cf7713274e1ca8997415f26f7087
          name: 'Worker invoke scheduler time'
          type: DEPENDENT
          key: nomad.server.worker.invoke_scheduler_service
          value_type: FLOAT
          units: s
          description: 'Time elapsed for worker to invoke the scheduler.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_worker_invoke_scheduler_service_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: workers
        - uuid: c21aca97ba274913860b28a1fd06abec
          name: 'Worker acknowledgement send time'
          type: DEPENDENT
          key: nomad.server.worker.send_ack
          value_type: FLOAT
          units: s
          description: 'Time elapsed for worker to send acknowledgement.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_worker_send_ack_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: workers
        - uuid: 3c7b49c3f60e4d69981f6dd3569e49e6
          name: 'Worker submit plan time'
          type: DEPENDENT
          key: nomad.server.worker.submit_plan
          value_type: FLOAT
          units: s
          description: 'Time elapsed for worker to submit plan.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_worker_submit_plan_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: workers
        - uuid: f5cd72ca250f402f9ddd112fb858d1f7
          name: 'Worker update evaluation time'
          type: DEPENDENT
          key: nomad.server.worker.update_eval
          value_type: FLOAT
          units: s
          description: 'Time elapsed for worker to submit updated eval.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_worker_update_eval_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: workers
        - uuid: ae2e69196ef7416481e9904d9ee8862b
          name: 'Worker log replication time'
          type: DEPENDENT
          key: nomad.server.worker.wait_for_index
          value_type: FLOAT
          units: s
          description: 'Time elapsed that worker waits for the raft index of the eval to be processed.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - nomad_nomad_worker_wait_for_index_sum
                - value
                - ''
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1.0E-9'
          master_item:
            key: nomad.server.metrics.get
          tags:
            - tag: component
              value: workers
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: containers
        - tag: subclass
          value: deploy
        - tag: subclass
          value: development
        - tag: target
          value: nomad-server
      macros:
        - macro: '{$NOMAD.API.RESPONSE.SUCCESS}'
          value: '200'
          description: 'HTTP API successful response code. Availability triggers threshold. Change, if needed.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'API success code'
            description: 'HTTP API successful response code. Availability triggers threshold. Change, if needed.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.DATA.TIMEOUT}'
          value: 15s
          description: 'Response timeout for an API.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'API response timeout'
            description: 'Response timeout for an API.'
        - macro: '{$NOMAD.HTTP.PROXY}'
          description: 'Sets the HTTP proxy for HTTP agent item. If this parameter is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'HTTP proxy'
            description: 'Sets the HTTP proxy for HTTP agent item. If this parameter is empty, then no proxy is used.'
        - macro: '{$NOMAD.OPEN.FDS.MAX}'
          value: '90'
          description: 'Maximum percentage of used file descriptors.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Max file descriptors usage (%)'
            description: 'Maximum percentage of used file descriptors. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.REDUNDANCY.MIN}'
          value: '1'
          description: |
            Amount of redundant servers to keep the cluster safe.
            Default value - '1' for the 3-nodes cluster.
            Change if needed.
          config:
            type: TEXT
            priority: '9'
            section_name: Other
            label: 'Redundant server count'
            description: |
              Amount of redundant servers to keep the cluster safe.
              Default value - '1' for the 3-nodes cluster.
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.SERVER.API.PORT}'
          value: '4646'
          description: 'Nomad SERVER API port.'
          config:
            type: TEXT
            priority: '2'
            label: 'API port'
            description: 'Nomad SERVER API port. In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.SERVER.API.SCHEME}'
          value: http
          description: 'Nomad SERVER API scheme.'
          config:
            type: LIST
            priority: '1'
            label: 'API scheme'
            description: 'Nomad SERVER API scheme.'
            required: 'YES'
            options:
              - value: http
                text: http
              - value: https
                text: https
        - macro: '{$NOMAD.SERVER.LEADER.LATENCY}'
          value: 0.3s
          description: 'Leader last contact latency threshold.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Leader contact latency threshold'
            description: 'Leader last contact latency threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.SERVER.RPC.PORT}'
          value: '4647'
          description: 'Nomad RPC service port.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'RPC service port'
            description: 'In the range from 1 to 65535 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.SERVER.SERF.PORT}'
          value: '4648'
          description: 'Nomad serf service port.'
          config:
            type: TEXT
            priority: '8'
            section_name: Other
            label: 'Serf service port'
            description: 'In the range from 1 to 65535 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NOMAD.TOKEN}'
          description: 'Nomad authentication token.'
          config:
            type: TEXT
            priority: '3'
            label: 'Authentication token'
            description: 'Nomad authentication token.'
            required: 'YES'
      dashboards:
        - uuid: c721ccf33a6f412e994e0ef8c9dc81b5
          name: BoltDB
          pages:
            - name: BoltDB
              widgets:
                - type: item
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.raft.boltdb.txstats.cursor_count
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: graph
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        name: 'HashiCorp Nomad Server: Raft timers'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        name: 'HashiCorp Nomad Server: BoltDB operations'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '15'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        name: 'HashiCorp Nomad Server: BoltDB pages'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: item
                  x: '24'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.raft.boltdb.txstats.node_count
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '48'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.raft.boltdb.txstats.node_deref
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
        - uuid: 5b6b8811398f48ebb4abb73620320211
          name: Cluster
          pages:
            - name: Cluster
              widgets:
                - type: item
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.raft.cluster_role
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: value_size
                      value: '30'
                - type: graph
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        name: 'HashiCorp Nomad Server: Raft timers'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: item
                  'y': '10'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.raft.leader.dispatch_num_logs
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '18'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.autopilot.state
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                    - type: INTEGER
                      name: value_size
                      value: '30'
                - type: item
                  x: '24'
                  'y': '10'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.raft.apply
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '36'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.autopilot.failure_tolerance
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '48'
                  'y': '10'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.raft.applied_index
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '54'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.raft.fsm.autopilot
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
        - uuid: c7f515dd33ee4045b96ffc6d83cec12a
          name: Jobs
          pages:
            - name: Jobs
              widgets:
                - type: item
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_status.running
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  'y': '5'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_summary.running
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  'y': '10'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_summary.queued
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  'y': '15'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.broker.total_ready
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  'y': '20'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.blocked_evals.total_blocked
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '18'
                  'y': '10'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_summary.lost
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '18'
                  'y': '20'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.blocked_evals.total_quota_limit
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '24'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_status.pending
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '24'
                  'y': '5'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_summary.starting
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '24'
                  'y': '15'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.broker.total_pending
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '36'
                  'y': '10'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_summary.failed
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '36'
                  'y': '20'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.blocked_evals.total_escaped
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '48'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_status.dead
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '48'
                  'y': '5'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_summary.complete
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '48'
                  'y': '15'
                  width: '24'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.broker.total_waiting
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '54'
                  'y': '10'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.job_summary.unknown
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  x: '54'
                  'y': '20'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'HashiCorp Nomad Server by HTTP'
                        key: nomad.server.broker.total_unacked
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
      valuemaps:
        - uuid: 9898b464447240919cf8e25016be687f
          name: 'Autopilot state'
          mappings:
            - value: '0'
              newvalue: Unhealthy
            - value: '1'
              newvalue: Healthy
        - uuid: fe32599dc75c48f6ab0887652ceb728c
          name: 'Cluster role'
          mappings:
            - value: '0'
              newvalue: Leader
            - value: '1'
              newvalue: Follower
            - value: '2'
              newvalue: Candidate
        - uuid: b90612059a164f3fa0c7ab871afa0c59
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 2327c665b46e4aa781d41240168c3867
      template: 'Intel SR1630 IPMI'
      name: 'Intel SR1630 IPMI'
      description: |
        Template for monitoring Intel SR1630 server system.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        Template for monitoring Intel SR1630 server system.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: 'Templates/Server hardware'
      items:
        - uuid: 8271dc34162d4657be1a67b5d8a4473b
          name: 'Baseboard Temp'
          type: IPMI
          key: baseboard_temp
          value_type: FLOAT
          units: C
          ipmi_sensor: 'Baseboard Temp'
          tags:
            - tag: component
              value: system
            - tag: component
              value: temperature
          triggers:
            - uuid: 2e1ee68913a34cb78f31d5001f10793d
              expression: 'last(/Intel SR1630 IPMI/baseboard_temp)<5 or last(/Intel SR1630 IPMI/baseboard_temp)>90'
              name: 'Intel SR1630: Baseboard Temp Critical [{ITEM.VALUE}]'
              priority: DISASTER
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
            - uuid: c51b207bcbd041039a1f5a1a7973e262
              expression: 'last(/Intel SR1630 IPMI/baseboard_temp)<10 or last(/Intel SR1630 IPMI/baseboard_temp)>83'
              name: 'Intel SR1630: Baseboard Temp Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: Baseboard Temp Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/baseboard_temp)<5 or last(/Intel SR1630 IPMI/baseboard_temp)>90'
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: d2827f4cc6c4470daf4fd20868ed94c8
          name: 'BB +1.05V PCH'
          type: IPMI
          key: bb_1.05v_pch
          value_type: FLOAT
          units: V
          ipmi_sensor: 'BB +1.05V PCH'
          tags:
            - tag: component
              value: system
            - tag: component
              value: voltage
          triggers:
            - uuid: ec813e0d4ccb48d2af680281034a901f
              expression: 'last(/Intel SR1630 IPMI/bb_1.05v_pch)<0.953 or last(/Intel SR1630 IPMI/bb_1.05v_pch)>1.149'
              name: 'Intel SR1630: BB +1.05V PCH Critical [{ITEM.VALUE}]'
              priority: DISASTER
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
            - uuid: 2b0db1b054f842a4891162fbe33e50e8
              expression: 'last(/Intel SR1630 IPMI/bb_1.05v_pch)<0.985 or last(/Intel SR1630 IPMI/bb_1.05v_pch)>1.117'
              name: 'Intel SR1630: BB +1.05V PCH Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: BB +1.05V PCH Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/bb_1.05v_pch)<0.953 or last(/Intel SR1630 IPMI/bb_1.05v_pch)>1.149'
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
        - uuid: 3bbcfcb625fa4805806601284c3eda20
          name: 'BB +1.1V P1 Vccp'
          type: IPMI
          key: bb_1.1v_p1_vccp
          value_type: FLOAT
          units: V
          ipmi_sensor: 'BB +1.1V P1 Vccp'
          tags:
            - tag: component
              value: system
            - tag: component
              value: voltage
          triggers:
            - uuid: 2e18cf768c2b468eae5549a326325c61
              expression: 'last(/Intel SR1630 IPMI/bb_1.1v_p1_vccp)<0.683 or last(/Intel SR1630 IPMI/bb_1.1v_p1_vccp)>1.543'
              name: 'Intel SR1630: BB +1.1V P1 Vccp Critical [{ITEM.VALUE}]'
              priority: DISASTER
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
            - uuid: 465d51e2a260431dbc7e8e7d39994274
              expression: 'last(/Intel SR1630 IPMI/bb_1.1v_p1_vccp)<0.708 or last(/Intel SR1630 IPMI/bb_1.1v_p1_vccp)>1.501'
              name: 'Intel SR1630: BB +1.1V P1 Vccp Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: BB +1.1V P1 Vccp Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/bb_1.1v_p1_vccp)<0.683 or last(/Intel SR1630 IPMI/bb_1.1v_p1_vccp)>1.543'
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
        - uuid: 350b21b2a569489a9c4c7376bf788a0e
          name: 'BB +1.5V P1 DDR3'
          type: IPMI
          key: bb_1.5v_p1_ddr3
          value_type: FLOAT
          units: V
          ipmi_sensor: 'BB +1.5V P1 DDR3'
          tags:
            - tag: component
              value: system
            - tag: component
              value: voltage
          triggers:
            - uuid: cb2aa635a08c495f9a540c60ce5d1333
              expression: 'last(/Intel SR1630 IPMI/bb_1.5v_p1_ddr3)<1.362 or last(/Intel SR1630 IPMI/bb_1.5v_p1_ddr3)>1.635'
              name: 'Intel SR1630: BB +1.5V P1 DDR3 Critical [{ITEM.VALUE}]'
              priority: DISASTER
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
            - uuid: db42f9fd43f04849a07048f5b5a38a4c
              expression: 'last(/Intel SR1630 IPMI/bb_1.5v_p1_ddr3)<1.401 or last(/Intel SR1630 IPMI/bb_1.5v_p1_ddr3)>1.589'
              name: 'Intel SR1630: BB +1.5V P1 DDR3 Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: BB +1.5V P1 DDR3 Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/bb_1.5v_p1_ddr3)<1.362 or last(/Intel SR1630 IPMI/bb_1.5v_p1_ddr3)>1.635'
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
        - uuid: 6bc6b9c60ce24189b8b0f8a928fab701
          name: 'BB +3.3V'
          type: IPMI
          key: bb_3.3v
          value_type: FLOAT
          units: V
          ipmi_sensor: 'BB +3.3V'
          tags:
            - tag: component
              value: system
            - tag: component
              value: voltage
          triggers:
            - uuid: 9eea7fcd8b574f35aee3e3acb4267f4a
              expression: 'last(/Intel SR1630 IPMI/bb_3.3v)<2.982 or last(/Intel SR1630 IPMI/bb_3.3v)>3.625'
              name: 'Intel SR1630: BB +3.3V Critical [{ITEM.VALUE}]'
              priority: DISASTER
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
            - uuid: 93fd529afb20436f94f9184bb2213335
              expression: 'last(/Intel SR1630 IPMI/bb_3.3v)<3.067 or last(/Intel SR1630 IPMI/bb_3.3v)>3.525'
              name: 'Intel SR1630: BB +3.3V Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: BB +3.3V Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/bb_3.3v)<2.982 or last(/Intel SR1630 IPMI/bb_3.3v)>3.625'
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
        - uuid: aef2b61786354719a6d99f60cff59f14
          name: 'BB +3.3V STBY'
          type: IPMI
          key: bb_3.3v_stby
          value_type: FLOAT
          units: V
          ipmi_sensor: 'BB +3.3V STBY'
          tags:
            - tag: component
              value: system
            - tag: component
              value: voltage
          triggers:
            - uuid: 3f5aa41308714b73ab555e36ecbe889e
              expression: 'last(/Intel SR1630 IPMI/bb_3.3v_stby)<2.982 or last(/Intel SR1630 IPMI/bb_3.3v_stby)>3.625'
              name: 'Intel SR1630: BB +3.3V STBY Critical [{ITEM.VALUE}]'
              priority: DISASTER
              tags:
                - tag: scope
                  value: availability
            - uuid: e631b683ce8f4d0ca5f22adb8ae791c7
              expression: 'last(/Intel SR1630 IPMI/bb_3.3v_stby)<3.067 or last(/Intel SR1630 IPMI/bb_3.3v_stby)>3.525'
              name: 'Intel SR1630: BB +3.3V STBY Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: BB +3.3V STBY Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/bb_3.3v_stby)<2.982 or last(/Intel SR1630 IPMI/bb_3.3v_stby)>3.625'
              tags:
                - tag: scope
                  value: availability
        - uuid: 5a60f33969e54742989571dc2f93be57
          name: 'BB +5.0V'
          type: IPMI
          key: bb_5.0v
          value_type: FLOAT
          units: V
          ipmi_sensor: 'BB +5.0V'
          tags:
            - tag: component
              value: system
            - tag: component
              value: voltage
          triggers:
            - uuid: 54f7b55a71b544bf877b283593a2ca32
              expression: 'last(/Intel SR1630 IPMI/bb_5.0v)<4.471 or last(/Intel SR1630 IPMI/bb_5.0v)>5.538'
              name: 'Intel SR1630: BB +5.0V Critical [{ITEM.VALUE}]'
              priority: DISASTER
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
            - uuid: a1e9f3ba84c54a39a255c682e43e793b
              expression: 'last(/Intel SR1630 IPMI/bb_5.0v)<4.630 or last(/Intel SR1630 IPMI/bb_5.0v)>5.380'
              name: 'Intel SR1630: BB +5.0V Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: BB +5.0V Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/bb_5.0v)<4.471 or last(/Intel SR1630 IPMI/bb_5.0v)>5.538'
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
        - uuid: d59236617a234098b0cd62ac30cba975
          name: 'Front Panel Temp'
          type: IPMI
          key: front_panel_temp
          value_type: FLOAT
          units: C
          ipmi_sensor: 'Front Panel Temp'
          tags:
            - tag: component
              value: system
            - tag: component
              value: temperature
          triggers:
            - uuid: b4b5e024b8b44e9eb3238405a0b1d223
              expression: 'last(/Intel SR1630 IPMI/front_panel_temp)<0 or last(/Intel SR1630 IPMI/front_panel_temp)>48'
              name: 'Intel SR1630: Front Panel Temp Critical [{ITEM.VALUE}]'
              priority: DISASTER
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
            - uuid: b7125d20d8664530a78c9b3b56b2f479
              expression: 'last(/Intel SR1630 IPMI/front_panel_temp)<5 or last(/Intel SR1630 IPMI/front_panel_temp)>44'
              name: 'Intel SR1630: Front Panel Temp Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: Front Panel Temp Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/front_panel_temp)<0 or last(/Intel SR1630 IPMI/front_panel_temp)>48'
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: e4f51e8a51fb4f23afe9d505ede91891
          name: Power
          type: IPMI
          key: power
          ipmi_sensor: power
          tags:
            - tag: component
              value: system
            - tag: component
              value: voltage
          triggers:
            - uuid: dea67d2c71804d369e9b948922a4e86b
              expression: 'last(/Intel SR1630 IPMI/power)=0'
              name: 'Intel SR1630: Power'
              priority: WARNING
              tags:
                - tag: scope
                  value: availability
        - uuid: ede3efc70c794c3390531b41a28411ef
          name: 'System Fan 2'
          type: IPMI
          key: system_fan_2
          value_type: FLOAT
          units: RPM
          ipmi_sensor: 'System Fan 2'
          tags:
            - tag: component
              value: fan
            - tag: component
              value: system
          triggers:
            - uuid: 95653ec3aa484822888818ea0fd6261b
              expression: 'last(/Intel SR1630 IPMI/system_fan_2)<324'
              name: 'Intel SR1630: System Fan 2 Critical [{ITEM.VALUE}]'
              priority: DISASTER
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
            - uuid: 0a6c1831607a4f059e5325fcc11e34cf
              expression: 'last(/Intel SR1630 IPMI/system_fan_2)<378'
              name: 'Intel SR1630: System Fan 2 Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
                - name: 'Intel SR1630: System Fan 2 Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/system_fan_2)<324'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: b51ab327c547413fb94dae69e93458d2
          name: 'System Fan 3'
          type: IPMI
          key: system_fan_3
          value_type: FLOAT
          units: RPM
          ipmi_sensor: 'System Fan 3'
          tags:
            - tag: component
              value: fan
            - tag: component
              value: system
          triggers:
            - uuid: dc2255a797ef424ea22f553f8de53061
              expression: 'last(/Intel SR1630 IPMI/system_fan_3)<324'
              name: 'Intel SR1630: System Fan 3 Critical [{ITEM.VALUE}]'
              priority: DISASTER
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
            - uuid: f1c938c42c6a4933b108da70cb2daf5d
              expression: 'last(/Intel SR1630 IPMI/system_fan_3)<378'
              name: 'Intel SR1630: System Fan 3 Non-Critical [{ITEM.VALUE}]'
              priority: HIGH
              dependencies:
                - name: 'Intel SR1630: Power'
                  expression: 'last(/Intel SR1630 IPMI/power)=0'
                - name: 'Intel SR1630: System Fan 3 Critical [{ITEM.VALUE}]'
                  expression: 'last(/Intel SR1630 IPMI/system_fan_3)<324'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
      tags:
        - tag: class
          value: hardware
        - tag: subclass
          value: server
        - tag: target
          value: intel
        - tag: target
          value: intel-sr1630
      dashboards:
        - uuid: 40f258b8b6a5411fa02d4958d3f7c8c8
          name: 'Intel SR1630 IPMI Overview'
          pages:
            - widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Intel SR1630 IPMI'
                        name: 'Intel SR1630 IPMI: Voltage'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Intel SR1630 IPMI'
                        name: 'Intel SR1630 IPMI: Fan speed and temperature'
                    - type: STRING
                      name: reference
                      value: AAAAB
    - uuid: 12af2a9efcc84c3298bf1654aa96c0db
      template: 'Juniper MX by NETCONF'
      name: 'Juniper MX by NETCONF'
      description: |
        The template for monitoring Juniper MX Series by NETCONF.
        
        NOTE
        This template uses SSH checks with new `subsystem` in item key, available 7.2 and above.
        
        For this template to work, you must enable the NETCONF service. To acquire this information, see the following steps:
        
          1. Enable the NETCONF service on either the default NETCONF port (830) or a user-defined port
             To use the default NETCONF port (830), include the netconf ssh statement at the [edit system services] hierarchy level:
                set netconf ssh
          2. Create a local user account:
                set user zabbix class read-only
                set plain-text-password
          3. Commit the configuration:
                commit
        
        For more details read Enable NETCONF Service over SSH https://www.juniper.net/documentation/us/en/software/junos/netconf/topics/topic-map/netconf-ssh-connection.html.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        The template for monitoring Juniper MX Series by NETCONF.
        
        NOTE
        This template uses SSH checks with new `subsystem` in item key, available 7.2 and above.
        
        For this template to work, you must enable the NETCONF service. To acquire this information, see the following steps:
        
        1. Enable the NETCONF service on either the default NETCONF port (830) or a user-defined port
           To use the default NETCONF port (830), include the netconf ssh statement at the [edit system services] hierarchy level:
           set netconf ssh
        2. Create a local user account:
           set user zabbix class read-only
           set plain-text-password
        3. Commit the configuration:
           commit
        
        For more details read Enable NETCONF Service over SSH https://www.juniper.net/documentation/us/en/software/junos/netconf/topics/topic-map/netconf-ssh-connection.html.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 2ab162e8b47f48018c4e3fccb7f42647
          name: 'Alarm: Get data'
          type: DEPENDENT
          key: juniper.mx.alarm.data.get
          history: '0'
          value_type: TEXT
          description: 'Gets the alarm raw data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.results..["rpc-reply"]["alarm-information"]'
          master_item:
            key: 'ssh.run[JuniperMxResource,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: raw
        - uuid: 1f163e34710d49bead6eea3348b39667
          name: 'BGP: Get data'
          type: DEPENDENT
          key: juniper.mx.bgp.data.get
          history: '0'
          value_type: TEXT
          description: 'Gets BGP raw data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.results..["rpc-reply"]["bgp-information-logical-system-all"]["logical-system"].first()'
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value),
                  	bgp = [],
                  	bgp_peers = [],
                  	bgp_rib = [];
                  
                  function getField(data, path, default_value) {
                  	var steps = path.split('.');
                  	var step = steps.shift();
                  
                  	while (typeof step !== 'undefined') {
                  		if (typeof data === undefined || typeof data[step] === 'undefined') {
                  			return default_value;
                  		}
                  
                  		data = data[step];
                  		step = steps.shift();
                  	}
                  	return data;
                  };
                  
                  data.forEach(function (item) {
                  	var name = getField(item, 'name'),
                  		bgp_information = getField(item, 'bgp-information', {}),
                  		bgp_peer = getField(bgp_information, 'bgp-peer', {}),
                  		bgp_peer = Array.isArray(bgp_peer) ? bgp_peer : [bgp_peer],
                  		output = getField(item, 'output');
                  
                  	if (bgp_peer && output !== "BGP is not running") {
                  		bgp_peer.forEach(function (peer) {
                  			var peer_rib = getField(peer, 'bgp-rib', {});
                  			var peer_rib = Array.isArray(peer_rib) ? peer_rib : [peer_rib];
                  			bgp_peers.push({
                  				router_name: name,
                  				peer_address: getField(peer, 'peer-address'),
                  				peer_as: getField(peer, 'peer-as'),
                  				elapsed_time: getField(peer, 'elapsed-time.@seconds'),
                  				flap_count: getField(peer, 'flap-count'),
                  				bgp_thread_mode: getField(bgp_information, 'bgp-thread-mode'),
                  				peer_state: getField(peer, 'peer-state.#text')
                  			});
                  			peer_rib.forEach(function (rib) {
                  				bgp_rib.push({
                  					router_name: name,
                  					name: getField(rib, 'name'),
                  					peer_address: getField(peer, 'peer-address'),
                  					peer_as: getField(peer, 'peer-as'),
                  					suppressed: getField(rib, 'suppressed-prefix-count'),
                  					received: getField(rib, 'received-prefix-count'),
                  					active: getField(rib, 'active-prefix-count'),
                  					accepted: getField(rib, 'accepted-prefix-count')
                  				});
                  			});
                  
                  		});
                  		bgp.push({
                  			router_name: name,
                  			down_peer_count: getField(bgp_information, 'down-peer-count'),
                  			peer_count: getField(bgp_information, 'peer-count'),
                  			bgp_thread_mode: getField(bgp_information, 'bgp-thread-mode')
                  		});
                  	}
                  });
                  
                  return JSON.stringify({ bgp, bgp_peers, bgp_rib });
          master_item:
            key: 'ssh.run[JuniperMxBgpOspf,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: raw
        - uuid: 4e9b028477334864a44df3010e14e896
          name: 'Routing protocols: Get rpc error'
          type: DEPENDENT
          key: juniper.mx.bgp.ospf.error
          value_type: TEXT
          description: 'Checks that the remote procedure call metrics and data have been received correctly.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.results..content.first()
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'ssh.run[JuniperMxBgpOspf,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 87413ff584ce42998fed3f81eadf1563
              expression: 'length(last(/Juniper MX by NETCONF/juniper.mx.bgp.ospf.error))>0'
              name: 'Juniper MX: Failed to get routing protocol data'
              event_name: 'Juniper MX: Failed to get metrics for routing protocol using RPC request'
              opdata: 'Current error: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Failed to get metrics for the routing protocol.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 6585ba2128f6407090e1fc65b8798da0
          name: 'DOM: Get rpc error'
          type: DEPENDENT
          key: juniper.mx.dom.error
          value_type: TEXT
          description: 'Checks that the remote procedure call metrics and data have been received correctly.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'ssh.run[JuniperMxDom,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: dfcb87a11df74d7ab3247f668f4d6819
              expression: 'length(last(/Juniper MX by NETCONF/juniper.mx.dom.error))>0'
              name: 'Juniper MX: Failed to get DOM data'
              event_name: 'Juniper MX: Failed to get metrics for interface optics diagnostics information using RPC request'
              opdata: 'Current error: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Failed to get metrics for interface optics diagnostics information.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 2656571ab9914ccfa7079c4a5578e30f
          name: 'FAN: Get data'
          type: DEPENDENT
          key: juniper.mx.fan.data.get
          history: '0'
          value_type: TEXT
          description: 'Gets FAN raw data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.results..["rpc-reply"]["fan-information"]["fan-information-percent-rpm-item"].first()'
          master_item:
            key: 'ssh.run[JuniperMxResource,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: raw
        - uuid: a5a7b97ba77e481d88e0372543524d61
          name: 'FPC: Get data'
          type: DEPENDENT
          key: juniper.mx.fpc.data.get
          history: '0'
          value_type: TEXT
          description: 'Gets raw data information for Packet Forwarding Engines (FPC).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.results..["rpc-reply"]["fpc-information"]["fpc"]'
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  
                  function mergeSlot(input) {
                  	var result = [],
                  		slot_map = {},
                  		arrays = Array.isArray(input[0]) ? input : [input];
                  
                  	arrays.forEach(function (array) {
                  		array.forEach(function (obj) {
                  			var slot = obj.slot;
                  			if (!slot_map.hasOwnProperty(slot)) {
                  				slot_map[slot] = {};
                  			}
                  
                  			Object.keys(obj).forEach(function (key) {
                  				if (key !== 'slot') {
                  					slot_map[slot][key] = obj[key];
                  				}
                  			});
                  
                  			slot_map[slot]['slot'] = slot;
                  		});
                  	});
                  
                  	Object.keys(slot_map).forEach(function (key) {
                  		result.push(slot_map[key]);
                  	});
                  
                  	return result;
                  };
                  
                  var mergedData = mergeSlot(data);
                  
                  return JSON.stringify(mergedData);
          master_item:
            key: 'ssh.run[JuniperMxResource,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: raw
        - uuid: 8be3e0378212482e82c2bfe21bbc6459
          name: 'Interface information: Get rpc error'
          type: DEPENDENT
          key: juniper.mx.interface.error
          value_type: TEXT
          description: 'Checks that the remote procedure call metrics and data have been received correctly.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.results..content.first()
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'ssh.run[JuniperMxInterface,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: a5a7ef7092c74a5298ed7fa473123ead
              expression: 'length(last(/Juniper MX by NETCONF/juniper.mx.interface.error))>0'
              name: 'Juniper MX: Failed to get interface information data'
              event_name: 'Juniper MX: Failed to get metrics for interface information using RPC request'
              opdata: 'Current error: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Failed to get metrics for interface information.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 47ee207624e242439704c40754b98056
          name: 'OSPF: Get data'
          type: DEPENDENT
          key: juniper.mx.ospf.data.get
          history: '0'
          value_type: TEXT
          description: 'Gets OSPF raw data.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value),
                  	ospf = [],
                  	ospf3 = [];
                  
                  function getField(data, path, default_value) {
                  	var steps = path.split('.');
                  	var step = steps.shift();
                  
                  	while (typeof step !== 'undefined') {
                  		if (typeof data === undefined || typeof data[step] === 'undefined') {
                  			return default_value;
                  		}
                  
                  		data = data[step];
                  		step = steps.shift();
                  	}
                  	return data;
                  };
                  
                  var ospf_data = getField(data, 'results.2.rpc-reply.ospf-neighbor-information-logical-system-all.logical-system', {});
                  var ospf3_data = getField(data, 'results.3.rpc-reply.ospf3-neighbor-information-logical-system-all.logical-system', {});
                  
                  ospf_data.forEach(function (item) {
                  	var name = getField(item, 'name'),
                  		ospf_information = getField(item, 'ospf-neighbor-information', {}),
                  		ospf_neighbor = getField(ospf_information, 'ospf-neighbor', {}),
                  		ospf_neighbor = Array.isArray(ospf_neighbor) ? ospf_neighbor : [ospf_neighbor],
                  		output = getField(item, 'output');
                  
                  	if (ospf_neighbor && output !== "OSPF instance is not running") {
                  		ospf_neighbor.forEach(function (neighbor) {
                  			ospf.push({
                  				router_name: name,
                  				neighbor_address: getField(neighbor, 'neighbor-address'),
                  				interface_name: getField(neighbor, 'interface-name'),
                  				uptime: getField(neighbor, 'neighbor-up-time.@seconds'),
                  				neighbor_state: getField(neighbor, 'ospf-neighbor-state'),
                  			});
                  		});
                  	}
                  });
                  
                  ospf3_data.forEach(function (item) {
                  	var name = getField(item, 'name'),
                  		ospf_information = getField(item, 'ospf3-neighbor-information', {}),
                  		ospf_neighbor = getField(ospf_information, 'ospf3-neighbor', {}),
                  		ospf_neighbor = Array.isArray(ospf_neighbor) ? ospf_neighbor : [ospf_neighbor],
                  		output = getField(item, 'output');
                  
                  	if (ospf_neighbor && output !== "OSPF instance is not running") {
                  		ospf_neighbor.forEach(function (neighbor) {
                  			ospf3.push({
                  				router_name: name,
                  				neighbor_address: getField(neighbor, 'neighbor-address'),
                  				interface_name: getField(neighbor, 'interface-name'),
                  				uptime: getField(neighbor, 'neighbor-up-time.@seconds'),
                  				neighbor_state: getField(neighbor, 'ospf-neighbor-state'),
                  			});
                  		});
                  	}
                  });
                  
                  return JSON.stringify({ ospf, ospf3 });
          master_item:
            key: 'ssh.run[JuniperMxBgpOspf,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: raw
        - uuid: d0d76f6d630b46268d16d150981bfd52
          name: 'PEM: Get data'
          type: DEPENDENT
          key: juniper.mx.pem.data.get
          history: '0'
          value_type: TEXT
          description: 'Gets PEM raw data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.results..["rpc-reply"]["environment-component-information"]["environment-component-item"].first()'
          master_item:
            key: 'ssh.run[JuniperMxResource,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: raw
        - uuid: 236c11c6d9974ba793906551070f5d9c
          name: 'Resource: Get rpc error'
          type: DEPENDENT
          key: juniper.mx.resource.error
          value_type: TEXT
          description: 'Checks that the remote procedure call metrics and data have been received correctly.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.results..content.first()
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'ssh.run[JuniperMxResource,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 8024cb1b52674ead8078349570742f0e
              expression: 'length(last(/Juniper MX by NETCONF/juniper.mx.resource.error))>0'
              name: 'Juniper MX: Failed to get resource data'
              event_name: 'Juniper MX: Failed to get metrics for resource using RPC request'
              opdata: 'Current error: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Failed to get metrics for the resource.'
              tags:
                - tag: scope
                  value: availability
        - uuid: a62d84c9063b49c7b54d34e1e43cc01e
          name: 'Routing Engine: Get data'
          type: DEPENDENT
          key: juniper.mx.routing.engine.data.get
          history: '0'
          value_type: TEXT
          description: 'Gets Routing Engine information raw data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.results..["rpc-reply"]["route-engine-information"]["route-engine"]'
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  
                  function addSlot(arr) {
                  	for (var i = 0; i < arr.length; i++) {
                  		if (!arr[i].hasOwnProperty('slot')) {
                  			arr[i]['slot'] = '0';
                  		}
                  	}
                  	return arr;
                  }
                  
                  data = addSlot(data);
                  
                  return JSON.stringify(data);
          master_item:
            key: 'ssh.run[JuniperMxResource,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: raw
        - uuid: 9b76281cf92f4c63805afd7fbfe8a79c
          name: 'Storage: Get data'
          type: DEPENDENT
          key: juniper.mx.storage.data.get
          history: '0'
          value_type: TEXT
          description: 'Gets storage raw data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.results..["rpc-reply"]["system-storage-information"]["filesystem"].first()'
          master_item:
            key: 'ssh.run[JuniperMxResource,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: raw
        - uuid: 4a84cb99fe78404f8eae5b9b5e682baa
          name: 'Temperature: Get data'
          type: DEPENDENT
          key: juniper.mx.temperature.data.get
          history: '0'
          value_type: TEXT
          description: 'Gets temperature raw data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.results..["rpc-reply"]["environment-information"]["environment-item"].first()'
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  
                  function addClass(arr) {
                  	for (var i = 0; i < arr.length; i++) {
                  		if (!arr[i].hasOwnProperty('class')) {
                  			arr[i]['class'] = 'Unknown';
                  		}
                  	}
                  	return arr;
                  }
                  
                  data = addClass(data);
                  
                  return JSON.stringify(data);
          master_item:
            key: 'ssh.run[JuniperMxResource,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          tags:
            - tag: component
              value: raw
        - uuid: a5f2e862b7d04ebea583840735ca359b
          name: 'NETCONF: Service response time'
          type: SIMPLE
          key: 'net.tcp.service.perf[ssh,"{$JUNIPER.MX.NETCONF.IP}","{$JUNIPER.MX.NETCONF.PORT}"]'
          value_type: FLOAT
          units: s
          description: |
            Checks the performance of a TCP service.
            Possible values: a float representing the response time in seconds, or `0.000000` indicating the service is down.
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: ff60b0ce48d94a7da65db91333507df3
              expression: 'min(/Juniper MX by NETCONF/net.tcp.service.perf[ssh,"{$JUNIPER.MX.NETCONF.IP}","{$JUNIPER.MX.NETCONF.PORT}"],5m)>{$JUNIPER.MX.NETCONF.RESPONSE_TIME.MAX.WARN}'
              name: 'Juniper MX: NETCONF response time is too high'
              event_name: 'Juniper MX: NETCONF response time is too high (over {$JUNIPER.MX.NETCONF.RESPONSE_TIME.MAX.WARN}s for 5m)'
              opdata: 'Response time: {ITEM.LASTVALUE1}'
              priority: WARNING
              manual_close: 'YES'
              dependencies:
                - name: 'Juniper MX: NETCONF is not available'
                  expression: 'last(/Juniper MX by NETCONF/net.tcp.service[ssh,"{$JUNIPER.MX.NETCONF.IP}","{$JUNIPER.MX.NETCONF.PORT}"])=0'
              tags:
                - tag: scope
                  value: performance
        - uuid: ce22a1eda3874f8c9df95f932b918d5f
          name: 'NETCONF: Service status'
          type: SIMPLE
          key: 'net.tcp.service[ssh,"{$JUNIPER.MX.NETCONF.IP}","{$JUNIPER.MX.NETCONF.PORT}"]'
          description: |
            Checks if a service is running and accepting NETCONF connections.
            Possible values: 0 - the service is down; 1 - the service is running.
          valuemap:
            name: 'Service status'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: fb93ede78cb9412b86391f775b8fcfc2
              expression: 'last(/Juniper MX by NETCONF/net.tcp.service[ssh,"{$JUNIPER.MX.NETCONF.IP}","{$JUNIPER.MX.NETCONF.PORT}"])=0'
              name: 'Juniper MX: NETCONF is not available'
              opdata: 'Current status: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'NETCONF is unavailable on the specified TCP port. Possible causes include service downtime, port blockage, or network issues.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: bf26f0a8e3e7481692c4150217a3802b
          name: 'Routing protocols: Get data'
          type: SSH
          key: 'ssh.run[JuniperMxBgpOspf,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          delay: 0;s15
          history: '0'
          value_type: TEXT
          params: |
            <rpc>
                <get-bgp-summary-information>
                        <logical-system>all</logical-system>
                </get-bgp-summary-information>
            </rpc>
            ]]>]]>
            <rpc>
                <get-ospf-neighbor-information>
                    <logical-system>all</logical-system>
                    <detail/>
                </get-ospf-neighbor-information>
            </rpc>
            ]]>]]>
            <rpc>
                <get-ospf3-neighbor-information>
                    <logical-system>all</logical-system>
                    <detail/>
                </get-ospf3-neighbor-information>
            </rpc>
            ]]>]]>
            <rpc>
                <close-session/>
            </rpc>
            ]]>]]>
          username: '{$JUNIPER.MX.NETCONF.USERNAME}'
          password: '{$JUNIPER.MX.NETCONF.PASSWORD}'
          description: 'Gets routing protocol information data using the RPC request NETCONF server.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var parts = value.split(']]>]]>'),
                  	results = [],
                  	skipped_parts = [];
                  
                  function cleanObject(obj) {
                  	if (Array.isArray(obj)) {
                  		return obj.map(cleanObject);
                  	} else if (typeof obj === 'object' && obj !== null) {
                  		var cleaned_obj = {};
                  		for (var key in obj) {
                  			if (obj.hasOwnProperty(key)) {
                  				cleaned_obj[key] = cleanObject(obj[key]);
                  			}
                  		}
                  		return cleaned_obj;
                  	} else if (typeof obj === 'string') {
                  		return obj.replace(/\n/g, "");
                  	}
                  	return obj;
                  };
                  
                  for (var i = 0; i < parts.length; i++) {
                  	var part = parts[i].trim();
                  	if (part) {
                  		if (part.startsWith('<!--') && part.endsWith('-->')) {
                  			skipped_parts.push({ skipped: 'comment in XML', content: part });
                  			continue
                  		}
                  
                  		try {
                  			results.push(JSON.parse(XML.toJson(part)));
                  		} catch (error) {
                  			results.push({ error: "Failed to parse XML response " + i, content: part });
                  		}
                  	}
                  };
                  
                  results = cleanObject(results);
                  
                  return JSON.stringify({ results, skipped_parts });
          timeout: '{$JUNIPER.MX.NETCONF.TIMEOUT}'
          tags:
            - tag: component
              value: raw
        - uuid: b08e9571da564af3bfcefcde64221d1f
          name: 'DOM: Get data'
          type: SSH
          key: 'ssh.run[JuniperMxDom,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          delay: 0;s30
          history: '0'
          value_type: TEXT
          params: |
            <rpc>
                <get-interface-optics-diagnostics-information>
                </get-interface-optics-diagnostics-information>
            </rpc>
            ]]>]]>
            <rpc>
                <close-session/>
            </rpc>
            ]]>]]>
          username: '{$JUNIPER.MX.NETCONF.USERNAME}'
          password: '{$JUNIPER.MX.NETCONF.PASSWORD}'
          description: 'Gets interface optics diagnostics information using the RPC request NETCONF server.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var parts = value.split(']]>]]>'),
                  	results = [],
                  	skipped_parts = [];
                  
                  function cleanObject(obj) {
                  	if (Array.isArray(obj)) {
                  		return obj.map(cleanObject);
                  	} else if (typeof obj === 'object' && obj !== null) {
                  		var cleaned_obj = {};
                  		for (var key in obj) {
                  			if (obj.hasOwnProperty(key)) {
                  				cleaned_obj[key] = cleanObject(obj[key]);
                  			}
                  		}
                  		return cleaned_obj;
                  	} else if (typeof obj === 'string') {
                  		return obj.replace(/\n/g, "");
                  	}
                  	return obj;
                  };
                  
                  for (var i = 0; i < parts.length; i++) {
                  	var part = parts[i].trim();
                  	if (part) {
                  		if (part.startsWith('<!--') && part.endsWith('-->')) {
                  			skipped_parts.push({ skipped: 'comment in XML', content: part });
                  			continue
                  		}
                  
                  		try {
                  			results.push(JSON.parse(XML.toJson(part)));
                  		} catch (error) {
                  			results.push({ error: "Failed to parse XML response " + i, content: part });
                  		}
                  	}
                  };
                  
                  results = cleanObject(results);
                  
                  return JSON.stringify({ results, skipped_parts });
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value),
                  	metrics = [],
                  	alarms = [],
                  	error;
                  
                  function getField(data, path, default_value) {
                  	var steps = path.split('.');
                  	var step = steps.shift();
                  
                  	while (typeof step !== 'undefined') {
                  		if (typeof data === undefined || typeof data[step] === 'undefined') {
                  			return default_value;
                  		}
                  
                  		data = data[step];
                  		step = steps.shift();
                  	}
                  	return data;
                  };
                  
                  var result = data.results[1];
                  
                  if (typeof result[error] === undefined || result['rpc-reply'] !== undefined) {
                  
                  	var dom = getField(result, 'rpc-reply.interface-information.physical-interface');
                  
                  	dom.forEach(function (item) {
                  		var name = getField(item, 'name'),
                  			diagnostics = getField(item, 'optics-diagnostics'),
                  			lane_values = getField(diagnostics, 'optics-diagnostics-lane-values');
                  
                  		if (lane_values) {
                  			lane_values.forEach(function (lane) {
                  				metrics.push({
                  					name: name,
                  					lane_index: getField(lane, 'lane-index'),
                  					multi: 1,
                  					tx_power: getField(lane, 'laser-output-power-dbm'),
                  					rx_power: getField(lane, 'laser-rx-optical-power')
                  				});
                  
                  				alarms.push({
                  					name: name,
                  					lane_index: getField(lane, 'lane-index'),
                  					tx_loss_signal: getField(lane, 'tx-loss-of-signal-functionality-alarm'),
                  					tx_laser_disabled: getField(lane, 'tx-laser-disabled-alarm'),
                  					bias_high: getField(lane, 'laser-bias-current-high-alarm'),
                  					bias_low: getField(lane, 'laser-bias-current-low-alarm'),
                  					rx_loss_signal: getField(lane, 'rx-loss-of-signal-alarm'),
                  					rx_high: getField(lane, 'laser-rx-power-high-alarm'),
                  					rx_low: getField(lane, 'laser-rx-power-low-alarm'),
                  					voltage_high: getField(diagnostics, 'module-voltage-high-alarm'),
                  					voltage_low: getField(diagnostics, 'module-voltage-low-alarm'),
                  					temperature_high: getField(diagnostics, 'module-temperature-high-alarm'),
                  					temperature_low: getField(diagnostics, 'module-temperature-low-alarm')
                  				});
                  			});
                  		} else {
                  			metrics.push({
                  				name: name,
                  				lane_index: 0,
                  				multi: 0,
                  				tx_power: getField(diagnostics, 'laser-output-power-dbm'),
                  				rx_power: getField(diagnostics, 'rx-signal-avg-optical-power-dbm')
                  			});
                  			alarms.push({
                  				name: name,
                  				lane_index: 0,
                  				bias_high: getField(diagnostics, 'laser-bias-current-high-alarm'),
                  				bias_low: getField(diagnostics, 'laser-bias-current-low-alarm'),
                  				rx_high: getField(diagnostics, 'laser-rx-power-high-alarm'),
                  				rx_low: getField(diagnostics, 'laser-rx-power-low-alarm'),
                  				tx_high: getField(diagnostics, 'laser-tx-power-high-alarm'),
                  				tx_low: getField(diagnostics, 'laser-tx-power-low-alarm'),
                  				voltage_high: getField(diagnostics, 'module-voltage-high-alarm'),
                  				voltage_low: getField(diagnostics, 'module-voltage-low-alarm'),
                  				temperature_high: getField(diagnostics, 'module-temperature-high-alarm'),
                  				temperature_low: getField(diagnostics, 'module-temperature-low-alarm')
                  			});
                  		}
                  	});
                  }
                  else {
                  	error = result.content;
                  };
                  
                  return JSON.stringify({ metrics, alarms, error });
          timeout: '{$JUNIPER.MX.NETCONF.TIMEOUT}'
          tags:
            - tag: component
              value: raw
        - uuid: 5087b2674f6f42128e865119aac94a64
          name: 'Interface information: Get data'
          type: SSH
          key: 'ssh.run[JuniperMxInterface,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          delay: 0;s00
          history: '0'
          value_type: TEXT
          params: |
            <rpc>
                <get-interface-information>
                        <statistics/>
                        <detail/>
                </get-interface-information>
            </rpc>
            ]]>]]>
            <rpc>
                <close-session/>
            </rpc>
            ]]>]]>
          username: '{$JUNIPER.MX.NETCONF.USERNAME}'
          password: '{$JUNIPER.MX.NETCONF.PASSWORD}'
          description: 'Gets interface information using the RPC request NETCONF server.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var parts = value.split(']]>]]>'),
                  	results = [],
                  	skipped_parts = [];
                  
                  function cleanObject(obj) {
                  	if (Array.isArray(obj)) {
                  		return obj.map(cleanObject);
                  	} else if (typeof obj === 'object' && obj !== null) {
                  		var cleaned_obj = {};
                  		for (var key in obj) {
                  			if (obj.hasOwnProperty(key)) {
                  				cleaned_obj[key] = cleanObject(obj[key]);
                  			}
                  		}
                  		return cleaned_obj;
                  	} else if (typeof obj === 'string') {
                  		return obj.replace(/\n/g, "");
                  	}
                  	return obj;
                  };
                  
                  for (var i = 0; i < parts.length; i++) {
                  	var part = parts[i].trim();
                  	if (part) {
                  		if (part.startsWith('<!--') && part.endsWith('-->')) {
                  			skipped_parts.push({ skipped: 'comment in XML', content: part });
                  			continue
                  		}
                  
                  		try {
                  			results.push(JSON.parse(XML.toJson(part)));
                  		} catch (error) {
                  			results.push({ error: "Failed to parse XML response " + i, content: part });
                  		}
                  	}
                  };
                  
                  results = cleanObject(results);
                  
                  return JSON.stringify({ results, skipped_parts });
          timeout: '{$JUNIPER.MX.NETCONF.TIMEOUT}'
          tags:
            - tag: component
              value: raw
        - uuid: b6f6235bfc6a42238cf6e03ebf43d00d
          name: 'Resource: Get data'
          type: SSH
          key: 'ssh.run[JuniperMxResource,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          delay: 0;s45
          history: '0'
          value_type: TEXT
          params: |
            <rpc>
                <get-fpc-information>
                </get-fpc-information>
            </rpc>
            ]]>]]>
            <rpc>
                <get-fpc-information>
                        <detail/>
                </get-fpc-information>
            </rpc>
            ]]>]]>
            <rpc>
                <get-route-engine-information>
                </get-route-engine-information>
            </rpc>
            ]]>]]>
            <rpc>
                <get-alarm-information>
                </get-alarm-information>
            </rpc>
            ]]>]]>
            <rpc>
                <get-system-storage>
                </get-system-storage>
            </rpc>
            ]]>]]>
            <rpc>
                <get-environment-information>
                </get-environment-information>
            </rpc>
            ]]>]]>
            <rpc>
                <get-environment-pem-information>
                </get-environment-pem-information>
            </rpc>
            ]]>]]>
            <rpc>
                <get-fan-information>
                </get-fan-information>
            </rpc>
            ]]>]]>
            <rpc>
                <close-session/>
            </rpc>
            ]]>]]>
          username: '{$JUNIPER.MX.NETCONF.USERNAME}'
          password: '{$JUNIPER.MX.NETCONF.PASSWORD}'
          description: 'Gets resource information data using the RPC request NETCONF server.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var parts = value.split(']]>]]>'),
                  	results = [],
                  	skipped_parts = [];
                  
                  function cleanObject(obj) {
                  	if (Array.isArray(obj)) {
                  		return obj.map(cleanObject);
                  	} else if (typeof obj === 'object' && obj !== null) {
                  		var cleaned_obj = {};
                  		for (var key in obj) {
                  			if (obj.hasOwnProperty(key)) {
                  				cleaned_obj[key] = cleanObject(obj[key]);
                  			}
                  		}
                  		return cleaned_obj;
                  	} else if (typeof obj === 'string') {
                  		return obj.replace(/\n/g, "");
                  	}
                  	return obj;
                  };
                  
                  for (var i = 0; i < parts.length; i++) {
                  	var part = parts[i].trim();
                  	if (part) {
                  		if (part.startsWith('<!--') && part.endsWith('-->')) {
                  			skipped_parts.push({ skipped: 'comment in XML', content: part });
                  			continue
                  		}
                  
                  		try {
                  			results.push(JSON.parse(XML.toJson(part)));
                  		} catch (error) {
                  			results.push({ error: "Failed to parse XML response " + i, content: part });
                  		}
                  	}
                  };
                  
                  results = cleanObject(results);
                  
                  return JSON.stringify({ results, skipped_parts });
          timeout: '{$JUNIPER.MX.NETCONF.TIMEOUT}'
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: f48d3c13f70d481285ce4af92c297b82
          name: 'Alarm discovery'
          type: DEPENDENT
          key: juniper.mx.alarm.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ALARM_CLASS}'
                value: '{$JUNIPER.MX.ALARM.CLASS.MATCHES}'
              - macro: '{#ALARM_CLASS}'
                value: '{$JUNIPER.MX.ALARM.CLASS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ALARM_NAME}'
                value: '{$JUNIPER.MX.ALARM.NAME.MATCHES}'
              - macro: '{#ALARM_NAME}'
                value: '{$JUNIPER.MX.ALARM.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Scanning `show system alarms` for alarms.'
          item_prototypes:
            - uuid: 35604dbe296949dd807fca20e11973dc
              name: 'Alarm [{#ALARM_NAME}]: Get data'
              type: DEPENDENT
              key: 'juniper.mx.alarm.get.data["{#ALARM_NAME}"]'
              history: '0'
              value_type: TEXT
              description: 'Gets system alarm data about the state and the alarm reason.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.["alarm-detail"]["alarm-short-description"] == "{#ALARM_NAME}")].first()'
              master_item:
                key: juniper.mx.alarm.data.get
              tags:
                - tag: class
                  value: '{#ALARM_TYPE}'
                - tag: component
                  value: raw
            - uuid: 5f553388d97b41f9bfe8a4e72a5b7b15
              name: 'Alarm [{#ALARM_NAME}]: Severity'
              type: DEPENDENT
              key: 'juniper.mx.alarm.severity["{#ALARM_NAME}"]'
              description: |
                Alarms can be categorized in one of four severities: critical, major, minor, and info.
                Alarm description: '[{#ALARM_DESCR}]'
              valuemap:
                name: 'Alarm severity'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.["alarm-detail"]["alarm-class"]'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return [''Info'', ''Minor'', ''Major'', ''Critical''].indexOf(value) + 1 || ''Problem with status processing in JS, no such Alarm Severity: '' + value;'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'juniper.mx.alarm.get.data["{#ALARM_NAME}"]'
              tags:
                - tag: class
                  value: '{#ALARM_TYPE}'
                - tag: component
                  value: alarms
              trigger_prototypes:
                - uuid: 836ae1c312a548a7b14471cbb43b10a8
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.alarm.severity["{#ALARM_NAME}"])=4'
                  name: 'Juniper MX: [{#ALARM_NAME}] has ''Critical'' state'
                  priority: HIGH
                  description: |
                    Alarm '[{#ALARM_NAME}]' is of the severity `Critical`.
                    Reason: '[{#ALARM_DESCR}]'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 59b59dd9c02a4c50b743c7b5ec746083
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.alarm.severity["{#ALARM_NAME}"])=3'
                  name: 'Juniper MX: [{#ALARM_NAME}] has ''Major'' state'
                  priority: AVERAGE
                  description: |
                    Alarm '[{#ALARM_NAME}]' is of the severity `Major`.
                    Reason: '[{#ALARM_DESCR}]'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: juniper.mx.alarm.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var alarms = JSON.parse(value);
                  
                  var result = alarms.map(function (alarm) {
                  	summary = alarm['alarm-summary']
                  	if (summary['no-active-alarms'] !== null) {
                  		return {
                  			'{#ALARM_DESCR}': alarm['alarm-detail']['alarm-description'] !== null ? alarm['alarm-detail']['alarm-description'] : 'None',
                  			'{#ALARM_CLASS}': alarm['alarm-detail']['alarm-class'],
                  			'{#ALARM_TYPE}': alarm['alarm-detail']['alarm-type'],
                  			'{#ALARM_NAME}': alarm['alarm-detail']['alarm-short-description']
                  		};
                  	} else {
                  		return {
                  			'{#ALARM_NAME}': 'no-active-alarms',
                  			'{#ALARM_CLASS}': ''
                  		}
                  	};
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'No active alarms'
              step: '1'
              filter:
                conditions:
                  - macro: '{#ALARM_NAME}'
                    value: no-active-alarms
              operations:
                - operator: LIKE
                  value: ': Get data'
                  discover: NO_DISCOVER
                - operator: LIKE
                  value: ': Severity'
                  discover: NO_DISCOVER
        - uuid: c6243e5241df4bcab940800ef0e1045a
          name: 'BGP Peer discovery'
          type: DEPENDENT
          key: juniper.mx.bgp.peer.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#BGP_PEER_REMOTE_ADDR}'
                value: '{$JUNIPER.MX.BGP.PEER.REMOTE.ADDR.MATCHES}'
              - macro: '{#BGP_PEER_REMOTE_ADDR}'
                value: '{$JUNIPER.MX.BGP.PEER.REMOTE.ADDR.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#BGP_ROUTER_NAME}'
                value: '{$JUNIPER.MX.BGP.ROUTER.NAME.MATCHES}'
              - macro: '{#BGP_ROUTER_NAME}'
                value: '{$JUNIPER.MX.BGP.ROUTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'BGP peer discovery.'
          item_prototypes:
            - uuid: aec2303e8f11405eb85c563260aacfdb
              name: 'BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}]: Established time'
              type: DEPENDENT
              key: 'juniper.mx.bgp.elapsed.time["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}"]'
              units: s
              description: 'This timer indicates how long (in seconds) this peer has been in the Established state or how long since this peer was last in the Established state. It is set to zero when a new peer is configured or the router is booted.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.elapsed_time
              master_item:
                key: 'juniper.mx.bgp.get["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}"]'
              tags:
                - tag: address
                  value: '{#BGP_PEER_REMOTE_ADDR}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
            - uuid: 215fda243f994ade87d040e54d4313ac
              name: 'BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}]: Flap count'
              type: DEPENDENT
              key: 'juniper.mx.bgp.flap.count["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}"]'
              description: 'Flap count is the total number of BGP session flaps from a router.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.flap_count
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'juniper.mx.bgp.get["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}"]'
              tags:
                - tag: address
                  value: '{#BGP_PEER_REMOTE_ADDR}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
            - uuid: ff6fabc5daa14f44938d8655a8091875
              name: 'BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}]: Get metrics data'
              type: DEPENDENT
              key: 'juniper.mx.bgp.get["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}"]'
              history: '0'
              value_type: TEXT
              description: 'Gets BGP raw data for router ''[{#BGP_ROUTER_NAME}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.bgp_peers[?(@.router_name == "{#BGP_ROUTER_NAME}" && @.peer_address == "{#BGP_PEER_REMOTE_ADDR}" && @.peer_as == "{#BGP_PEER_REMOTE_AS}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: juniper.mx.bgp.data.get
              tags:
                - tag: address
                  value: '{#BGP_PEER_REMOTE_ADDR}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: component
                  value: raw
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
            - uuid: 9cdaeb69fa2c4f81b4ccb9abe5a88098
              name: 'BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}]: State'
              type: DEPENDENT
              key: 'juniper.mx.bgp.state["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}"]'
              description: 'The remote BGP peer''s FSM state.'
              valuemap:
                name: 'BGP peer state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.peer_state
                - type: JAVASCRIPT
                  parameters:
                    - 'return [''Idle'', ''Connect'', ''Active'', ''OpenSent'', ''OpenConfirm'', ''Established''].indexOf(value) + 1 || ''Problem with status processing in JS, no such BGP state: '' + value;'
              master_item:
                key: 'juniper.mx.bgp.get["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}"]'
              tags:
                - tag: address
                  value: '{#BGP_PEER_REMOTE_ADDR}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
              trigger_prototypes:
                - uuid: 2a2a570e6a51407591280112d4c89eee
                  expression: 'count(/Juniper MX by NETCONF/juniper.mx.bgp.state["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}"],#3,"regexp","{$JUNIPER.MX.BGP.PEER.STATE}")=0'
                  name: 'Juniper MX: BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}]: Is down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: |
                    Session BGP Router '[{#BGP_ROUTER_NAME}]', AS '[{#BGP_PEER_REMOTE_AS}]', peer '[{#BGP_PEER_REMOTE_ADDR}]' is down, check BGP configuration.
                    For information on checking BGP configuration, see: https://www.juniper.net/documentation/us/en/software/junos/bgp/topics/topic-map/troubleshooting-bgp-sessions.html.
                  tags:
                    - tag: scope
                      value: notice
          master_item:
            key: juniper.mx.bgp.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var bgp = JSON.parse(value);
                  
                  var result = bgp.bgp_peers.map(function (peer) {
                    return {
                  	'{#BGP_ROUTER_NAME}': peer['router_name'],
                  	'{#BGP_PEER_REMOTE_ADDR}': peer['peer_address'],
                  	'{#BGP_PEER_REMOTE_AS}': peer['peer_as']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: ec4688c78a544e7ab9e65d5dadc5cd75
          name: 'BGP Prefix counter discovery'
          type: DEPENDENT
          key: juniper.mx.bgp.prefix.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#BGP_PEER_REMOTE_ADDR}'
                value: '{$JUNIPER.MX.BGP.PEER.REMOTE.ADDR.MATCHES}'
              - macro: '{#BGP_PEER_REMOTE_ADDR}'
                value: '{$JUNIPER.MX.BGP.PEER.REMOTE.ADDR.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#BGP_ROUTER_NAME}'
                value: '{$JUNIPER.MX.BGP.ROUTER.NAME.MATCHES}'
              - macro: '{#BGP_ROUTER_NAME}'
                value: '{$JUNIPER.MX.BGP.ROUTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'BGP RIB router discovery.'
          item_prototypes:
            - uuid: 831819ee09234b4699863099ca8bf995
              name: 'BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}] RIB [{#BGP_RIB_NAME}]: Accepted prefixes'
              type: DEPENDENT
              key: 'juniper.mx.bgp.prefix.accepted["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}","{#BGP_RIB_NAME}"]'
              description: 'The number of prefixes for a peer that are installed in the Adj-RIBs-In and are eligible to become active in the Loc-RIB.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.accepted
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'juniper.mx.bgp.prefix.get["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}","{#BGP_RIB_NAME}"]'
              tags:
                - tag: address
                  value: '{#BGP_PEER_REMOTE_ADDR}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: rib
                  value: '{#BGP_RIB_NAME}'
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
            - uuid: 37e63ca8bbcf4ae68abe6b94d22c53e7
              name: 'BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}] RIB [{#BGP_RIB_NAME}]: Active prefixes'
              type: DEPENDENT
              key: 'juniper.mx.bgp.prefix.active["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}","{#BGP_RIB_NAME}"]'
              description: 'The number of prefixes active from a peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.active
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'juniper.mx.bgp.prefix.get["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}","{#BGP_RIB_NAME}"]'
              tags:
                - tag: address
                  value: '{#BGP_PEER_REMOTE_ADDR}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: rib
                  value: '{#BGP_RIB_NAME}'
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
            - uuid: 4a9577aafcb54be3a02a3fa8d73fb833
              name: 'BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}] RIB [{#BGP_RIB_NAME}]: Get metrics data'
              type: DEPENDENT
              key: 'juniper.mx.bgp.prefix.get["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}","{#BGP_RIB_NAME}"]'
              history: '0'
              value_type: TEXT
              description: 'Gets data for RIB ''[{#BGP_RIB_NAME}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.bgp_rib[?(@.router_name == "{#BGP_ROUTER_NAME}" && @.name == "{#BGP_RIB_NAME}" && @.peer_address == "{#BGP_PEER_REMOTE_ADDR}" && @.peer_as == "{#BGP_PEER_REMOTE_AS}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: juniper.mx.bgp.data.get
              tags:
                - tag: address
                  value: '{#BGP_PEER_REMOTE_ADDR}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: component
                  value: raw
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
            - uuid: 5372572e533e41a189665f6d746c7c45
              name: 'BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}] RIB [{#BGP_RIB_NAME}]: Received prefixes'
              type: DEPENDENT
              key: 'juniper.mx.bgp.prefix.received["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}","{#BGP_RIB_NAME}"]'
              description: 'The number of prefixes received from a peer and stored in the Adj-RIBs-In for that peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.received
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'juniper.mx.bgp.prefix.get["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}","{#BGP_RIB_NAME}"]'
              tags:
                - tag: address
                  value: '{#BGP_PEER_REMOTE_ADDR}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: rib
                  value: '{#BGP_RIB_NAME}'
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
            - uuid: 8ad99df590844d32b4ff0780dc88dff1
              name: 'BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}] RIB [{#BGP_RIB_NAME}]: Suppressed prefixes'
              type: DEPENDENT
              key: 'juniper.mx.bgp.prefix.suppressed["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}","{#BGP_RIB_NAME}"]'
              description: 'The number of suppressed prefixes for a peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.accepted
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'juniper.mx.bgp.prefix.get["{#BGP_ROUTER_NAME}","{#BGP_PEER_REMOTE_ADDR}","{#BGP_PEER_REMOTE_AS}","{#BGP_RIB_NAME}"]'
              tags:
                - tag: address
                  value: '{#BGP_PEER_REMOTE_ADDR}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: rib
                  value: '{#BGP_RIB_NAME}'
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
          master_item:
            key: juniper.mx.bgp.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var bgp = JSON.parse(value);
                  
                  var result = bgp.bgp_rib.map(function (rib) {
                    return {
                  	'{#BGP_RIB_NAME}': rib['name'],
                  	'{#BGP_ROUTER_NAME}': rib['router_name'],
                  	'{#BGP_PEER_REMOTE_ADDR}': rib['peer_address'],
                  	'{#BGP_PEER_REMOTE_AS}': rib['peer_as']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: cb3df2a3b83f42b3ad5c0856c4744cdb
          name: 'BGP Router discovery'
          type: DEPENDENT
          key: juniper.mx.bgp.router.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#BGP_ROUTER_NAME}'
                value: '{$JUNIPER.MX.BGP.ROUTER.NAME.MATCHES}'
              - macro: '{#BGP_ROUTER_NAME}'
                value: '{$JUNIPER.MX.BGP.ROUTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'BGP router discovery and information retrieval.'
          item_prototypes:
            - uuid: 96fe80ba224549629c453420cf530bfc
              name: 'BGP Router [{#BGP_ROUTER_NAME}]: Down peers count'
              type: DEPENDENT
              key: 'juniper.mx.bgp.router.peer.down["{#BGP_ROUTER_NAME}"]'
              description: 'Gets the number of down peers on router ''[{#BGP_ROUTER_NAME}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.bgp[?(@.router_name == "{#BGP_ROUTER_NAME}")].down_peer_count.first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: juniper.mx.bgp.data.get
              tags:
                - tag: bgp-thread-mode
                  value: '{#BGP_THREAD_MODE}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
                - tag: router
                  value: '{#BGP_ROUTER_NAME}'
              trigger_prototypes:
                - uuid: 6004b951e5654a24a858757e451f39f4
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.bgp.router.peer.down["{#BGP_ROUTER_NAME}"]) = {#BGP_PEER_COUNT}'
                  name: 'Juniper MX: BGP Router [{#BGP_ROUTER_NAME}] AS [{#BGP_PEER_REMOTE_AS}] Peer [{#BGP_PEER_REMOTE_ADDR}]: Down peers is equal to peers'
                  event_name: 'Juniper MX: Router: "{#BGP_ROUTER_NAME}": Down peer count on router is equal to peer count'
                  priority: HIGH
                  description: 'The number of down peers is equal to the number of peers on the router ''[{#BGP_ROUTER_NAME}]''. For information on checking BGP configuration, see: https://www.juniper.net/documentation/us/en/software/junos/bgp/topics/topic-map/troubleshooting-bgp-sessions.html.'
                  tags:
                    - tag: scope
                      value: notice
          master_item:
            key: juniper.mx.bgp.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var routers = JSON.parse(value);
                  
                  var result = routers.bgp.map(function (router) {
                    return {
                  	'{#BGP_ROUTER_NAME}': router['router_name'],
                  	'{#BGP_THREAD_MODE}': router['bgp_thread_mode'],
                  	'{#BGP_PEER_COUNT}': router['peer_count']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: f23396b48b1b4e8e9a8ca9c76f769384
          name: 'Multi-lane DOM discovery'
          type: DEPENDENT
          key: juniper.mx.dom.lane.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#SFPIFNAME}'
                value: '{$JUNIPER.MX.NET.IF.SFP.NAME.MATCHES}'
              - macro: '{#SFPIFNAME}'
                value: '{$JUNIPER.MX.NET.IF.SFP.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for retrieving information about the Digital Optical Monitoring lane SFF optical Module from NETCONF.'
          item_prototypes:
            - uuid: 21fe9de68a4d45e0bb2c31da2b173006
              name: 'SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Module alarms'
              type: DEPENDENT
              key: 'juniper.dom.alarms.get["{#SFPIFNAME}","{#LANEID}"]'
              value_type: TEXT
              description: 'Gets module alarms for physical interface ''[{#SFPIFNAME}]'', line ''[{#LANEID}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.alarms[?(@.name == "{#SFPIFNAME}" && @.lane_index == "{#LANEID}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'ssh.run[JuniperMxDom,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
              tags:
                - tag: component
                  value: alarms
                - tag: component
                  value: network
                - tag: component
                  value: raw
                - tag: component
                  value: sfp
                - tag: sfp
                  value: '{#SFPIFNAME}'
              trigger_prototypes:
                - uuid: 26c9c9948aa9495180f44c8fd9d5c35a
                  expression: 'jsonpath(last(/Juniper MX by NETCONF/juniper.dom.alarms.get["{#SFPIFNAME}","{#LANEID}"]),"$.bias_high")="on"'
                  name: 'Juniper MX: SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Laser bias high'
                  event_name: 'Juniper MX: Laser bias current high on [{#LANEID}] lane'
                  opdata: 'Status alarm: "on"'
                  priority: AVERAGE
                  description: 'Transmitter laser bias current: high alarm threshold.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: 305e1393b93d433fa4a527470a66597e
                  expression: 'jsonpath(last(/Juniper MX by NETCONF/juniper.dom.alarms.get["{#SFPIFNAME}","{#LANEID}"]),"$.bias_low")="on"'
                  name: 'Juniper MX: SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Laser bias low'
                  event_name: 'Juniper MX: Laser bias current low on [{#LANEID}] lane'
                  opdata: 'Status alarm: "on"'
                  priority: AVERAGE
                  description: 'Transmitter laser bias current: low alarm threshold.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: b0bd8be95fca41ab8a6a5a2dfbf0cb72
                  expression: 'jsonpath(last(/Juniper MX by NETCONF/juniper.dom.alarms.get["{#SFPIFNAME}","{#LANEID}"]),"$.rx_high")="on"'
                  name: 'Juniper MX: SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Rx power high'
                  event_name: 'Juniper MX: Rx laser power high on [{#LANEID}] lane'
                  opdata: 'Status alarm: "on"'
                  priority: AVERAGE
                  description: 'Receiver laser power: high alarm threshold.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: 02c43d33f9a946ec87940d463ddeb12b
                  expression: 'jsonpath(last(/Juniper MX by NETCONF/juniper.dom.alarms.get["{#SFPIFNAME}","{#LANEID}"]),"$.rx_low")="on"'
                  name: 'Juniper MX: SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Rx power low'
                  event_name: 'Juniper MX: Rx laser power low on [{#LANEID}] lane'
                  opdata: 'Status alarm: "on"'
                  priority: AVERAGE
                  description: 'Receiver laser power: low alarm threshold.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: c6a62b8736e74831b0d2676fe8e3022f
                  expression: 'jsonpath(last(/Juniper MX by NETCONF/juniper.dom.alarms.get["{#SFPIFNAME}","{#LANEID}"]),"$.tx_laser_disabled")="on"'
                  name: 'Juniper MX: SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Tx laser disabled'
                  event_name: 'Juniper MX: Tx laser disabled on [{#LANEID}] lane'
                  opdata: 'Status alarm: "on"'
                  discover: NO_DISCOVER
                  priority: WARNING
                  description: 'Transmitter laser: disabled alarm.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: a2f9a4957ec64573b9ea8201e1386f82
                  expression: 'jsonpath(last(/Juniper MX by NETCONF/juniper.dom.alarms.get["{#SFPIFNAME}","{#LANEID}"]),"$.tx_loss_signal")="on"'
                  name: 'Juniper MX: SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Tx loss of signal functionality'
                  event_name: 'Juniper MX: Tx loss of signal functionality on [{#LANEID}] lane'
                  opdata: 'Status alarm: "on"'
                  discover: NO_DISCOVER
                  priority: WARNING
                  description: 'Transmitter laser: loss of signal functionality alarm.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: 67cfa8a494da4b36a4bbb881964d7069
                  expression: 'jsonpath(last(/Juniper MX by NETCONF/juniper.dom.alarms.get["{#SFPIFNAME}","{#LANEID}"]),"$.tx_high")="on"'
                  name: 'Juniper MX: SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Tx power high'
                  event_name: 'Juniper MX: Tx laser power high on [{#LANEID}] lane'
                  opdata: 'Status alarm: "on"'
                  discover: NO_DISCOVER
                  priority: WARNING
                  description: 'Transmitter laser power: high alarm threshold.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: 18d8eb4c5a4348bcb8fbae9a3992058f
                  expression: 'jsonpath(last(/Juniper MX by NETCONF/juniper.dom.alarms.get["{#SFPIFNAME}","{#LANEID}"]),"$.tx_low")="on"'
                  name: 'Juniper MX: SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Tx power low'
                  event_name: 'Juniper MX: Tx laser power low on [{#LANEID}] lane'
                  opdata: 'Status alarm: "on"'
                  discover: NO_DISCOVER
                  priority: WARNING
                  description: 'Transmitter laser power: low alarm threshold.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: a4e8694994ed44d98011d2b2ebe8bfa3
              name: 'SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Get metrics data'
              type: DEPENDENT
              key: 'juniper.mx.dom.get["{#SFPIFNAME}","{#LANEID}"]'
              history: '0'
              value_type: TEXT
              description: 'Get metrics data|<p>Gets module data for physical interface ''[{#SFPIFNAME}]'' and lane ''[{#LANEID}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.metrics[?(@.name == "{#SFPIFNAME}" && @.lane_index == "{#LANEID}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'ssh.run[JuniperMxDom,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: raw
                - tag: component
                  value: sfp
                - tag: sfp
                  value: '{#SFPIFNAME}'
            - uuid: aedac2b48af34eafbce3acb02c96946d
              name: 'SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Rx optical power'
              type: DEPENDENT
              key: 'juniper.mx.dom.rx.lane.laser["{#SFPIFNAME}","{#LANEID}"]'
              value_type: FLOAT
              units: dbm
              description: 'Received optical power for physical interface ''[{#SFPIFNAME}]'', line ''[{#LANEID}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rx_power
              master_item:
                key: 'juniper.mx.dom.get["{#SFPIFNAME}","{#LANEID}"]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: sfp
                - tag: sfp
                  value: '{#SFPIFNAME}'
            - uuid: e894851582354ca1bee42e2b7275d59b
              name: 'SFP [{#SFPIFNAME}] Lane [{#LANEID}]: Tx optical power'
              type: DEPENDENT
              key: 'juniper.mx.dom.tx.lane.laser["{#SFPIFNAME}","{#LANEID}"]'
              value_type: FLOAT
              units: dbm
              description: 'Transmitted optical power for physical interface ''[{#SFPIFNAME}]'', line ''[{#LANEID}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.tx_power
              master_item:
                key: 'juniper.mx.dom.get["{#SFPIFNAME}","{#LANEID}"]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: sfp
                - tag: sfp
                  value: '{#SFPIFNAME}'
          master_item:
            key: 'ssh.run[JuniperMxDom,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var sfp_lines = JSON.parse(value);
                  
                  var result = sfp_lines.metrics.map(function (line) {
                    return {
                  	'{#LANEID}': line['lane_index'],
                  	'{#SFPIFNAME}': line['name'],
                  	'{#MULTI}': line['multi']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Multi-lane triggers'
              step: '1'
              filter:
                conditions:
                  - macro: '{#MULTI}'
                    value: '1'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'Tx laser disabled'
                  discover: DISCOVER
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'Tx loss of signal functionality'
                  discover: DISCOVER
            - name: 'Single-lane triggers'
              step: '2'
              filter:
                conditions:
                  - macro: '{#MULTI}'
                    value: '0'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'Tx power'
                  discover: DISCOVER
        - uuid: 1eb485a3160d43f19c57c8da2095eefe
          name: 'Fan discovery'
          type: DEPENDENT
          key: juniper.mx.fan.discovery
          description: 'Scanning `show chassis fan` to detect fans.'
          item_prototypes:
            - uuid: 1f12240fdea64c3eb39088433e233c4d
              name: 'Module [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'juniper.mx.fan.get["{#NAME}"]'
              history: '0'
              value_type: TEXT
              description: 'Intermediate data of power entry module ''[{#NAME}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.name==''{#NAME}'')].first()'
              master_item:
                key: juniper.mx.fan.data.get
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: raw
                - tag: module
                  value: '{#NAME}'
            - uuid: 6b4b48fd800042e28e794f28ed8a62c2
              name: 'Module [{#NAME}]: Percentage speed'
              type: DEPENDENT
              key: 'juniper.mx.fan.rpm.percent["{#NAME}"]'
              units: '%'
              description: 'Current percentage of the ''[{#NAME}]'' speed being used.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.["rpm-percent"]'
                - type: RTRIM
                  parameters:
                    - '%'
              master_item:
                key: 'juniper.mx.fan.get["{#NAME}"]'
              tags:
                - tag: component
                  value: fan
                - tag: module
                  value: '{#NAME}'
            - uuid: 244e931d85d14e2598df848635988722
              name: 'Module [{#NAME}]: Fan speed'
              type: DEPENDENT
              key: 'juniper.mx.fan.rpm["{#NAME}"]'
              units: '!RPM'
              description: 'Fan speed in revolutions per minute (RPM).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.["comment"]'
                - type: RTRIM
                  parameters:
                    - RPM
              master_item:
                key: 'juniper.mx.fan.get["{#NAME}"]'
              tags:
                - tag: component
                  value: fan
                - tag: module
                  value: '{#NAME}'
            - uuid: 72afd3ad55f84916befa60d1fb5b35de
              name: 'Module [{#NAME}]: Status'
              type: DEPENDENT
              key: 'juniper.mx.fan.status["{#NAME}"]'
              description: 'Current status of fan tray ''[{#NAME}]''.'
              valuemap:
                name: 'FAN status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                - type: JAVASCRIPT
                  parameters:
                    - 'return [''OK'', ''Check''].indexOf(value) + 1 || ''Problem with status processing in JS, no such Fan status: '' + value;'
              master_item:
                key: 'juniper.mx.fan.get["{#NAME}"]'
              tags:
                - tag: component
                  value: fan
                - tag: module
                  value: '{#NAME}'
          master_item:
            key: juniper.mx.fan.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var fans = JSON.parse(value);
                  
                  var result = fans.map(function (fan) {
                    return {
                  	'{#NAME}': fan['name'],
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 36643a36fcb34fc387154b8f7ef94545
          name: 'FPC discovery'
          type: DEPENDENT
          key: juniper.mx.fpc.discovery
          description: 'Scanning `show chassis fpc` and `show chassis fpc detail` for FPCs.'
          item_prototypes:
            - uuid: 5421955ba3f94edca1e1bd58ba08902b
              name: 'FPC Slot [{#SLOT}]: CPU total utilization'
              type: DEPENDENT
              key: 'juniper.mx.fpc.cpu.total["{#SLOT}"]'
              units: '%'
              description: 'Total percentage of CPU being used by the FPC processor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["cpu-total"].first()'
              master_item:
                key: 'juniper.mx.fpc.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: cpu
                - tag: component
                  value: fpc
                - tag: fpc-slot
                  value: '{#SLOT}'
              trigger_prototypes:
                - uuid: 800199ee750d43909e6d3fd163db329d
                  expression: 'min(/Juniper MX by NETCONF/juniper.mx.fpc.cpu.total["{#SLOT}"], 10m) >= {$JUNIPER.MX.FPC.CPU.UTIL.MIN}'
                  name: 'Juniper MX: FPC Slot [{#SLOT}]: High CPU utilization'
                  event_name: 'Juniper MX: FPC Slot [{#SLOT}]: High CPU utilization (over >= {$JUNIPER.MX.FPC.CPU.UTIL.MIN}% over last 10m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'FPC CPU utilization is too high.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 1e6ceeeac08f40d8ace8c3b7907807f4
              name: 'FPC Slot [{#SLOT}]: Get metrics data'
              type: DEPENDENT
              key: 'juniper.mx.fpc.get["{#SLOT}"]'
              history: '0'
              value_type: TEXT
              description: 'Gets data for FPC Slot ''[{#SLOT}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.slot == "{#SLOT}")]'
                  error_handler: DISCARD_VALUE
              master_item:
                key: juniper.mx.fpc.data.get
              tags:
                - tag: component
                  value: fpc
                - tag: component
                  value: raw
                - tag: fpc-slot
                  value: '{#SLOT}'
            - uuid: ba18fa46b5ae4971a7daa3879dae4f00
              name: 'FPC Slot [{#SLOT}]: Buffer utilization'
              type: DEPENDENT
              key: 'juniper.mx.fpc.mem.buffer.util["{#SLOT}"]'
              units: '%'
              description: 'Percentage of buffer space being used by the FPC''s processor for buffering internal messages.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["memory-buffer-utilization"].first()'
              master_item:
                key: 'juniper.mx.fpc.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: fpc
                - tag: component
                  value: memory
                - tag: fpc-slot
                  value: '{#SLOT}'
              trigger_prototypes:
                - uuid: 0438ccd16222429da78eebebb311caaf
                  expression: 'min(/Juniper MX by NETCONF/juniper.mx.fpc.mem.buffer.util["{#SLOT}"],5m)>{$JUNIPER.MX.FPC.BUFFER.MEMORY.UTIL.MAX}'
                  name: 'Juniper MX: FPC Slot [{#SLOT}]: High buffer memory utilization'
                  event_name: 'Juniper MX: FPC Slot [{#SLOT}]: High FPC Buffer memory utilization (>{$JUNIPER.MX.FPC.BUFFER.MEMORY.UTIL.MAX}% for 5m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'The system is running out of free memory.'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
            - uuid: 6532d59203244fe8b04a31b44519e39e
              name: 'FPC Slot [{#SLOT}]: Heap utilization'
              type: DEPENDENT
              key: 'juniper.mx.fpc.mem.heap.util["{#SLOT}"]'
              units: '%'
              description: |
                Percentage of heap space (dynamic memory) being used by the FPC's processor. If this number exceeds 80%, there may be a software problem (memory leak).
                NOTE: On MX Series routers and EX Series switches in a broadband edge environment, heap utilization levels higher than 70% can affect unified ISSU, router stability, or scaling capability.
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["memory-heap-utilization"].first()'
              master_item:
                key: 'juniper.mx.fpc.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: fpc
                - tag: component
                  value: memory
                - tag: fpc-slot
                  value: '{#SLOT}'
              trigger_prototypes:
                - uuid: 4f371de9fbee47878d38c7c8ee6e98a6
                  expression: 'min(/Juniper MX by NETCONF/juniper.mx.fpc.mem.heap.util["{#SLOT}"],5m)>{$JUNIPER.MX.FPC.HEAP.MEMORY.UTIL.MAX}'
                  name: 'Juniper MX: FPC Slot [{#SLOT}]: High heap memory utilization'
                  event_name: 'Juniper MX: FPC Slot [{#SLOT}]: High routing engine memory utilization (>{$JUNIPER.MX.FPC.HEAP.MEMORY.UTIL.MAX}% for 5m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'The system is running out of free memory.'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
            - uuid: f02205020f074cea8611fed872094dad
              name: 'FPC Slot [{#SLOT}]: Start time'
              type: DEPENDENT
              key: 'juniper.mx.fpc.start-time["{#SLOT}"]'
              units: unixtime
              description: 'Time when the Routing Engine detected that the FPC was running.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["start-time"]["@seconds"].first()'
              master_item:
                key: 'juniper.mx.fpc.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: fpc
                - tag: fpc-slot
                  value: '{#SLOT}'
            - uuid: ac95da65a7994dd3b94dfc98f7e83609
              name: 'FPC Slot [{#SLOT}]: State'
              type: DEPENDENT
              key: 'juniper.mx.fpc.state["{#SLOT}"]'
              description: |
                The state can be one of the following:
                * Dead — Held in reset because of errors.
                * Diag — Slot is being ignored while the FPC is running diagnostics.
                * Dormant — Held in reset.
                * Empty — No FPC is present.
                * Offline — (PTX Series Packet Transport Routers only) One of the following two states is displayed:
                `FPC offlined due to unreachable destinations`
                `FPC Offlined due to degraded FPC action`
                * Online — FPC is online and running.
                * Present — FPC is detected by the chassis daemon, but is either not supported by the current version of Junos OS, or is inserted in the wrong slot. The output also states either `Hardware Not Supported` or `Hardware Not In Right Slot`. The FPC is coming up, but not yet online.
                * Probed — Probe is complete; awaiting restart of the Packet Forwarding Engine.
                * Probe-wait — Waiting to be probed.
                * Unknown — FPC is present, but the state is unknown.
                * Onlining — FPC is in the process of going online. ASIC and the rest of the hardware is initializing.
                * Offlining — FPC is in the process of going offline. ASIC and the rest of the hardware is being shutdown to take the offline gracefully.
                * Fault — FPC is in an alarm state in which none of the PICs are operational.
                * Fault-off — FPC is powered off due to a fault.
                * Spare — FPC is redundant and will move to active state if one of the working FPCs fails to pass traffic.
              valuemap:
                name: 'FPC slot state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $..state.first()
                - type: JAVASCRIPT
                  parameters:
                    - 'return [''Dead'', ''Diag'', ''Dormant'', ''Empty'', ''Offline'', ''Online'', ''Present'', ''Probed'', ''Probe-wait'', ''Unknown'', ''Onlining'', ''Offlining'', ''Fault'', ''Fault-off'', ''Spare''].indexOf(value) + 1 || ''Problem with status processing in JS, no such FPC slot state: '' + value;'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'juniper.mx.fpc.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: fpc
                - tag: fpc-slot
                  value: '{#SLOT}'
              trigger_prototypes:
                - uuid: c8a14227533d44ed8ce5218398c5b8e9
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.fpc.state["{#SLOT}"])<>6'
                  name: 'Juniper MX: FPC Slot [{#SLOT}]: Status not "Online"'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: WARNING
                  description: 'Check the FPC''s errors.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: ec62e2df037b48039a8894d74eb7e724
              name: 'FPC Slot [{#SLOT}]: Uptime'
              type: DEPENDENT
              key: 'juniper.mx.fpc.uptime["{#SLOT}"]'
              units: uptime
              description: 'How long the Routing Engine has been connected to the FPC (how long the FPC has been up and running).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["up-time"]["@seconds"].first()'
              master_item:
                key: 'juniper.mx.fpc.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: fpc
                - tag: fpc-slot
                  value: '{#SLOT}'
          master_item:
            key: juniper.mx.fpc.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var fpc = JSON.parse(value);
                  
                  var result = fpc.map(function (slot) {
                    return {
                  	'{#SLOT}': slot['slot']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: b03830a9f51f42d3bdb3066bd55a27a8
          name: 'Mounted filesystem discovery'
          type: DEPENDENT
          key: juniper.mx.fs.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#FSNAME}'
                value: '{$JUNIPER.MX.FS.FSNAME.MATCHES}'
              - macro: '{#FSNAME}'
                value: '{$JUNIPER.MX.FS.FSNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'The discovery of mounted filesystems with different types.'
          item_prototypes:
            - uuid: 15f6aadd267f4989b01bc617da035da6
              name: 'FS [{#FSNAME}] Mounted [{#MOUNT}]: Get data'
              type: DEPENDENT
              key: 'juniper.mx.fs.get["{#FSNAME}","{#MOUNT}"]'
              history: '0'
              value_type: TEXT
              description: 'Intermediate data of filesystem ''[{#FSNAME}]'' filesystem. Mounted on ''[{#MOUNT}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@["filesystem-name"]=="{#FSNAME}" && @["mounted-on"]== "{#MOUNT}")].first()'
              master_item:
                key: juniper.mx.storage.data.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: mount
                  value: '{#MOUNT}'
            - uuid: d95d7a8bda3941778b6b955590045af8
              name: 'FS [{#FSNAME}] Mounted [{#MOUNT}]: Space: Available'
              type: DEPENDENT
              key: 'juniper.mx.fs.size["{#FSNAME}","{#MOUNT}",free]'
              units: B
              description: 'Available storage space expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["available-blocks"]["#text"]'
                - type: MULTIPLIER
                  parameters:
                    - '512'
              master_item:
                key: 'juniper.mx.fs.get["{#FSNAME}","{#MOUNT}"]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: mount
                  value: '{#MOUNT}'
            - uuid: c033f03fff3840e19fd7208f3d2a7a6e
              name: 'FS [{#FSNAME}] Mounted [{#MOUNT}]: Space: Used, in %'
              type: DEPENDENT
              key: 'juniper.mx.fs.size["{#FSNAME}","{#MOUNT}",pused]'
              value_type: FLOAT
              units: '%'
              description: 'Used storage space expressed in percent.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["used-percent"]'
              master_item:
                key: 'juniper.mx.fs.get["{#FSNAME}","{#MOUNT}"]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: mount
                  value: '{#MOUNT}'
              trigger_prototypes:
                - uuid: c16052b52d4845bcad26102fa98b7dc4
                  expression: 'min(/Juniper MX by NETCONF/juniper.mx.fs.size["{#FSNAME}","{#MOUNT}",pused],5m)>{$JUNIPER.MX.FS.PUSED.MAX.CRIT:"{#FSNAME}"}'
                  name: 'Juniper MX: FS [{#FSNAME}] Mounted [{#MOUNT}]: Disk space is critically low'
                  event_name: 'Juniper MX: FS [{#FSNAME}] Mounted [{#MOUNT}]: Disk space is critically low (used > {$JUNIPER.MX.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%)'
                  opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
                  priority: AVERAGE
                  description: |
                    The volume's space usage exceeds the '{$JUNIPER.MX.FS.FREE.MIN.CRIT:"{#FSNAME}"}%' limit;
                    The trigger expression is based on the current used and maximum available spaces.
                    The event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: capacity
                - uuid: b21e68fc85564d3d8c3fd4b6cb3255c8
                  expression: 'min(/Juniper MX by NETCONF/juniper.mx.fs.size["{#FSNAME}","{#MOUNT}",pused],5m)>{$JUNIPER.MX.FS.PUSED.MAX.WARN:"{#FSNAME}"}'
                  name: 'Juniper MX: FS [{#FSNAME}] Mounted [{#MOUNT}]: Disk space is low'
                  event_name: 'Juniper MX: FS [{#FSNAME}] Mounted [{#MOUNT}]: Disk space is low (used > {$JUNIPER.MX.FS.PUSED.MAX.WARN:"{#FSNAME}"}%)'
                  opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
                  priority: WARNING
                  description: |
                    The storage space usage exceeds the '{$JUNIPER.MX.FS.PUSED.MAX.WARN:"{#FSNAME}"}%' limit.
                    The trigger expression is based on the current used and maximum available spaces.
                    The event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
                  manual_close: 'YES'
                  dependencies:
                    - name: 'Juniper MX: FS [{#FSNAME}] Mounted [{#MOUNT}]: Disk space is critically low'
                      expression: 'min(/Juniper MX by NETCONF/juniper.mx.fs.size["{#FSNAME}","{#MOUNT}",pused],5m)>{$JUNIPER.MX.FS.PUSED.MAX.CRIT:"{#FSNAME}"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: capacity
            - uuid: 4387c163660c47a89cc7270af636cf69
              name: 'FS [{#FSNAME}] Mounted [{#MOUNT}]: Space: Total'
              type: DEPENDENT
              key: 'juniper.mx.fs.size["{#FSNAME}","{#MOUNT}",total]'
              units: B
              description: 'Total space expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["total-blocks"]["#text"]'
                - type: MULTIPLIER
                  parameters:
                    - '512'
              master_item:
                key: 'juniper.mx.fs.get["{#FSNAME}","{#MOUNT}"]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: mount
                  value: '{#MOUNT}'
            - uuid: 046087ad65fa40939bb4a3c48db734f0
              name: 'FS [{#FSNAME}] Mounted [{#MOUNT}]: Space: Used'
              type: DEPENDENT
              key: 'juniper.mx.fs.size["{#FSNAME}","{#MOUNT}",used]'
              units: B
              description: 'Used storage space expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["used-blocks"]["#text"]'
                - type: MULTIPLIER
                  parameters:
                    - '512'
              master_item:
                key: 'juniper.mx.fs.get["{#FSNAME}","{#MOUNT}"]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: mount
                  value: '{#MOUNT}'
          graph_prototypes:
            - uuid: ab28f5c7035f462da23030f4506cf6ab
              name: 'FS [{#FSNAME}] Mounted [{#MOUNT}]: Disk space usage'
              width: '600'
              height: '340'
              type: PIE
              show_3d: 'YES'
              graph_items:
                - color: '969696'
                  calc_fnc: LAST
                  type: GRAPH_SUM
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.fs.size["{#FSNAME}","{#MOUNT}",total]'
                - sortorder: '1'
                  color: C80000
                  calc_fnc: LAST
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.fs.size["{#FSNAME}","{#MOUNT}",used]'
          master_item:
            key: juniper.mx.storage.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  data = Array.isArray(data) ? data : [data];
                  
                  result = data.map(function (filesystem) {
                    return {
                  	'{#FSNAME}': filesystem['filesystem-name'],
                  	'{#MOUNT}': filesystem['mounted-on']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 05e733216d4349a287ce9cdb8d387e03
          name: 'Network interface discovery'
          type: DEPENDENT
          key: juniper.mx.net.if.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#IFADMINSTATUS}'
                value: '{$JUNIPER.MX.NET.IF.ADMINSTATUS.MATCHES}'
              - macro: '{#IFADMINSTATUS}'
                value: '{$JUNIPER.MX.NET.IF.ADMINSTATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFNAME}'
                value: '{$JUNIPER.MX.NET.IF.NAME.MATCHES}'
              - macro: '{#IFNAME}'
                value: '{$JUNIPER.MX.NET.IF.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFOPERSTATUS}'
                value: '{$JUNIPER.MX.NET.IF.IFOPERSTATUS.MATCHES}'
              - macro: '{#IFOPERSTATUS}'
                value: '{$JUNIPER.MX.NET.IF.IFOPERSTATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of interfaces from the Juniper device.'
          item_prototypes:
            - uuid: bfcde9c3cb024c6aa2b2e5fbfbbb1f80
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Get metrics data'
              type: DEPENDENT
              key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              history: '0'
              value_type: TEXT
              description: 'Gets data from the physical interface ''[{#IFNAME}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.results..["rpc-reply"]["interface-information"]["physical-interface"][?(@.name == "{#IFNAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'ssh.run[JuniperMxInterface,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: raw
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
            - uuid: d3a80d633d714da490fb43989bca1b03
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Operational status'
              type: DEPENDENT
              key: 'juniper.mx.net.if.oper.status["{#IFNAME}"]'
              value_type: FLOAT
              description: 'Gets the operational status of the physical interface ''[{#IFNAME}]''.'
              valuemap:
                name: 'Operational status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["oper-status"]'
                - type: JAVASCRIPT
                  parameters:
                    - 'return [''up'', ''down'', ''unknown'', ''dormant'', ''notPresent'', ''lowerLayerDown''].indexOf(value) + 1 || ''Problem with status processing in JS, no such Operational status: '' + value;'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFDESCR}'
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
              trigger_prototypes:
                - uuid: 6a00575d05744f709f4f90602e6075f8
                  expression: '{$JUNIPER.MX.NET.IF.CONTROL:"{#IFNAME}"}=1 and last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"])=2 and (last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"])<>last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"])<>"down" or {$JUNIPER.MX.NET.IF.CONTROL:"{#IFNAME}"}=0'
                  name: 'Juniper MX: Interface [{#IFNAME}][{#IFDESCR}]: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operational status is down.
                    2. `{$JUNIPER.MX.NET.IF.CONTROL:"{#IFNAME}"}=1` - a user can redefine the context macro to "0", marking this interface as not important. No new trigger will be fired if this interface is down.
                    3. `last(/TEMPLATE_NAME/METRIC)<>last(/TEMPLATE_NAME/METRIC,#2)` - the trigger fires only if the operational status has changed to "down" from some other state (so, does not fire for "eternal off" interfaces).
                    
                    WARNING: if closed manually - it will not fire again on the next poll because of `last(/TEMPLATE_NAME/METRIC)<>last(/TEMPLATE_NAME/METRIC,#2)`.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 34f99d734dd74942a2e7bb3d59056b76
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Speed'
              type: DEPENDENT
              key: 'juniper.mx.net.if.speed["{#IFNAME}"]'
              units: bps
              description: 'Gets the speed of the interface ''[{#IFNAME}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["speed"]'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      function parseSpeedToBits(speedString) {
                      	var formatted = speedString.replace(/\s+/g, "").toLowerCase();
                      
                      	if (formatted === 'unlimited' || formatted === 'unspecified') {
                      		return '';
                      	}
                      
                      	var match = formatted.match(/^(\d+(\.\d+)?)(gbps|mbps|bps)$/);
                      
                      	if (!match) {
                      		throw new Error("Problem with processing in JS, no such speed format: " + speedString);
                      	}
                      
                      	var value = parseFloat(match[1]),
                      		unit = match[3];
                      
                      	switch (unit) {
                      		case 'gbps':
                      			return value * 1e9;
                      		case 'mbps':
                      			return value * 1e6;
                      		case 'bps':
                      			return value;
                      		default:
                      			throw new Error("Problem with processing in JS, unsupported unit: " + unit);
                      	}
                      }
                      
                      var speedsInBits = parseSpeedToBits(value);
                      
                      return speedsInBits;
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFDESCR}'
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
            - uuid: 47f4aff789af4e7dbbdb7ce169655df8
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Input bits'
              type: DEPENDENT
              key: 'juniper.mx.net.input.bits.rate["{#IFNAME}"]'
              units: bps
              description: 'Number of input bytes; current throughput rate in bits per second (bps).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["traffic-statistics"]["input-bytes"]'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFDESCR}'
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
            - uuid: ae886ad0d5de47f09bd5bae9ef5b9944
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Input errors'
              type: DEPENDENT
              key: 'juniper.mx.net.input.errors["{#IFNAME}"]'
              description: 'Input errors on the interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["input-error-list"]["input-errors"]'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFDESCR}'
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
            - uuid: a197648a392a42d5ac14c4a9f229b5f1
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Input packets'
              type: DEPENDENT
              key: 'juniper.mx.net.input.packets.rate["{#IFNAME}"]'
              units: '!pps'
              description: 'Number of input packets; current throughput rate in packets per second (pps).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["traffic-statistics"]["input-packets"]'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFDESCR}'
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
            - uuid: 5437fb322e004a649f1200d82132d8af
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Link level type'
              type: DEPENDENT
              key: 'juniper.mx.net.link.level.type["{#IFNAME}"]'
              value_type: CHAR
              description: 'Gets the link level type of the interface ''[{#IFNAME}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["link-level-type"]'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFDESCR}'
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
            - uuid: bdf5bc09d36e461d95b2bbf4cd11bc50
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Output bits'
              type: DEPENDENT
              key: 'juniper.mx.net.output.bits.rate["{#IFNAME}"]'
              units: bps
              description: 'Number of output bytes; current throughput rate in bits per second (bps).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["traffic-statistics"]["output-bytes"]'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFDESCR}'
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
            - uuid: 162f787fad4b41688db5b739477cd04d
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Output errors'
              type: DEPENDENT
              key: 'juniper.mx.net.output.errors["{#IFNAME}"]'
              description: 'Output errors on the interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["output-error-list"]["output-errors"]'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFDESCR}'
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
            - uuid: 819f635bb371472cabe4cc4e88c6f6f3
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Output packets'
              type: DEPENDENT
              key: 'juniper.mx.net.output.packets.rate["{#IFNAME}"]'
              units: '!pps'
              description: 'Number of output packets; current throughput rate in packets per second (pps).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["traffic-statistics"]["output-packets"]'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'juniper.mx.interface.get["{#IFNAME}","{#IFDESCR}"]'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFDESCR}'
                - tag: if-type
                  value: '{#IFTYPE}'
                - tag: interface
                  value: '{#IFNAME}'
                - tag: link-level-type
                  value: '{#LINKLEVELTYPE}'
          trigger_prototypes:
            - uuid: 7b0eba09fb814b1f84e0b3b858abe0f4
              expression: |
                (avg(/Juniper MX by NETCONF/juniper.mx.net.input.bits.rate["{#IFNAME}"],15m)>({$JUNIPER.MX.NET.IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Juniper MX by NETCONF/juniper.mx.net.if.speed["{#IFNAME}"])) and
                last(/Juniper MX by NETCONF/juniper.mx.net.if.speed["{#IFNAME}"])>0
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'avg(/Juniper MX by NETCONF/juniper.mx.net.input.bits.rate["{#IFNAME}"],15m)<(({$JUNIPER.MX.NET.IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/Juniper MX by NETCONF/juniper.mx.net.if.speed["{#IFNAME}"])'
              name: 'Juniper MX: Interface [{#IFNAME}][{#IFDESCR}]: High inbound bandwidth usage'
              event_name: 'Juniper MX: Interface [{#IFNAME}][{#IFDESCR}]: High inbound bandwidth usage ( > {$JUNIPER.MX.NET.IF.UTIL.MAX:"{#IFNAME}"}% )'
              opdata: 'In: {ITEM.LASTVALUE1}, speed: {ITEM.LASTVALUE2}'
              priority: WARNING
              description: 'The utilization of the network interface is close to its estimated maximum bandwidth.'
              dependencies:
                - name: 'Juniper MX: Interface [{#IFNAME}][{#IFDESCR}]: Link down'
                  expression: '{$JUNIPER.MX.NET.IF.CONTROL:"{#IFNAME}"}=1 and last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"])=2 and (last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"])<>last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"],#2))'
                  recovery_expression: 'last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"])<>"down" or {$JUNIPER.MX.NET.IF.CONTROL:"{#IFNAME}"}=0'
              tags:
                - tag: scope
                  value: performance
            - uuid: c31323aee08c49d4b2f40fa5bf064786
              expression: |
                (avg(/Juniper MX by NETCONF/juniper.mx.net.output.bits.rate["{#IFNAME}"],15m)>({$JUNIPER.MX.NET.IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Juniper MX by NETCONF/juniper.mx.net.if.speed["{#IFNAME}"])) and
                last(/Juniper MX by NETCONF/juniper.mx.net.if.speed["{#IFNAME}"])>0
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'avg(/Juniper MX by NETCONF/juniper.mx.net.output.bits.rate["{#IFNAME}"],15m)<(({$JUNIPER.MX.NET.IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/Juniper MX by NETCONF/juniper.mx.net.if.speed["{#IFNAME}"])'
              name: 'Juniper MX: Interface [{#IFNAME}][{#IFDESCR}]: High outbound bandwidth usage'
              event_name: 'Juniper MX: Interface [{#IFNAME}][{#IFDESCR}]: High outbound bandwidth usage ( > {$JUNIPER.MX.NET.IF.UTIL.MAX:"{#IFNAME}"}% )'
              opdata: 'Out: {ITEM.LASTVALUE1}, speed: {ITEM.LASTVALUE2}'
              priority: WARNING
              description: 'The utilization of the network interface is close to its estimated maximum bandwidth.'
              dependencies:
                - name: 'Juniper MX: Interface [{#IFNAME}][{#IFDESCR}]: Link down'
                  expression: '{$JUNIPER.MX.NET.IF.CONTROL:"{#IFNAME}"}=1 and last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"])=2 and (last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"])<>last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"],#2))'
                  recovery_expression: 'last(/Juniper MX by NETCONF/juniper.mx.net.if.oper.status["{#IFNAME}"])<>"down" or {$JUNIPER.MX.NET.IF.CONTROL:"{#IFNAME}"}=0'
              tags:
                - tag: scope
                  value: performance
          graph_prototypes:
            - uuid: d4dda92975514dc790da84eca4e643f5
              name: 'Interface [{#IFNAME}][{#IFDESCR}]: Network traffic (bits, per second)'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.net.input.bits.rate["{#IFNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.net.output.bits.rate["{#IFNAME}"]'
          master_item:
            key: 'ssh.run[JuniperMxInterface,{$JUNIPER.MX.NETCONF.IP},{$JUNIPER.MX.NETCONF.PORT},,,netconf]'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.results..["rpc-reply"]["interface-information"]["physical-interface"].first()'
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value),
                  	interfaces = [];
                  
                  function getField(data, path, default_value) {
                  	var steps = path.split('.');
                  	var step = steps.shift();
                  
                  	while (typeof step !== 'undefined') {
                  		if (typeof data === undefined || typeof data[step] === 'undefined') {
                  			return default_value;
                  		}
                  
                  		data = data[step];
                  		step = steps.shift();
                  	}
                  	return data;
                  };
                  
                  data.forEach(function (iface) {
                  	interfaces.push({
                  		'{#IFNAME}': getField(iface, 'name'),
                  		'{#IFDESCR}': getField(iface, 'description', ''),
                  		'{#LINKLEVELTYPE}': getField(iface, 'link-level-type', ''),
                  		'{#IFTYPE}': getField(iface, 'if-type', ''),
                  		'{#LINKTYPE}': getField(iface, 'link-type', ''),
                  		'{#IFADMINSTATUS}': getField(iface, 'admin-status.#text'),
                  		'{#IFOPERSTATUS}': getField(iface, 'oper-status'),
                  		'{#IFSPEED}': getField(iface, 'speed')
                  	});
                  
                  });
                  
                  return JSON.stringify(interfaces);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Do not create speed item and trigger if not supported'
              step: '1'
              filter:
                conditions:
                  - macro: '{#IFSPEED}'
                    value: \d+
                    operator: NOT_MATCHES_REGEX
              operations:
                - operator: REGEXP
                  value: Speed
                  discover: NO_DISCOVER
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'High * bandwidth usage'
                  discover: NO_DISCOVER
        - uuid: d9366347cae34200b16cc74b58eb6941
          name: 'OSPF Neighbor discovery'
          type: DEPENDENT
          key: juniper.mx.ospf.neighbor.discovery
          description: 'OSPF neighbor discovery.'
          item_prototypes:
            - uuid: 56d860f355fa4be593a5b65e1cb94788
              name: 'OSPF Neighbor [{#OSPF_NEIGHBOR_ADDR}]: Get metrics data'
              type: DEPENDENT
              key: 'juniper.mx.ospf.get["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"]'
              history: '0'
              value_type: TEXT
              description: 'Gets OSPF raw data for neighbor ''[{#OSPF_NEIGHBOR_ADDR}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.ospf[?(@.router_name == "{#OSPF_ROUTER_NAME}" && @.neighbor_address == "{#OSPF_NEIGHBOR_ADDR}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: juniper.mx.ospf.data.get
              tags:
                - tag: address
                  value: '{#OSPF_NEIGHBOR_ADDR}'
                - tag: component
                  value: network
                - tag: component
                  value: ospf
                - tag: component
                  value: raw
                - tag: router
                  value: '{#OSPF_ROUTER_NAME}'
            - uuid: 272551c6ba914c5e8ef5ed693aee7682
              name: 'OSPF Neighbor [{#OSPF_NEIGHBOR_ADDR}]: Interface'
              type: DEPENDENT
              key: 'juniper.mx.ospf.interface["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"]'
              value_type: TEXT
              description: 'The OSPF interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.interface_name
              master_item:
                key: 'juniper.mx.ospf.get["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"]'
              tags:
                - tag: address
                  value: '{#OSPF_NEIGHBOR_ADDR}'
                - tag: component
                  value: network
                - tag: component
                  value: ospf
                - tag: router
                  value: '{#OSPF_ROUTER_NAME}'
            - uuid: 37eaf74435dd490992ba9fd614eaf63c
              name: 'OSPF Neighbor [{#OSPF_NEIGHBOR_ADDR}]: State'
              type: DEPENDENT
              key: 'juniper.mx.ospf.state["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"]'
              description: 'The state of the relationship with this neighbor.'
              valuemap:
                name: 'OSPF neighbor state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.neighbor_state
                - type: JAVASCRIPT
                  parameters:
                    - 'return [''Attempt'', ''Down'', ''Exchange'', ''ExStart'', ''Full'', ''Init'', ''Loading'', ''2Way''].indexOf(value) + 1 || ''Problem with status processing in JS, no such OSPF state: '' + value;'
              master_item:
                key: 'juniper.mx.ospf.get["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"]'
              tags:
                - tag: address
                  value: '{#OSPF_NEIGHBOR_ADDR}'
                - tag: component
                  value: network
                - tag: component
                  value: ospf
                - tag: router
                  value: '{#OSPF_ROUTER_NAME}'
              trigger_prototypes:
                - uuid: 9ab19250b673403b9ac286b0dbfe7c5b
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.ospf.state["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"]) = 2'
                  name: 'Juniper MX: OSPF Neighbor [{#OSPF_NEIGHBOR_ADDR}]: State down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'OSPF neighbor ''[{#OSPF_NEIGHBOR_ADDR}]'' is in operational state `down`.'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: 2b331a4f704b48e5887eaff26f4dbe74
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.ospf.state["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"]) = 6'
                  name: 'Juniper MX: OSPF Neighbor [{#OSPF_NEIGHBOR_ADDR}]: State init'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'OSPF neighbor ''[{#OSPF_NEIGHBOR_ADDR}]'' is in operational state `init`.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 5b551b1609a9422090cb62f6385decd4
              name: 'OSPF Neighbor [{#OSPF_NEIGHBOR_ADDR}]: Uptime'
              type: DEPENDENT
              key: 'juniper.mx.ospf.uptime["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"]'
              units: uptime
              description: 'The OSPF uptime.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.uptime
              master_item:
                key: 'juniper.mx.ospf.get["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"]'
              tags:
                - tag: address
                  value: '{#OSPF_NEIGHBOR_ADDR}'
                - tag: component
                  value: network
                - tag: component
                  value: ospf
                - tag: router
                  value: '{#OSPF_ROUTER_NAME}'
              trigger_prototypes:
                - uuid: 1d1b6b91d5294a3794442882c095eb77
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.ospf.uptime["{#OSPF_ROUTER_NAME}","{#OSPF_NEIGHBOR_ADDR}"])<10m'
                  name: 'Juniper MX: OSPF has been restarted'
                  event_name: 'Juniper MX: OSPF has been restarted (uptime < 10m)'
                  priority: WARNING
                  description: 'Uptime is less than 10 minutes.'
          master_item:
            key: juniper.mx.ospf.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var neighbors = JSON.parse(value);
                  
                  var result = neighbors.ospf.map(function (neighbor) {
                    return {
                  	'{#OSPF_NEIGHBOR_ADDR}': neighbor['neighbor_address'],
                  	'{#OSPF_ROUTER_NAME}': neighbor['router_name']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: ceae517711604528bee1f5f50d2c0210
          name: 'OSPFv3 Neighbor discovery'
          type: DEPENDENT
          key: juniper.mx.ospf3.neighbor.discovery
          description: 'OSPFv3 neighbor discovery.'
          item_prototypes:
            - uuid: 9a8806699cf1402689e443ab18d2d9b0
              name: 'OSPFv3 Neighbor [{#OSPFV3_NEIGHBOR_ADDR}]: Get metrics data'
              type: DEPENDENT
              key: 'juniper.mx.ospf3.get["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"]'
              history: '0'
              value_type: TEXT
              description: 'Gets OSPFv3 raw data for neighbor ''[{#OSPFV3_NEIGHBOR_ADDR}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.ospf3[?(@.router_name == "{#OSPFV3_ROUTER_NAME}" && @.neighbor_address == "{#OSPFV3_NEIGHBOR_ADDR}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: juniper.mx.ospf.data.get
              tags:
                - tag: address
                  value: '{#OSPFV3_NEIGHBOR_ADDR}'
                - tag: component
                  value: network
                - tag: component
                  value: ospf
                - tag: component
                  value: raw
                - tag: router
                  value: '{#OSPFV3_ROUTER_NAME}'
            - uuid: 6861e5b661364df09af9b51509a30c0d
              name: 'OSPFv3 Neighbor [{#OSPFV3_NEIGHBOR_ADDR}]: Interface'
              type: DEPENDENT
              key: 'juniper.mx.ospf3.interface["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"]'
              value_type: TEXT
              description: 'The OSPFv3 interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.interface_name
              master_item:
                key: 'juniper.mx.ospf3.get["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"]'
              tags:
                - tag: address
                  value: '{#OSPFV3_NEIGHBOR_ADDR}'
                - tag: component
                  value: network
                - tag: component
                  value: ospf
                - tag: router
                  value: '{#OSPFV3_ROUTER_NAME}'
            - uuid: 01b35f19d98149b987911aa1152b68a8
              name: 'OSPFv3 Neighbor [{#OSPFV3_NEIGHBOR_ADDR}]: State'
              type: DEPENDENT
              key: 'juniper.mx.ospf3.state["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"]'
              description: 'The state of the relationship with this neighbor.'
              valuemap:
                name: 'OSPF neighbor state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.neighbor_state
                - type: JAVASCRIPT
                  parameters:
                    - 'return [''Attempt'', ''Down'', ''Exchange'', ''ExStart'', ''Full'', ''Init'', ''Loading'', ''2Way''].indexOf(value) + 1 || ''Problem with status processing in JS, no such OSPF state: '' + value;'
              master_item:
                key: 'juniper.mx.ospf3.get["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"]'
              tags:
                - tag: address
                  value: '{#OSPFV3_NEIGHBOR_ADDR}'
                - tag: component
                  value: network
                - tag: component
                  value: ospf
                - tag: router
                  value: '{#OSPFV3_ROUTER_NAME}'
              trigger_prototypes:
                - uuid: 03035f55cfcf4dd8970bee02d9e561ff
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.ospf3.state["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"]) = 2'
                  name: 'Juniper MX: OSPFv3 Neighbor [{#OSPFV3_NEIGHBOR_ADDR}]: State down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'OSPFv3 neighbor ''[{#OSPFV3_NEIGHBOR_ADDR}]'' is in operational state `down`.'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: f6974bc99e4b41cb8aa1adfccb0a3cb6
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.ospf3.state["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"]) = 6'
                  name: 'Juniper MX: OSPFv3 Neighbor [{#OSPFV3_NEIGHBOR_ADDR}]: State init'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'OSPFv3 neighbor ''[{#OSPFV3_NEIGHBOR_ADDR}]'' is in operational state `init`.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: bde728d311d64de087fee263ce27e1d7
              name: 'OSPFv3 Neighbor [{#OSPFV3_NEIGHBOR_ADDR}]: Up time'
              type: DEPENDENT
              key: 'juniper.mx.ospf3.uptime["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"]'
              units: uptime
              description: 'The OSPFv3 uptime.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.uptime
              master_item:
                key: 'juniper.mx.ospf3.get["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"]'
              tags:
                - tag: address
                  value: '{#OSPFV3_NEIGHBOR_ADDR}'
                - tag: component
                  value: network
                - tag: component
                  value: ospf
                - tag: router
                  value: '{#OSPFV3_ROUTER_NAME}'
              trigger_prototypes:
                - uuid: 2cede617dec14cfe828405f2dfdb0b7d
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.ospf3.uptime["{#OSPFV3_ROUTER_NAME}","{#OSPFV3_NEIGHBOR_ADDR}"])<10m'
                  name: 'Juniper MX: OSPFv3 has been restarted'
                  event_name: 'Juniper MX: OSPFv3 has been restarted (uptime < 10m)'
                  priority: WARNING
                  description: 'Uptime is less than 10 minutes.'
          master_item:
            key: juniper.mx.ospf.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var neighbors = JSON.parse(value);
                  
                  var result = neighbors.ospf3.map(function (neighbor) {
                    return {
                  	'{#OSPFV3_NEIGHBOR_ADDR}': neighbor['neighbor_address'],
                  	'{#OSPFV3_ROUTER_NAME}': neighbor['router_name']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 09ae298fae4c49d899be0f07e9695100
          name: 'PEM discovery'
          type: DEPENDENT
          key: juniper.mx.pem.discovery
          description: 'Scanning `show chassis environment pem` to detect power entry modules.'
          item_prototypes:
            - uuid: b2fb0d82616d405fbbfb400ff18f0fe0
              name: 'Module [{#NAME}]: Current'
              type: DEPENDENT
              key: 'juniper.mx.pem.current["{#NAME}"]'
              value_type: FLOAT
              units: A
              description: 'Information about the PEM current.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.["dc-information"]["dc-detail"]["str3-dc-current"]'
              master_item:
                key: 'juniper.mx.pem.get["{#NAME}"]'
              tags:
                - tag: component
                  value: power
                - tag: module
                  value: '{#NAME}'
            - uuid: 5f4b1ad53347419098820dc4a41cf5a6
              name: 'Module [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'juniper.mx.pem.get["{#NAME}"]'
              history: '0'
              value_type: TEXT
              description: 'Intermediate data of power entry module ''[{#NAME}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.name==''{#NAME}'')].first()'
              master_item:
                key: juniper.mx.pem.data.get
              tags:
                - tag: component
                  value: power
                - tag: component
                  value: raw
                - tag: module
                  value: '{#NAME}'
            - uuid: acdb06af42c04b0ca2110c3fe5b9dfd9
              name: 'Module [{#NAME}]: Load'
              type: DEPENDENT
              key: 'juniper.mx.pem.load["{#NAME}"]'
              units: '%'
              description: 'Information about the load on the power supply; expressed as a percentage of the rated current being used.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.["dc-information"]["dc-detail"]["dc-load"]'
              master_item:
                key: 'juniper.mx.pem.get["{#NAME}"]'
              tags:
                - tag: component
                  value: power
                - tag: module
                  value: '{#NAME}'
            - uuid: be087a0536fc44dda84a134c852a73d1
              name: 'Module [{#NAME}]: Power'
              type: DEPENDENT
              key: 'juniper.mx.pem.power["{#NAME}"]'
              units: W
              description: 'Information about the PEM power.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.["dc-information"]["dc-detail"]["dc-power"]'
              master_item:
                key: 'juniper.mx.pem.get["{#NAME}"]'
              tags:
                - tag: component
                  value: power
                - tag: module
                  value: '{#NAME}'
            - uuid: d7d795a9aad94665a61c97deaba5f3e1
              name: 'Module [{#NAME}]: State'
              type: DEPENDENT
              key: 'juniper.mx.pem.state["{#NAME}"]'
              description: 'Status of power entry module ''[{#NAME}]''.'
              valuemap:
                name: 'PEM state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.state
                - type: JAVASCRIPT
                  parameters:
                    - 'return [''Online'' , ''Offline''].indexOf(value) + 1 || ''Problem with status processing in JS, no such PEM state: '' + value;'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'juniper.mx.pem.get["{#NAME}"]'
              tags:
                - tag: component
                  value: power
                - tag: module
                  value: '{#NAME}'
            - uuid: bfe9b83a66674edab6860bba48623e6c
              name: 'Module [{#NAME}]: Voltage'
              type: DEPENDENT
              key: 'juniper.mx.pem.voltage["{#NAME}"]'
              value_type: FLOAT
              units: V
              description: 'Information about voltage supplied to the PEM.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.["dc-information"]["dc-detail"]["str3-dc-voltage"]'
              master_item:
                key: 'juniper.mx.pem.get["{#NAME}"]'
              tags:
                - tag: component
                  value: power
                - tag: module
                  value: '{#NAME}'
          master_item:
            key: juniper.mx.pem.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var pems = JSON.parse(value);
                  
                  var result = pems.map(function (pem) {
                    return {
                  	'{#NAME}': pem['name'],
                  	'{#STATE}': pem['state']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Discard PEM Offline state'
              step: '1'
              filter:
                conditions:
                  - macro: '{#STATE}'
                    value: Offline
              operations:
                - operator: REGEXP
                  value: Voltage|Load|Current|Power
                  discover: NO_DISCOVER
                  status: ENABLED
        - uuid: c66b6247780d4513bac42150b368d47a
          name: 'Routing Engine discovery'
          type: DEPENDENT
          key: juniper.mx.routing.engine.discovery
          description: 'Scanning `show chassis routing-engine` for the Routing Engine.'
          item_prototypes:
            - uuid: fc7a8ad154c94ca5b24c3212f6b19a22
              name: 'Routing Engine Slot [{#SLOT}]: CPU background utilization'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.cpu.background.util["{#SLOT}"]'
              units: '%'
              description: 'Percentage of CPU time being used by background processes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["cpu-background"].first()'
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: cpu
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: 4b08b43398e043209a7bd199f8b4cc32
              name: 'Routing Engine Slot [{#SLOT}]: CPU idle'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.cpu.idle["{#SLOT}"]'
              units: '%'
              description: 'Percentage of CPU time that is idle.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["cpu-idle"].first()'
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: cpu
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: 22bc0ff44cc847a2b11cb905d2b0a93c
              name: 'Routing Engine Slot [{#SLOT}]: CPU interrupt utilization'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.cpu.interrupt.util["{#SLOT}"]'
              units: '%'
              description: 'Percentage of CPU time being used by interrupts.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["cpu-interrupt"].first()'
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: cpu
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: 516cb08e3b7d4f138abd62b402279b63
              name: 'Routing Engine Slot [{#SLOT}]: CPU system utilization'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.cpu.system.util["{#SLOT}"]'
              units: '%'
              description: 'Percentage of CPU time being used by system processes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["cpu-system"].first()'
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: cpu
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: 0f0dc50c2a9e49efacb73345f048ae49
              name: 'Routing Engine Slot [{#SLOT}]: CPU temperature'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.cpu.temperature["{#SLOT}"]'
              units: °C
              description: 'Temperature of the CPU Routing Engine.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["cpu-temperature"]["@celsius"].first()'
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: cpu
                - tag: component
                  value: route-engine
                - tag: component
                  value: temperature
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: 9081adce1e1b43d58f6800b1f26039ad
              name: 'Routing Engine Slot [{#SLOT}]: CPU total utilization'
              type: CALCULATED
              key: 'juniper.mx.routing.engine.cpu.total.util["{#SLOT}"]'
              units: '%'
              params: 'last(//juniper.mx.routing.engine.cpu.user.util["{#SLOT}"])+last(//juniper.mx.routing.engine.cpu.system.util["{#SLOT}"])+last(//juniper.mx.routing.engine.cpu.interrupt.util["{#SLOT}"])+last(//juniper.mx.routing.engine.cpu.background.util["{#SLOT}"])'
              description: 'Percentage of total CPU utilization.'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: cpu
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
              trigger_prototypes:
                - uuid: 2c9a8b78c121479aa5525b98afcdb84d
                  expression: 'min(/Juniper MX by NETCONF/juniper.mx.routing.engine.cpu.total.util["{#SLOT}"], 10m) >= {$JUNIPER.MX.CPU.UTIL.MIN}'
                  name: 'Juniper MX: High Routing Engine CPU utilization'
                  event_name: 'Juniper MX: Routing Engine Slot [{#SLOT}]: High CPU utilization: (over >= {$JUNIPER.MX.CPU.UTIL.MIN}% over last 10m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'Routing Engine CPU utilization is too high.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 3219e76abec24d8183bca320cbea6be9
              name: 'Routing Engine Slot [{#SLOT}]: CPU user utilization'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.cpu.user.util["{#SLOT}"]'
              units: '%'
              description: 'Percentage of CPU time being used by user processes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["cpu-user"].first()'
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: cpu
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: 082a4e78e8034e0ba30deff9333c5135
              name: 'Routing Engine Slot [{#SLOT}]: DRAM available'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.dram["{#SLOT}"]'
              units: B
              description: 'Total DRAM available to the Routing Engine''s processor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["memory-dram-size"].first()'
                - type: RTRIM
                  parameters:
                    - MB
                - type: MULTIPLIER
                  parameters:
                    - '1048576'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: memory
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: bf85c3d90d424889b4beee7b6c0a19a1
              name: 'Routing Engine Slot [{#SLOT}]: Get metrics data'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              history: '0'
              value_type: TEXT
              description: 'Gets data for FPC Slot ''[{#SLOT}]''.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.slot == "{#SLOT}")]'
                  error_handler: DISCARD_VALUE
              master_item:
                key: juniper.mx.routing.engine.data.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: 77b060276b2245afb70ea2ffc71e2901
              name: 'Routing Engine Slot [{#SLOT}]: Memory utilization'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.mem.util["{#SLOT}"]'
              units: '%'
              description: 'Percentage of Routing Engine memory being used.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["memory-buffer-utilization"].first()'
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: memory
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
              trigger_prototypes:
                - uuid: 2a1f8f48b260462dbfce0e9a08ead83f
                  expression: 'min(/Juniper MX by NETCONF/juniper.mx.routing.engine.mem.util["{#SLOT}"],5m)>{$JUNIPER.MX.MEMORY.UTIL.MAX}'
                  name: 'Juniper MX: High Routing Engine memory utilization'
                  event_name: 'Juniper MX: Routing Engine Slot [{#SLOT}]: High memory utilization (>{$JUNIPER.MX.MEMORY.UTIL.MAX}% for 5m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'The system is running out of free memory.'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
            - uuid: c8e33d67ecb7403ebf59b95738c5de40
              name: 'Routing Engine Slot [{#SLOT}]: Model'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.model["{#SLOT}"]'
              value_type: TEXT
              description: 'Routing Engine model.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $..model.first()
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: 714f8e7e710d4988933120ea9ed1becb
              name: 'Routing Engine Slot [{#SLOT}]: Last reboot reason'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.reboot["{#SLOT}"]'
              value_type: TEXT
              description: 'Routing Engine last reboot reason.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["last-reboot-reason"].first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: 2d3d6a07927044ea8549a9af78c4fb48
              name: 'Routing Engine Slot [{#SLOT}]: Start time'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.start.time["{#SLOT}"]'
              units: unixtime
              description: 'Time when the Routing Engine started running.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["start-time"]["@seconds"].first()'
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
            - uuid: ed60fc188b9f4e1b81d0f7a20fae611b
              name: 'Routing Engine Slot [{#SLOT}]: Status'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.status["{#SLOT}"]'
              value_type: TEXT
              description: 'Routing Engine status.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $..status.first()
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
              trigger_prototypes:
                - uuid: d10584f9573c4c37affdce2764fd9e35
                  expression: 'last(/Juniper MX by NETCONF/juniper.mx.routing.engine.status["{#SLOT}"])<>"OK"'
                  name: 'Juniper MX: Routing Engine Slot [{#SLOT}]: Status not "OK"'
                  opdata: 'Current status: {ITEM.LASTVALUE}'
                  priority: HIGH
                  description: 'Check the Routing Engine errors.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 9fa9fa28042b466d836e0b4bb2bb0de2
              name: 'Routing Engine Slot [{#SLOT}]: Uptime'
              type: DEPENDENT
              key: 'juniper.mx.routing.engine.uptime["{#SLOT}"]'
              units: uptime
              description: 'How long the Routing Engine has been running.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$..["up-time"]["@seconds"].first()'
              master_item:
                key: 'juniper.mx.routing.engine.get["{#SLOT}"]'
              tags:
                - tag: component
                  value: chassis
                - tag: component
                  value: route-engine
                - tag: route-engine-slot
                  value: '{#SLOT}'
          graph_prototypes:
            - uuid: 7819e37bfdeb427b8a538722f37e358c
              name: 'Juniper MX: Routing Engine Slot [{#SLOT}]: CPU utilization'
              type: STACKED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.routing.engine.cpu.idle["{#SLOT}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.routing.engine.cpu.background.util["{#SLOT}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.routing.engine.cpu.system.util["{#SLOT}"]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.routing.engine.cpu.interrupt.util["{#SLOT}"]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.routing.engine.cpu.user.util["{#SLOT}"]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'Juniper MX by NETCONF'
                    key: 'juniper.mx.routing.engine.cpu.total.util["{#SLOT}"]'
          master_item:
            key: juniper.mx.routing.engine.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var routing_engine = JSON.parse(value);
                  
                  var result = routing_engine.map(function (slot) {
                    return {
                  	'{#SLOT}': slot['slot']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: dc73d54e62dd4a079d0761cb73f15a80
          name: 'Temperature discovery'
          type: DEPENDENT
          key: juniper.mx.temperature.discovery
          description: 'Scanning `show chassis environment` for temperature.'
          item_prototypes:
            - uuid: 6e1a4b34cb5442b69c990d07289c397c
              name: 'Sensor [{#NAME}]: Temperature'
              type: DEPENDENT
              key: 'juniper.mx.temperature["{#NAME}"]'
              units: °C
              description: 'Temperature of air flowing in degrees Celsius (C).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.name==''{#NAME}'')].temperature["@celsius"].first()'
              master_item:
                key: juniper.mx.temperature.data.get
              tags:
                - tag: component
                  value: temperature
                - tag: sensor
                  value: '{#NAME}'
          master_item:
            key: juniper.mx.temperature.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var temperature = JSON.parse(value);
                  
                  var result = temperature.map(function (sensor) {
                    return {
                  	'{#NAME}': sensor['name'],
                  	'{#STATUS}': sensor['status'],
                  	'{#CLASS}': sensor['class']
                    };
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Not OK status'
              step: '1'
              filter:
                conditions:
                  - macro: '{#STATUS}'
                    value: OK
                    operator: NOT_MATCHES_REGEX
              operations:
                - operator: REGEXP
                  value: Temperature
                  discover: NO_DISCOVER
            - name: 'Not Fans'
              step: '2'
              filter:
                conditions:
                  - macro: '{#CLASS}'
                    value: Fans
              operations:
                - operator: REGEXP
                  value: Temperature
                  discover: NO_DISCOVER
      tags:
        - tag: class
          value: network
        - tag: target
          value: juniper
        - tag: target
          value: mx
      macros:
        - macro: '{$JUNIPER.MX.ALARM.CLASS.MATCHES}'
          value: '^.*$'
          description: 'Used for alarm discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '35'
            section_name: Filters
            label: 'Alarm class filter (include)'
            description: 'Used for alarm discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.ALARM.CLASS.NOT_MATCHES}'
          value: '<CHANGE_IF_NEEDED>'
          description: 'Used for alarm discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '36'
            section_name: Filters
            label: 'Alarm class filter (exclude)'
            description: 'Used for alarm discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.ALARM.NAME.MATCHES}'
          value: '^.*$'
          description: 'Used for alarm discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '33'
            section_name: Filters
            label: 'Alarm name filter (include)'
            description: 'Used for alarm discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.ALARM.NAME.NOT_MATCHES}'
          value: '<CHANGE_IF_NEEDED>'
          description: 'Used for alarm discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '34'
            section_name: Filters
            label: 'Alarm name filter (exclude)'
            description: 'Used for alarm discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.BGP.PEER.REMOTE.ADDR.MATCHES}'
          value: '^.*$'
          description: 'Used for BGP discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '31'
            section_name: Filters
            label: 'BGP peer address filter (include)'
            description: 'Used for BGP discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.BGP.PEER.REMOTE.ADDR.NOT_MATCHES}'
          value: '<CHANGE_IF_NEEDED>'
          description: 'Used for BGP discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '32'
            section_name: Filters
            label: 'BGP peer address filter (exclude)'
            description: 'Used for BGP discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.BGP.PEER.STATE}'
          value: ^(6|1)$
          description: 'BGP peer state for a trigger.'
          config:
            type: TEXT
            priority: '28'
            section_name: Other
            label: 'BGP peer state for trigger'
            description: 'BGP peer state for a trigger.'
        - macro: '{$JUNIPER.MX.BGP.ROUTER.NAME.MATCHES}'
          value: '^.*$'
          description: 'Used for BGP discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '29'
            section_name: Filters
            label: 'BGP router name filter (include)'
            description: 'Used for BGP discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.BGP.ROUTER.NAME.NOT_MATCHES}'
          value: '<CHANGE_IF_NEEDED>'
          description: 'Used for BGP discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '30'
            section_name: Filters
            label: 'BGP router name filter (exclude)'
            description: 'Used for BGP discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.CPU.UTIL.MIN}'
          value: '90'
          description: 'Threshold of Routing Engine CPU utilization for a trigger in %.'
          config:
            type: TEXT
            priority: '23'
            section_name: Thresholds
            label: 'Routing Engine CPU threshold (%)'
            description: 'Threshold of Routing Engine CPU utilization for a trigger in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.FPC.BUFFER.MEMORY.UTIL.MAX}'
          value: '80'
          description: 'Threshold of buffer space being used by the FPC''s processor utilization for a trigger in %.'
          config:
            type: TEXT
            priority: '27'
            section_name: Thresholds
            label: 'FPC buffer usage threshold (%)'
            description: 'Threshold of buffer space being used by the FPC''s processor utilization for a trigger in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.FPC.CPU.UTIL.MIN}'
          value: '90'
          description: 'Threshold of CPU being used by the FPC''s processor utilization for a trigger in %.'
          config:
            type: TEXT
            priority: '25'
            section_name: Thresholds
            label: 'FPC CPU usage threshold (%)'
            description: 'Threshold of CPU being used by the FPC''s processor utilization for a trigger in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.FPC.HEAP.MEMORY.UTIL.MAX}'
          value: '70'
          description: 'Threshold of heap space (dynamic memory) being used by the FPC''s processor utilization for a trigger in %.'
          config:
            type: TEXT
            priority: '26'
            section_name: Thresholds
            label: 'FPC heap usage threshold (%)'
            description: 'Threshold of heap space (dynamic memory) being used by the FPC''s processor utilization for a trigger in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.FS.FREE.MIN.CRIT}'
          value: 5G
          description: 'The critical threshold of filesystem utilization.'
          config:
            type: TEXT
            priority: '21'
            section_name: Thresholds
            label: 'Alternate critical filesystem threshold (%)'
            description: 'The critical threshold of filesystem utilization.'
        - macro: '{$JUNIPER.MX.FS.FREE.MIN.WARN}'
          value: 10G
          description: 'The warning threshold of filesystem utilization.'
          config:
            type: TEXT
            priority: '22'
            section_name: Thresholds
            label: 'Alternate warning filesystem threshold (%)'
            description: 'The warning threshold of filesystem utilization.'
        - macro: '{$JUNIPER.MX.FS.FSNAME.MATCHES}'
          value: '^.*$'
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '18'
            section_name: Filters
            label: 'Filesystem discovery filter (exclude)'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.FS.FSNAME.NOT_MATCHES}'
          value: '<CHANGE_IF_NEEDED>'
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '17'
            section_name: Filters
            label: 'Filesystem discovery filter (include)'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.FS.PUSED.MAX.CRIT}'
          value: '90'
          description: 'The critical threshold of filesystem utilization.'
          config:
            type: TEXT
            priority: '19'
            section_name: Thresholds
            label: 'Filesystem usage critical threshold (%)'
            description: 'The critical threshold of filesystem utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.FS.PUSED.MAX.WARN}'
          value: '80'
          description: 'The warning threshold of filesystem utilization.'
          config:
            type: TEXT
            priority: '20'
            section_name: Thresholds
            label: 'Filesystem usage warning threshold (%)'
            description: 'The warning threshold of filesystem utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.MEMORY.UTIL.MAX}'
          value: '90'
          description: 'Threshold of memory utilization for a trigger in %.'
          config:
            type: TEXT
            priority: '24'
            section_name: Thresholds
            label: 'Memory usage threshold (%)'
            description: 'Threshold of memory utilization for a trigger in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.NET.IF.ADMINSTATUS.MATCHES}'
          value: '^.*$'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Admin status filter (include)'
        - macro: '{$JUNIPER.MX.NET.IF.ADMINSTATUS.NOT_MATCHES}'
          value: ^down$
          description: 'Ignore the `down` administrative status'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Admin status filter (exclude)'
            description: 'Ignore the `down` administrative status'
        - macro: '{$JUNIPER.MX.NET.IF.CONTROL}'
          value: '1'
          description: 'The operational state of the interface for the `link down` trigger. Can be used with the interface name as context.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Interface state for link down trigger (use context)'
            description: 'The operational state of the interface for the `link down` trigger. Can be used with the interface name as context.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.NET.IF.IFOPERSTATUS.MATCHES}'
          value: '^.*$'
          description: 'Used for network physical interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Extra interface filter (include)'
            description: 'Used for network physical interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.NET.IF.IFOPERSTATUS.NOT_MATCHES}'
          value: '<CHANGE_IF_NEEDED>'
          description: 'Used for network physical interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Extra interface filter (exclude)'
            description: 'Used for network physical interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.NET.IF.NAME.MATCHES}'
          value: '^.*$'
          description: 'Used for discovering network physical interfaces. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Interface filter (include)'
            description: 'Used for discovering network physical interfaces. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.NET.IF.NAME.NOT_MATCHES}'
          value: '(^Software Loopback Interface|^NULL[0-9.]*$|^[Ll]o[0-9.]*$|^[Ss]ystem$|^Nu[0-9.]*$|^veth[0-9a-z]+$|docker[0-9]+|br-[a-z0-9]{12})'
          description: 'Filters out `loopbacks`, `nulls`, docker `veth` links, and the `docker0` bridge by default.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Interface filter (exclude)'
            description: 'Filters out `loopbacks`, `nulls`, docker `veth` links, and the `docker0` bridge by default.'
        - macro: '{$JUNIPER.MX.NET.IF.SFP.NAME.MATCHES}'
          value: '^.*$'
          description: 'Used for SFP interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '15'
            section_name: Filters
            label: 'SFP discovery filter (include)'
            description: 'Used for SFP interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.NET.IF.SFP.NAME.NOT_MATCHES}'
          value: '<CHANGE_IF_NEEDED>'
          description: 'Used for SFP interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '16'
            section_name: Filters
            label: 'SFP discovery filter (exclude)'
            description: 'Used for SFP interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$JUNIPER.MX.NET.IF.UTIL.MAX}'
          value: '90'
          description: 'The threshold in the hardware interface utilization triggers.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'Interface utilization threshold (%)'
            description: 'The threshold in the hardware interface utilization triggers. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.NETCONF.IP}'
          description: 'The IP address of the Juniper MX device.'
          config:
            type: TEXT
            priority: '3'
            label: 'Device IP'
            description: 'The IP address of the Juniper MX device.'
            required: 'YES'
        - macro: '{$JUNIPER.MX.NETCONF.PASSWORD}'
          type: SECRET_TEXT
          description: 'Juniper NETCONF password.'
          config:
            type: TEXT
            priority: '2'
            label: Password
            description: 'Juniper NETCONF password.'
            required: 'YES'
        - macro: '{$JUNIPER.MX.NETCONF.PORT}'
          value: '830'
          description: 'The NETCONF port of the Juniper MX device.'
          config:
            type: TEXT
            priority: '4'
            label: 'NETCONF port'
            description: 'The NETCONF port of the Juniper MX device. In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.NETCONF.RESPONSE_TIME.MAX.WARN}'
          value: '10'
          description: 'The maximum Juniper NETCONF response time expressed in seconds, for a trigger expression.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'Max NETCONF response time (sec)'
            description: 'The maximum Juniper NETCONF response time expressed in seconds, for a trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JUNIPER.MX.NETCONF.TIMEOUT}'
          value: 15s
          description: 'SSH response timeout.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'SSH timeout'
            description: 'SSH response timeout.'
        - macro: '{$JUNIPER.MX.NETCONF.USERNAME}'
          description: 'Juniper NETCONF username.'
          config:
            type: TEXT
            priority: '1'
            label: Username
            description: 'Juniper NETCONF username.'
            required: 'YES'
      dashboards:
        - uuid: 6515b40b447a4037bb602813c07c5ed1
          name: 'Juniper MX: Overview'
          pages:
            - name: 'Routing Engine'
              widgets:
                - type: itemnavigator
                  name: 'CPU utilization'
                  width: '12'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: route-engine-slot
                    - type: STRING
                      name: items.0
                      value: 'Routing Engine Slot [*]: CPU * utilization'
                    - type: STRING
                      name: reference
                      value: UBMEB
                - type: itemnavigator
                  name: 'Memory utilization'
                  'y': '5'
                  width: '12'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: route-engine-slot
                    - type: STRING
                      name: items.0
                      value: 'Routing Engine Slot [*]: Memory utilization'
                    - type: STRING
                      name: reference
                      value: DUPNP
                - type: itemnavigator
                  name: 'Running time'
                  'y': '10'
                  width: '12'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: route-engine-slot
                    - type: STRING
                      name: items.0
                      value: 'Routing Engine Slot [*time'
                    - type: STRING
                      name: reference
                      value: GVYTE
                - type: svggraph
                  name: 'CPU utilization'
                  x: '12'
                  width: '36'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 7495f7
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: UBMEB._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: NINNI
                    - type: INTEGER
                      name: righty
                      value: '0'
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: svggraph
                  name: 'Memory utilization'
                  x: '12'
                  'y': '5'
                  width: '36'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 147aaa
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: DUPNP._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: OUWQN
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: item
                  name: Uptime
                  x: '12'
                  'y': '10'
                  width: '25'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: itemid._reference
                      value: GVYTE._itemid
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: STRING
                      name: units_color
                      value: 1565C0
                    - type: STRING
                      name: value_color
                      value: 84b135
                    - type: INTEGER
                      name: value_size
                      value: '20'
                - type: item
                  name: 'Last reboot reason'
                  x: '37'
                  'y': '10'
                  width: '23'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: itemid._reference
                      value: HCJBE._itemid
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: STRING
                      name: value_color
                      value: 84b135
                    - type: INTEGER
                      name: value_size
                      value: '20'
                - type: item
                  name: 'CPU temperature'
                  x: '48'
                  width: '12'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: down_color
                      value: 0080FF
                    - type: STRING
                      name: itemid._reference
                      value: CYJMB._itemid
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                    - type: STRING
                      name: units_color
                      value: 78909C
                    - type: INTEGER
                      name: units_size
                      value: '25'
                    - type: STRING
                      name: up_color
                      value: FF0000
                    - type: STRING
                      name: value_color
                      value: 84b135
                    - type: INTEGER
                      name: value_size
                      value: '30'
                - type: honeycomb
                  name: Status
                  x: '48'
                  'y': '5'
                  width: '24'
                  height: '5'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 84b135
                    - type: STRING
                      name: items.0
                      value: 'Routing Engine Slot [*]: Status'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: DDBDC
                    - type: STRING
                      name: secondary_label_color
                      value: 2334b9
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: itemnavigator
                  name: 'CPU temperature'
                  x: '60'
                  width: '12'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: route-engine-slot
                    - type: STRING
                      name: items.0
                      value: 'Routing Engine Slot [*]: CPU temperature'
                    - type: STRING
                      name: reference
                      value: CYJMB
                - type: itemnavigator
                  name: 'Reboot reason'
                  x: '60'
                  'y': '10'
                  width: '12'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: route-engine-slot
                    - type: STRING
                      name: items.0
                      value: 'Routing Engine Slot [*]: Last reboot reason'
                    - type: STRING
                      name: reference
                      value: HCJBE
            - name: FPC
              widgets:
                - type: itemnavigator
                  name: 'CPU total utilization'
                  width: '11'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: fpc-slot
                    - type: STRING
                      name: items.0
                      value: 'FPC Slot [*]: CPU total utilization'
                    - type: STRING
                      name: reference
                      value: EXLMY
                - type: itemnavigator
                  name: 'Running time'
                  'y': '5'
                  width: '11'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: fpc-slot
                    - type: STRING
                      name: items.0
                      value: 'FPC Slot [*time'
                    - type: STRING
                      name: reference
                      value: ADFBC
                - type: gauge
                  name: 'CPU total utilization'
                  x: '11'
                  width: '14'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: angle
                      value: '270'
                    - type: STRING
                      name: empty_color
                      value: 78909C
                    - type: STRING
                      name: itemid._reference
                      value: EXLMY._itemid
                    - type: INTEGER
                      name: show.0
                      value: '3'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                    - type: INTEGER
                      name: show.2
                      value: '2'
                    - type: INTEGER
                      name: show.3
                      value: '5'
                    - type: STRING
                      name: value_arc_color
                      value: d00700
                - type: item
                  name: 'Running time'
                  x: '11'
                  'y': '5'
                  width: '25'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: itemid._reference
                      value: ADFBC._itemid
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: STRING
                      name: units_color
                      value: 1565C0
                    - type: STRING
                      name: value_color
                      value: 84b135
                    - type: INTEGER
                      name: value_size
                      value: '20'
                - type: svggraph
                  name: 'Memory utilization'
                  x: '25'
                  width: '36'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 147aaa
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: XPKCQ._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: DEEAA
                - type: honeycomb
                  name: State
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 84b135
                    - type: STRING
                      name: items.0
                      value: 'FPC Slot [*]: State'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: KWIFH
                    - type: STRING
                      name: secondary_label_color
                      value: 2334b9
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: itemnavigator
                  name: 'Memory utilization'
                  x: '61'
                  width: '11'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: fpc-slot
                    - type: STRING
                      name: items.0
                      value: 'FPC Slot [*]: *utilization'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '0'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: memory
                    - type: STRING
                      name: reference
                      value: XPKCQ
            - name: 'Network interfaces'
              widgets:
                - type: itemnavigator
                  name: 'Interfaces input data'
                  width: '14'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: interface
                    - type: STRING
                      name: items.0
                      value: 'Interface [*: Input *'
                    - type: STRING
                      name: reference
                      value: DCBAF
                    - type: INTEGER
                      name: show_lines
                      value: '300'
                - type: itemnavigator
                  name: 'Interfaces output data'
                  'y': '6'
                  width: '14'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: interface
                    - type: STRING
                      name: items.0
                      value: 'Interface [*: Output *'
                    - type: STRING
                      name: reference
                      value: ABDEC
                    - type: INTEGER
                      name: show_lines
                      value: '300'
                - type: svggraph
                  name: Interface
                  x: '14'
                  width: '58'
                  height: '12'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 97580b
                    - type: STRING
                      name: ds.0.color.1
                      value: 665b89
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: DCBAF._itemid
                    - type: STRING
                      name: ds.0.itemids.1._reference
                      value: ABDEC._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: STRING
                      name: reference
                      value: CDAEE
                    - type: INTEGER
                      name: working_time
                      value: '1'
            - name: 'Digital Lane Monitoring'
              widgets:
                - type: itemnavigator
                  name: TX
                  width: '14'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: sfp
                    - type: STRING
                      name: items.0
                      value: '*Tx optical power'
                    - type: STRING
                      name: reference
                      value: AFBCA
                    - type: INTEGER
                      name: show_lines
                      value: '200'
                - type: itemnavigator
                  name: RX
                  'y': '6'
                  width: '14'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: sfp
                    - type: STRING
                      name: items.0
                      value: '*Rx optical power'
                    - type: STRING
                      name: reference
                      value: CDEFB
                    - type: INTEGER
                      name: show_lines
                      value: '200'
                - type: svggraph
                  name: 'TX optical power lane'
                  x: '14'
                  width: '58'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 29b00b
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: AFBCA._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: STRING
                      name: reference
                      value: CDAEE
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: svggraph
                  name: 'Rx optical power lane'
                  x: '14'
                  'y': '6'
                  width: '58'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 0d62c3
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: CDEFB._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: STRING
                      name: reference
                      value: CEACB
                    - type: INTEGER
                      name: working_time
                      value: '1'
            - name: BGP/OSPF
              widgets:
                - type: honeycomb
                  name: 'BGP Peer State'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 84B135
                    - type: STRING
                      name: items.0
                      value: '*peer * State'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: EACDB
                    - type: STRING
                      name: secondary_label_color
                      value: 2334b9
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: itemnavigator
                  name: 'BGP prefixes'
                  'y': '6'
                  width: '20'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: address
                    - type: STRING
                      name: items.0
                      value: 'BGP * prefixes'
                    - type: STRING
                      name: reference
                      value: DBFDE
                    - type: INTEGER
                      name: show_lines
                      value: '200'
                - type: svggraph
                  name: Prefixes
                  x: '20'
                  'y': '6'
                  width: '52'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 088f25
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: DBFDE._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: STRING
                      name: reference
                      value: DCEFF
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: honeycomb
                  name: 'OSPF Neighbor State'
                  x: '36'
                  width: '18'
                  height: '6'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 84B135
                    - type: STRING
                      name: items.0
                      value: '*OSPF Neighbor * State'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: EAECE
                    - type: STRING
                      name: secondary_label_color
                      value: 2334b9
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'OSPFv3 Neighbor State'
                  x: '54'
                  width: '18'
                  height: '6'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 84B135
                    - type: STRING
                      name: items.0
                      value: '*OSPFv3 Neighbor * State'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: FEAAE
                    - type: STRING
                      name: secondary_label_color
                      value: 2334b9
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
            - name: 'Temperature sensors'
              widgets:
                - type: svggraph
                  name: 'Control board CPU'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 4000FF
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Sensor [CB * CPU *]: Temperature'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: STRING
                      name: reference
                      value: CBCAF
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: svggraph
                  name: 'Power Entry Module'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '666699'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Sensor [PEM *]: Temperature'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: STRING
                      name: reference
                      value: CFADB
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: svggraph
                  name: 'Control board'
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 607D8B
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Sensor [CB * Top *]: Temperature'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: STRING
                      name: reference
                      value: FDDAC
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: svggraph
                  name: FPC
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 689F38
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Sensor [FPC *]: Temperature'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: STRING
                      name: reference
                      value: BFCBD
                    - type: INTEGER
                      name: working_time
                      value: '1'
            - name: FAN
              widgets:
                - type: itemnavigator
                  name: RPM
                  width: '12'
                  height: '8'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Module [*]: Fan speed'
                    - type: STRING
                      name: reference
                      value: EFBCE
                    - type: INTEGER
                      name: show_lines
                      value: '200'
                - type: gauge
                  x: '12'
                  width: '28'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: angle
                      value: '270'
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 78909C
                    - type: STRING
                      name: itemid._reference
                      value: EFBCE._itemid
                    - type: STRING
                      name: max
                      value: '25000'
                    - type: INTEGER
                      name: show.0
                      value: '3'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                    - type: INTEGER
                      name: show.2
                      value: '2'
                    - type: INTEGER
                      name: show.3
                      value: '5'
                    - type: INTEGER
                      name: units_size
                      value: '15'
                    - type: STRING
                      name: value_arc_color
                      value: 84b135
                - type: svggraph
                  name: 'Speed, in %'
                  x: '12'
                  'y': '4'
                  width: '28'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 207cb6
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Module [*]: Percentage speed'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: STRING
                      name: reference
                      value: CCCBD
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: honeycomb
                  name: Status
                  x: '40'
                  width: '32'
                  height: '8'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 84B135
                    - type: STRING
                      name: items.0
                      value: 'Module [*]: Status'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AEBCF
                    - type: STRING
                      name: secondary_label_color
                      value: 2334b9
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
            - name: 'Power Entry Module'
              widgets:
                - type: honeycomb
                  name: 'PEM State'
                  width: '24'
                  height: '6'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 84b135
                    - type: STRING
                      name: items.0
                      value: 'Module *: State'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: DDBDC
                    - type: STRING
                      name: secondary_label_color
                      value: 2334b9
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: E65660
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '2'
                - type: svggraph
                  name: Current
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: ea8e25
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Module *: Current'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: STRING
                      name: reference
                      value: BBCBB
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: svggraph
                  name: Load
                  x: '24'
                  width: '24'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 8724ea
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Module *: Load'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: STRING
                      name: reference
                      value: EDFAD
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: svggraph
                  name: Voltage
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 303F9F
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Module *: Voltage'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: STRING
                      name: reference
                      value: AEBDE
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: svggraph
                  name: Power
                  x: '48'
                  width: '24'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '282e87'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Module *: Power'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: STRING
                      name: reference
                      value: DFBDE
                    - type: INTEGER
                      name: working_time
                      value: '1'
            - name: Space
              widgets:
                - type: piechart
                  name: Available
                  width: '24'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: draw_type
                      value: '1'
                    - type: STRING
                      name: ds.0.color
                      value: 84b135
                    - type: STRING
                      name: ds.0.items.0
                      value: 'FS * Space: Available'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_value
                      value: '1'
                    - type: INTEGER
                      name: space
                      value: '3'
                    - type: INTEGER
                      name: total_show
                      value: '1'
                    - type: STRING
                      name: units
                      value: ' '
                    - type: INTEGER
                      name: units_show
                      value: '1'
                - type: svggraph
                  name: 'Used, in %'
                  'y': '6'
                  width: '72'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: a25353
                    - type: STRING
                      name: ds.0.items.0
                      value: 'FS *: Space: Used, in %'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: STRING
                      name: reference
                      value: CAFAB
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: piechart
                  name: Used
                  x: '24'
                  width: '24'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: draw_type
                      value: '1'
                    - type: STRING
                      name: ds.0.color
                      value: e8853a
                    - type: STRING
                      name: ds.0.items.0
                      value: 'FS * Space: Used'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_value
                      value: '1'
                    - type: INTEGER
                      name: space
                      value: '3'
                    - type: INTEGER
                      name: total_show
                      value: '1'
                    - type: STRING
                      name: units
                      value: ' '
                    - type: INTEGER
                      name: units_show
                      value: '1'
                - type: piechart
                  name: Total
                  x: '48'
                  width: '24'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: draw_type
                      value: '1'
                    - type: STRING
                      name: ds.0.color
                      value: 5a49c7
                    - type: STRING
                      name: ds.0.items.0
                      value: 'FS * Space: Total'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_value
                      value: '1'
                    - type: INTEGER
                      name: space
                      value: '3'
                    - type: INTEGER
                      name: total_show
                      value: '1'
                    - type: STRING
                      name: units
                      value: ' '
                    - type: INTEGER
                      name: units_show
                      value: '1'
      valuemaps:
        - uuid: 33d53176ef7543eaa868381569532b2e
          name: 'Alarm severity'
          mappings:
            - value: '1'
              newvalue: Info
            - value: '2'
              newvalue: Minor
            - value: '3'
              newvalue: Major
            - value: '4'
              newvalue: Critical
        - uuid: 306f5cccb3d54f27bc1c5afc987fab4f
          name: 'BGP peer state'
          mappings:
            - value: '1'
              newvalue: idle
            - value: '2'
              newvalue: connect
            - value: '3'
              newvalue: active
            - value: '4'
              newvalue: opensent
            - value: '5'
              newvalue: openconfirm
            - value: '6'
              newvalue: established
        - uuid: 5e2aa39070af44e1b4ebe151570e1d51
          name: 'FAN status'
          mappings:
            - value: '1'
              newvalue: OK
            - value: '2'
              newvalue: Check
        - uuid: 49872af732044c66890066e5f34ae60b
          name: 'FPC slot state'
          mappings:
            - value: '1'
              newvalue: Dead
            - value: '2'
              newvalue: Diag
            - value: '3'
              newvalue: Dormant
            - value: '4'
              newvalue: Empty
            - value: '5'
              newvalue: Offline
            - value: '6'
              newvalue: Online
            - value: '7'
              newvalue: Present
            - value: '8'
              newvalue: Probed
            - value: '9'
              newvalue: Probe-wait
            - value: '10'
              newvalue: Unknown
            - value: '11'
              newvalue: Onlining
            - value: '12'
              newvalue: Offlining
            - value: '13'
              newvalue: Fault
            - value: '14'
              newvalue: Fault-off
            - value: '15'
              newvalue: Spare
        - uuid: fba99ee500df44d3b08f75d90f763834
          name: 'Operational status'
          mappings:
            - value: '1'
              newvalue: up
            - value: '2'
              newvalue: down
            - value: '4'
              newvalue: unknown
            - value: '5'
              newvalue: dormant
            - value: '6'
              newvalue: notPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: e80f0208b55940c4bc79332026d987e9
          name: 'OSPF neighbor state'
          mappings:
            - value: '1'
              newvalue: Attempt
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Exchange
            - value: '4'
              newvalue: ExStart
            - value: '5'
              newvalue: Full
            - value: '6'
              newvalue: Init
            - value: '7'
              newvalue: Loading
            - value: '8'
              newvalue: 2Way
        - uuid: 4a9f2fcadddb4209aff2b37669301409
          name: 'PEM state'
          mappings:
            - value: '1'
              newvalue: Online
            - value: '2'
              newvalue: Offline
        - uuid: c08a38a20c054fa4b6a99916ca884921
          name: 'Service status'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 4958b76448d74ff1b6d7d6280449beee
      template: 'Proxmox VE by HTTP'
      name: 'Proxmox VE by HTTP'
      description: |
        Proxmox VE is a complete open-source platform for enterprise virtualization.
        It tightly integrates two virtualization technologies: KVM for virtual machines
        and LXC for containers, on a single platform.
        This template is designed for the effortless deployment of Proxmox VE monitoring by Zabbix via HTTP and doesn't require any external scripts.
        
        Proxmox VE uses a REST like API. The concept is described in Resource Oriented Architecture (ROA).
        
        Check the API documentation for details:
        https://pve.proxmox.com/pve-docs/api-viewer/index.html
        
        Setup:
        
        1. Create an API token for the monitoring user. Important note: for security reasons, it is recommended to create a separate user (Datacenter - Permissions).
        
        Please provide the necessary access levels for both the User and the Token:
        
        * /cluster/resources
        * /cluster/status
        * /access/users
        * /nodes
        * /nodes/{#NODE.NAME}/apt/update
        * /nodes/{#NODE.NAME}/certificates/info
        * /nodes/{#NODE.NAME}/disks/list
        * /nodes/{#NODE.NAME}/disks/smart?disk={#DISK.NAME}
        * /nodes/{#NODE.NAME}/hardware/pci
        * /nodes/{#NODE.NAME}/hardware/usb
        * /nodes/{#NODE.NAME}/lxc
        * /nodes/{#NODE.NAME}/lxc/{#LXC.VMID}/status/current
        * /nodes/{#NODE.NAME}/qemu
        * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-fsinfo
        * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-osinfo
        * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-time
        * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-timezone
        * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/info
        * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/network-get-interfaces
        * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/status/current
        * /nodes/{#NODE.NAME}/storage
        * /nodes/{#NODE.NAME}/time
        * /nodes/{#NODE.NAME}/version
        
        2. Copy the resulting Token ID and Secret into the host macros '{$PVE.TOKEN.ID}' and '{$PVE.TOKEN.SECRET}'.
        
        3. Set the hostname or IP address of the Proxmox VE API host in the '{$PVE.URL.HOST}' macro. You can also change the API port in the '{$PVE.URL.PORT}' macro if necessary.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        Proxmox VE is a complete open-source platform for enterprise virtualization.
        It tightly integrates two virtualization technologies: KVM for virtual machines
        and LXC for containers, on a single platform.
        
        ## Setup
        
        To use this template, you need to have a Proxmox VE server set up and accessible via HTTP.
        Ensure that you have the necessary API access configured on your Proxmox VE server.
        Check the [`API documentation`](https://pve.proxmox.com/pve-docs/api-viewer/index.html) for details.
        
        1. Create an API token for the monitoring user. Important note: for security reasons, it is recommended to create a separate user (Datacenter - Permissions).
        
        Please provide the necessary access levels for both the User and the Token:
        
            * /cluster/resources
            * /cluster/status
            * /access/users
            * /nodes
            * /nodes/{#NODE.NAME}/apt/update
            * /nodes/{#NODE.NAME}/certificates/info
            * /nodes/{#NODE.NAME}/disks/list
            * /nodes/{#NODE.NAME}/disks/smart?disk={#DISK.NAME}
            * /nodes/{#NODE.NAME}/hardware/pci
            * /nodes/{#NODE.NAME}/hardware/usb
            * /nodes/{#NODE.NAME}/lxc
            * /nodes/{#NODE.NAME}/lxc/{#LXC.VMID}/status/current
            * /nodes/{#NODE.NAME}/qemu
            * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-fsinfo
            * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-osinfo
            * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-time
            * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-timezone
            * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/info
            * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/network-get-interfaces
            * /nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/status/current
            * /nodes/{#NODE.NAME}/storage
            * /nodes/{#NODE.NAME}/time
            * /nodes/{#NODE.NAME}/version
        
        2. Copy the resulting Token ID and Secret into `Proxmox VE API Token ID` and `Proxmox VE API Token Secret`.
        
        3. Set the hostname or IP address of the Proxmox API VE host in the `Proxmox VE Host`. You can also change the API port in the `Proxmox VE Port` if necessary.
      vendor:
        name: Zabbix
        version: 8.0-3
      groups:
        - name: Templates/Applications
      items:
        - uuid: 09dbc145122f45afa2b20cfba08899b8
          name: 'Cluster: Number of CPUs'
          type: DEPENDENT
          key: proxmox_ve.cluster.cpu.count
          description: 'Retrieves the total number of CPUs in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.cpu_count
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: cpu
        - uuid: 5fe36fb1f830484db35311a10b4a258f
          name: 'Cluster: CPU utilization'
          type: DEPENDENT
          key: proxmox_ve.cluster.cpu.utilization
          value_type: FLOAT
          units: '%'
          description: 'Retrieves the CPU utilization percentage for the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.cpu_average
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: cpu
        - uuid: 7edd8666cbca4ea1a8508bf17ca4f245
          name: 'Cluster: Number of running LXC containers'
          type: DEPENDENT
          key: proxmox_ve.cluster.lxc.running
          description: 'Retrieves the number of running LXC containers in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.lxc_running
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
        - uuid: c7a1dc8391374ddfb8bee19ab3bdb676
          name: 'Cluster: Number of stopped LXC containers'
          type: DEPENDENT
          key: proxmox_ve.cluster.lxc.stopped
          description: 'Retrieves the number of stopped LXC containers in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.lxc_stopped
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
        - uuid: 5aa2f7c8e1bc40e3bc045bcc056cb6bc
          name: 'Cluster: Memory total'
          type: DEPENDENT
          key: proxmox_ve.cluster.memory.total
          units: B
          description: 'Retrieves the total memory available in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.memory_total
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: memory
        - uuid: 5c39086a40e5400cafe58d8be7961bd8
          name: 'Cluster: Memory used'
          type: DEPENDENT
          key: proxmox_ve.cluster.memory.used
          units: B
          description: 'Retrieves the total memory used in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.memory_used
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: memory
        - uuid: f22284321a154ed89ea1a0afc3f8aea1
          name: 'Cluster: Memory utilization'
          type: DEPENDENT
          key: proxmox_ve.cluster.memory.utilization
          value_type: FLOAT
          units: '%'
          description: 'Retrieves the memory utilization percentage for the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.memory_utilization
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: memory
        - uuid: 3ba7a55cfe3847d7b1d3de50e8f5b4ca
          name: 'Cluster: Number of cluster nodes'
          type: DEPENDENT
          key: proxmox_ve.cluster.nodes
          description: 'Retrieves the number of nodes in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.nodes
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
        - uuid: 47516178b1174f11ad5ad6ca2aed037f
          name: 'Cluster: Number of cluster nodes offline'
          type: DEPENDENT
          key: proxmox_ve.cluster.nodes.offline
          description: 'Retrieves the number of offline nodes in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.node_offline
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
        - uuid: 7980048fe7f843de9c31a5f479096dd0
          name: 'Cluster: Number of cluster nodes online'
          type: DEPENDENT
          key: proxmox_ve.cluster.nodes.online
          description: 'Retrieves the number of online nodes in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.node_online
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
        - uuid: 7ec9cf0b3308474ab7fde901762eccd9
          name: 'Cluster: Quorum status'
          type: DEPENDENT
          key: proxmox_ve.cluster.quorum.status
          description: 'Retrieves the cluster quorum status from the Proxmox VE API.'
          valuemap:
            name: 'Proxmox cluster quorum status'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.quorate
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
          triggers:
            - uuid: 76cc334b9e3c4f909131a4f60dc089b2
              expression: 'last(/Proxmox VE by HTTP/proxmox_ve.cluster.quorum.status) = 0'
              name: 'Proxmox VE: Cluster quorum status changed'
              priority: WARNING
              description: 'No majority of nodes for decision making.'
              manual_close: 'YES'
        - uuid: 2f0b1c8d3a5e4b9c8f6d7e8f9a0b1c2d
          name: 'Cluster: Get resources'
          type: SCRIPT
          key: proxmox_ve.cluster.resources.get
          delay: '{$PVE.PARAMS.INTERVAL.CLUSTER}'
          history: '0'
          value_type: TEXT
          params: |
            var Proxmox = {
            	params: {},
            
            	output: {
            		'status': 0,
            		'data': {
            			'cluster': {
            				'lxc_running': 0,
            				'qemu_running': 0,
            				'lxc_stopped': 0,
            				'qemu_stopped': 0,
            				'cpu_count': 0,
            				'cpu_usage_summary': 0,
            				'cpu_average': 0,
            				'nodes': 1,
            				'node_online': 0,
            				'node_offline': 0,
            				'memory_used': 0,
            				'memory_total': 0,
            				'memory_utilization': 0,
            				'quorate': 2,
            			},
            			'nodes': {},
            			'qemu': [],
            			'lxc': [],
            			'storage': {
            				'count': 0,
            				'used': 0,
            				'total': 0,
            				'utilization': 0,
            				'list': []
            			}
            		},
            		'message': ''
            	},
            
            	getField: function (data, path, val, valAsKey) {
            		var steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            
            			var step = steps[i];
            			if (typeof data !== 'object' || data === null || typeof data[step] === 'undefined') {
            				if (typeof val === 'undefined') {
            					throw 'Required field was not found: "' + path + '". Input data: ' + JSON.stringify(data);
            				}
            				return typeof valAsKey !== 'undefined' ? Proxmox.getField(data, val, 'undefined') : val;
            			}
            
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	setParams: function (params) {
            		Proxmox.params['proxy'] = params.proxy;
            
            		['url', 'token', 'token_id'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: "' + field + '".';
            			}
            			Proxmox.params[field] = params[field];
            		});
            	},
            
            	getData: function () {
            		var request = new HttpRequest();
            
            		if (typeof Proxmox.params.proxy !== 'undefined' && Proxmox.params.proxy !== '') {
            			request.setProxy(Proxmox.params.proxy);
            		}
            
            		request.addHeader('Authorization: PVEAPIToken=' + Proxmox.params.token_id + '=' + Proxmox.params.token);
            
            		var clusterStatus = request.get(Proxmox.params.url + '/cluster/status');
            		if (request.getStatus() !== 200) {
            			throw 'Request failed with status code ' + request.getStatus() + ' Response: ' + clusterStatus + '.';
            		}
            
            		var clusterResources = request.get(Proxmox.params.url + '/cluster/resources');
            		if (request.getStatus() !== 200) {
            			throw 'Request failed with status code ' + request.getStatus() + ' Response: ' + clusterResources + '.';
            		}
            
            		try {
            			clusterStatus = JSON.parse(clusterStatus);
            		} catch (e) {
            			throw 'Failed to parse cluster status response: ' + e.message;
            		}
            
            		try {
            			clusterResources = JSON.parse(clusterResources);
            		} catch (e) {
            			throw 'Failed to parse cluster resources response: ' + e.message;
            		}
            
            		Proxmox.getField(clusterStatus, 'data', []).forEach(function (node) {
            
            			if (node.type === 'cluster') {
            				Proxmox.output['data']['cluster']['name'] = Proxmox.getField(node, 'name', '');
            				Proxmox.output['data']['cluster']['nodes'] = Proxmox.getField(node, 'nodes', 1);
            				Proxmox.output['data']['cluster']['version'] = Proxmox.getField(node, 'version', 0);
            				Proxmox.output['data']['cluster']['quorate'] = Proxmox.getField(node, 'quorate', 0);
            
            			} else if (node.type === 'node') {
            				var nodeName = Proxmox.getField(node, 'name');
            
            				Proxmox.output['data']['nodes'][nodeName] = {
            					'name': nodeName,
            					'id': Proxmox.getField(node, 'id', ''),
            					'ip': Proxmox.getField(node, 'ip', ''),
            					'level': Proxmox.getField(node, 'level', ''),
            					'local': Proxmox.getField(node, 'local', 0),
            					'online': Proxmox.getField(node, 'online', 0)
            				};
            			}
            		});
            
            		var storageList = [],
            			resourceList = Proxmox.getField(clusterResources, 'data', []);
            
            		for (var i = 0; i < resourceList.length; i++) {
            			var resource = resourceList[i];
            
            			if (resource.type === 'storage') {
            				var storageName = Proxmox.getField(resource, 'storage');
            
            				if (Proxmox.getField(resource, 'shared', 0) === 1) {
            					if (storageList.indexOf(storageName) !== -1) {
            						continue;
            					}
            					storageList.push(storageName);
            					Proxmox.output['data']['storage']['list'].push(resource);
            				}
            
            				Proxmox.output['data']['storage']['count']++;
            				Proxmox.output['data']['storage']['used'] += Proxmox.getField(resource, 'disk', 0);
            				Proxmox.output['data']['storage']['total'] += Proxmox.getField(resource, 'maxdisk', 0);
            				Proxmox.output['data']['storage']['utilization'] = Math.round((Proxmox.output['data']['storage']['used'] / Proxmox.output['data']['storage']['total']) * 100);
            
            			} else if (resource.type === 'lxc') {
            
            				Proxmox.output['data']['lxc'].push({
            					'vmid': Proxmox.getField(resource, 'vmid'),
            					'name': Proxmox.getField(resource, 'name', 'vmid', true),
            					'status': Proxmox.getField(resource, 'status', 'unknown'),
            					'node': Proxmox.getField(resource, 'node')
            				});
            
            				if (Proxmox.getField(resource, 'status') === 'running') {
            					Proxmox.output['data']['cluster']['lxc_running']++;
            				} else {
            					Proxmox.output['data']['cluster']['lxc_stopped']++;
            				}
            
            			} else if (resource.type === 'qemu') {
            
            				Proxmox.output['data']['qemu'].push({
            					'vmid': Proxmox.getField(resource, 'vmid'),
            					'name': Proxmox.getField(resource, 'name', 'vmid', true),
            					'status': Proxmox.getField(resource, 'status', 'unknown'),
            					'node': Proxmox.getField(resource, 'node')
            				});
            
            				if (Proxmox.getField(resource, 'status') === 'running') {
            					Proxmox.output['data']['cluster']['qemu_running']++;
            				} else {
            					Proxmox.output['data']['cluster']['qemu_stopped']++;
            				}
            
            			} else if (resource.type === 'node') {
            
            				if (Proxmox.getField(resource, 'status', 'offline') === 'online') {
            					Proxmox.output['data']['cluster']['node_online']++;
            				} else {
            					Proxmox.output['data']['cluster']['node_offline']++;
            				}
            
            				Proxmox.output['data']['cluster']['cpu_count'] += Proxmox.getField(resource, 'maxcpu', 0);
            				Proxmox.output['data']['cluster']['memory_used'] += Proxmox.getField(resource, 'mem', 0);
            				Proxmox.output['data']['cluster']['memory_total'] += Proxmox.getField(resource, 'maxmem', 0);
            				Proxmox.output['data']['cluster']['memory_utilization'] = Math.round((Proxmox.output['data']['cluster']['memory_used'] / Proxmox.output['data']['cluster']['memory_total']) * 100);
            				Proxmox.output['data']['cluster']['cpu_usage_summary'] += Proxmox.getField(resource, 'cpu', 0) * 100;
            				Proxmox.output['data']['cluster']['cpu_average'] = Math.round(Proxmox.output['data']['cluster']['cpu_usage_summary'] / Proxmox.output['data']['cluster']['node_online']);
            			}
            		}
            	}
            }
            
            try {
            	Proxmox.setParams(JSON.parse(value));
            	Proxmox.getData();
            }
            catch (error) {
            	error += (String(error).endsWith('.')) ? '' : '.';
            
            	Zabbix.log(3, '[ Proxmox ] ERROR: ' + error);
            
            	Proxmox.output['status'] = 1;
            	Proxmox.output['message'] = error;
            }
            
            return JSON.stringify(Proxmox.output);
          description: 'Retrieves the list of cluster resources from the Proxmox VE API.'
          parameters:
            - name: proxy
              value: '{$PVE.PROXY}'
            - name: token
              value: '{$PVE.TOKEN.SECRET}'
            - name: token_id
              value: '{$PVE.TOKEN.ID}'
            - name: url
              value: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json/'
          tags:
            - tag: component
              value: raw
          triggers:
            - uuid: 3f95331b7f6445f7b1a3d9b4b27d8159
              expression: 'jsonpath(last(/Proxmox VE by HTTP/proxmox_ve.cluster.resources.get), "$.status") <> 0 or jsonpath(last(/Proxmox VE by HTTP/proxmox_ve.cluster.resources.get), "$.message") <> ""'
              name: 'Proxmox VE: Cluster resources update error'
              event_name: 'Proxmox VE: Cluster resources update error ($2)'
              opdata: 'Error code: $1, Message: $2'
              priority: HIGH
              description: 'An error occurred while retrieving cluster resources from the Proxmox VE API.'
        - uuid: 0ffefc2cfacd4607aac7987c5b3d3d1e
          name: 'Cluster: Storage total'
          type: DEPENDENT
          key: proxmox_ve.cluster.storage.total
          units: B
          description: 'Retrieves the total storage available in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.storage.total
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: storage
        - uuid: 595f3b541ae74b04a91454ea7b9c09d6
          name: 'Cluster: Storage used'
          type: DEPENDENT
          key: proxmox_ve.cluster.storage.used
          units: B
          description: 'Retrieves the total storage used in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.storage.used
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: storage
        - uuid: 442fa25a1740472c8bcd0dc55377bf81
          name: 'Cluster: Storage utilization'
          type: DEPENDENT
          key: proxmox_ve.cluster.storage.utilization
          value_type: FLOAT
          units: '%'
          description: 'Retrieves the storage utilization percentage for the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.storage.utilization
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: storage
        - uuid: 4ce0c2c7899f4f97bbf2e87006fd717f
          name: 'Cluster: Number of running virtual machines'
          type: DEPENDENT
          key: proxmox_ve.cluster.vms.running
          description: 'Retrieves the number of running virtual machines in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.qemu_running
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
        - uuid: 0d8d98002ea948fab249d9273a03f6fa
          name: 'Cluster: Number of stopped virtual machines'
          type: DEPENDENT
          key: proxmox_ve.cluster.vms.stopped
          description: 'Retrieves the number of stopped virtual machines in the Proxmox VE cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.cluster.qemu_stopped
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: proxmox_ve.cluster.resources.get
          tags:
            - tag: component
              value: cluster
        - uuid: 22ca0c07d8824fa2aae0b7763049c9ec
          name: 'Cluster: Get node data'
          type: HTTP_AGENT
          key: proxmox_ve.get_node_data
          delay: '{$PVE.PARAMS.INTERVAL.NODE}'
          history: '0'
          value_type: TEXT
          description: 'Retrieves the list of nodes from the Proxmox VE API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data
              error_handler: CUSTOM_ERROR
              error_handler_params: 'Error retrieving node data'
          timeout: '10'
          url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes'
          status_codes: '200,500,595'
          http_proxy: '{$PVE.PROXY}'
          headers:
            - name: Authorization
              value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
          tags:
            - tag: component
              value: raw
        - uuid: 20ba86cfa8a34c6a852599c6d07c2be9
          name: 'Cluster: Get user data'
          type: HTTP_AGENT
          key: proxmox_ve.get_user_data
          delay: '{$PVE.PARAMS.INTERVAL.USER}'
          history: '0'
          value_type: TEXT
          description: 'Retrieves the list of users from the Proxmox VE API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var data = JSON.parse(value);
                  
                  	data['data'].forEach(function (user) {
                  
                  		if (typeof user['firstname'] === 'undefined') {
                  			user['firstname'] = '';
                  		}
                  		if (typeof user['lastname'] === 'undefined') {
                  			user['lastname'] = '';
                  		}
                  		user['fullname'] = user['firstname'] + ' ' + user['lastname'] + ' (' + user['userid'] + ')';
                  
                  	});
                  
                  	return JSON.stringify(data);
                  
                  } catch (e) {
                  
                  	Zabbix.log(3, "[ERROR] Proxmox user discovery error: " + e + " for value: " + value);
                  
                  	return JSON.stringify([]);
                  }
          timeout: '10'
          url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//access/users'
          status_codes: '200,500,595'
          http_proxy: '{$PVE.PROXY}'
          headers:
            - name: Authorization
              value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: 1c548e56f62840c1a3a96f121f74d59e
          name: 'Node [{#NODE.NAME}]: Certificate discovery'
          type: HTTP_AGENT
          key: 'proxmox_ve.node.certificates.discovery[{#NODE.ID}]'
          delay: '{$PVE.PARAMS.INTERVAL.CERT}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#CERT.FILENAME}'
                value: '{$PVE.FILTER.CERT.FILE.MATCH}'
              - macro: '{#CERT.FILENAME}'
                value: '{$PVE.FILTER.CERT.FILE.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovers certificates on the node {#NODE.NAME}.'
          item_prototypes:
            - uuid: fdb6fa2733a6431ba1ff3c5e0e5789b5
              name: 'Node [{#NODE.NAME}]: Certificate [{#CERT.FILENAME}]: Get info'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.certificates.expire[{#NODE.ID},{#CERT.FILENAME}]'
              delay: 12h
              history: '0'
              value_type: TEXT
              description: 'Retrieves info for the certificate {#CERT.FILENAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.[?(@.filename == "{#CERT.FILENAME}")].first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/certificates/info'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: raw
            - uuid: 6bb5c7740b66469989c6c01a21fe07e4
              name: 'Node [{#NODE.NAME}]: Certificate [{#CERT.FILENAME}]: Fingerprint'
              type: DEPENDENT
              key: 'proxmox_ve.node.certificates.fingerprint[{#NODE.ID},{#CERT.FILENAME}]'
              value_type: CHAR
              description: 'Retrieves the fingerprint for the certificate {#CERT.FILENAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.fingerprint
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.certificates.expire[{#NODE.ID},{#CERT.FILENAME}]'
              tags:
                - tag: certificate
                  value: '{#CERT.FILENAME}'
                - tag: component
                  value: certificates
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 54631bc104224928b2bda16b37528bd5
              name: 'Node [{#NODE.NAME}]: Certificate [{#CERT.FILENAME}]: Issuer'
              type: DEPENDENT
              key: 'proxmox_ve.node.certificates.issuer[{#NODE.ID},{#CERT.FILENAME}]'
              value_type: CHAR
              description: 'Retrieves the issuer for the certificate {#CERT.FILENAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.issuer
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.certificates.expire[{#NODE.ID},{#CERT.FILENAME}]'
              tags:
                - tag: certificate
                  value: '{#CERT.FILENAME}'
                - tag: component
                  value: certificates
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 4c158652201148a7a2825b70e542c34b
              name: 'Node [{#NODE.NAME}]: Certificate [{#CERT.FILENAME}]: Valid not after'
              type: DEPENDENT
              key: 'proxmox_ve.node.certificates.notafter[{#NODE.ID},{#CERT.FILENAME}]'
              units: unixtime
              description: 'Retrieves the not after date for the certificate {#CERT.FILENAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.notafter
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.certificates.expire[{#NODE.ID},{#CERT.FILENAME}]'
              tags:
                - tag: certificate
                  value: '{#CERT.FILENAME}'
                - tag: component
                  value: certificates
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 7510aad13f8146168bca6440f610a891
              name: 'Node [{#NODE.NAME}]: Certificate [{#CERT.FILENAME}]: Valid not before'
              type: DEPENDENT
              key: 'proxmox_ve.node.certificates.notbefore[{#NODE.ID},{#CERT.FILENAME}]'
              units: unixtime
              description: 'Retrieves the not before date for the certificate {#CERT.FILENAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.notbefore
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.certificates.expire[{#NODE.ID},{#CERT.FILENAME}]'
              tags:
                - tag: certificate
                  value: '{#CERT.FILENAME}'
                - tag: component
                  value: certificates
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: f239f2f0da1249b7a5d1943ab8a0ab4b
              name: 'Node [{#NODE.NAME}]: Certificate [{#CERT.FILENAME}]: Subject'
              type: DEPENDENT
              key: 'proxmox_ve.node.certificates.subject[{#NODE.ID},{#CERT.FILENAME}]'
              value_type: CHAR
              description: 'Retrieves the subject for the certificate {#CERT.FILENAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.subject
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.certificates.expire[{#NODE.ID},{#CERT.FILENAME}]'
              tags:
                - tag: certificate
                  value: '{#CERT.FILENAME}'
                - tag: component
                  value: certificates
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
          trigger_prototypes:
            - uuid: 43465550101a4f959cdf649bd9113e6a
              expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.certificates.notafter[{#NODE.ID},{#CERT.FILENAME}]) < now() or last(/Proxmox VE by HTTP/proxmox_ve.node.certificates.notbefore[{#NODE.ID},{#CERT.FILENAME}]) > now()'
              name: 'Proxmox VE: Node [{#NODE.NAME}]: Certificate [{#CERT.FILENAME}]: Not valid'
              priority: AVERAGE
              description: 'The certificate {#CERT.FILENAME} on the node {#NODE.NAME} expires in less than 7 days.'
              tags:
                - tag: scope
                  value: certificates
                - tag: scope
                  value: node
          parent_discovery_rule:
            key: proxmox_ve.nodes.discovery
          timeout: '10'
          url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/certificates/info'
          status_codes: '200,500,595'
          http_proxy: '{$PVE.PROXY}'
          headers:
            - name: Authorization
              value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
          lld_macro_paths:
            - lld_macro: '{#CERT.FILENAME}'
              path: $.filename
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
        - uuid: 3dc3d1bdc2d4484a9f3375c5a16534b5
          name: 'Node [{#NODE.NAME}]: Disks discovery'
          type: HTTP_AGENT
          key: 'proxmox_ve.node.disks.discovery[{#NODE.ID}]'
          delay: '{$PVE.PARAMS.INTERVAL.DISK}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DISK.NAME}'
                value: '{$PVE.FILTER.DISK.MATCH}'
              - macro: '{#DISK.NAME}'
                value: '{$PVE.FILTER.DISK.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovers disks on the node {#NODE.NAME}.'
          item_prototypes:
            - uuid: 444fd91bf4124ce391d54fb521a22228
              name: 'Node [{#NODE.NAME}]: Disk [{#DISK.NAME}]: Get info'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.disk.info[{#NODE.ID},{#DISK.NAME}]'
              delay: 10m
              history: '0'
              value_type: TEXT
              description: 'Retrieves info for the disk {#DISK.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.[?(@.devpath == "{#DISK.NAME}")].first()'
                  error_handler: DISCARD_VALUE
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/disks/list'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: raw
            - uuid: 7be3405f61bb44f0b9e0b2ff6e77db52
              name: 'Node [{#NODE.NAME}]: Disk [{#DISK.NAME}]: Model'
              type: DEPENDENT
              key: 'proxmox_ve.node.disk.model[{#NODE.ID},{#DISK.NAME}]'
              value_type: CHAR
              description: 'Retrieves the model for the disk {#DISK.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.disk.info[{#NODE.ID},{#DISK.NAME}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: disk
                  value: '{#DISK.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 274a373d073c40588cecf3a27e643aa4
              name: 'Node [{#NODE.NAME}]: Disk [{#DISK.NAME}]: Serial'
              type: DEPENDENT
              key: 'proxmox_ve.node.disk.serial[{#NODE.ID},{#DISK.NAME}]'
              value_type: CHAR
              description: 'Retrieves the serial number for the disk {#DISK.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.serial
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.disk.info[{#NODE.ID},{#DISK.NAME}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: disk
                  value: '{#DISK.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: e79e995ce469400aba19e265e0f9d1b4
              name: 'Node [{#NODE.NAME}]: Disk [{#DISK.NAME}]: SMART status'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.disk.smart[{#NODE.ID},{#DISK.NAME}]'
              delay: 1h
              description: 'Retrieves the SMART status for the disk {#DISK.NAME} on the node {#NODE.NAME}.'
              valuemap:
                name: 'Proxmox node disk SMART status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.health
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                        'OK': 1,
                        'PASSED': 1
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/disks/smart?disk={#DISK.NAME}'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: disk
                  value: '{#DISK.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 1af8da3c43ed45cc8b240c31647990b5
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.disk.smart[{#NODE.ID},{#DISK.NAME}]) <> 1'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: Disk [{#DISK.NAME}]: SMART status fail'
                  priority: HIGH
                  description: 'The SMART status for the disk {#DISK.NAME} on the node {#NODE.NAME} is not healthy.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 185aa9f874214369acb68d2acefddbe7
              name: 'Node [{#NODE.NAME}]: Disk [{#DISK.NAME}]: Type'
              type: DEPENDENT
              key: 'proxmox_ve.node.disk.type[{#NODE.ID},{#DISK.NAME}]'
              value_type: CHAR
              description: 'Retrieves the type for the disk {#DISK.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.type
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.disk.info[{#NODE.ID},{#DISK.NAME}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: disk
                  value: '{#DISK.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 1577fa7ce7ce49e6b4e174517dc784d3
              name: 'Node [{#NODE.NAME}]: Disk [{#DISK.NAME}]: Vendor'
              type: DEPENDENT
              key: 'proxmox_ve.node.disk.vendor[{#NODE.ID},{#DISK.NAME}]'
              value_type: CHAR
              description: 'Retrieves the vendor for the disk {#DISK.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.vendor
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.disk.info[{#NODE.ID},{#DISK.NAME}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: disk
                  value: '{#DISK.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
          parent_discovery_rule:
            key: proxmox_ve.nodes.discovery
          timeout: '10'
          url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/disks/list'
          status_codes: '200,500,595'
          http_proxy: '{$PVE.PROXY}'
          headers:
            - name: Authorization
              value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
          lld_macro_paths:
            - lld_macro: '{#DISK.NAME}'
              path: $.devpath
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
        - uuid: 7b5f003da43e465eab8bc2bda35a9132
          name: 'Proxmox LXC discovery'
          type: DEPENDENT
          key: 'proxmox_ve.node.lxc.discovery[{#NODE.ID}]'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#LXC.NAME}'
                value: '{$PVE.FILTER.LXC.MATCH}'
              - macro: '{#LXC.NAME}'
                value: '{$PVE.FILTER.LXC.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#LXC.STATUS}'
                value: '{$PVE.FILTER.QEMULXC.STATUS.MATCH}'
          description: 'Discovers LXC containers on the node {#NODE.NAME}.'
          item_prototypes:
            - uuid: 2ab60ef05b5a4372aca2dc195afbd6de
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: CPU count'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.cpu.count[{#NODE.ID},{#LXC.VMID}]'
              description: 'Retrieves CPU count of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.cpus
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 92edd367b7b44060a5ac443d7ae0a851
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: CPU utilization'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.cpu[{#NODE.ID},{#LXC.VMID}]'
              value_type: FLOAT
              units: '%'
              description: 'Retrieves the CPU utilization of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.cpu
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '100'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 453c86d586b64671a9a8e41edfd45999
                  expression: 'avg(/Proxmox VE by HTTP/proxmox_ve.node.lxc.cpu[{#NODE.ID},{#LXC.VMID}], 5m) > {$PVE.TRIGGER.CPU.WARNING:"{#LXC.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: CPU utilization high'
                  priority: WARNING
                  description: 'The CPU utilization of the LXC container {#LXC.NAME} on the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 1650b41fed4a437d9908bd8dc65ff0ce
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Disk total'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.disk.maxdisk[{#NODE.ID},{#LXC.VMID}]'
              units: B
              description: 'Retrieves the Root disk total of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.maxdisk
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 0f8d1c5b2a3e4b6c9f7d8e9a0b1c2d3e
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Disk read speed'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.disk.read[{#NODE.ID},{#LXC.VMID}]'
              units: Bps
              description: 'Retrieves disk read speed of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.diskread
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 76b338628ded4225aca30a50b68bb196
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Disk used'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.disk.usage[{#NODE.ID},{#LXC.VMID}]'
              units: B
              description: 'Retrieves the Root disk usage of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.disk
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 52b92e5ba31d4c27bafc3fe55e57687a
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Disk utilization'
              type: CALCULATED
              key: 'proxmox_ve.node.lxc.disk.utilization[{#NODE.ID},{#LXC.VMID}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//proxmox_ve.node.lxc.disk.usage[{#NODE.ID},{#LXC.VMID}]) / last(//proxmox_ve.node.lxc.disk.maxdisk[{#NODE.ID},{#LXC.VMID}]) * 100'
              description: 'Retrieves disk utilization of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 8935456bef0f4a4ca20bca78e059b43d
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.lxc.disk.utilization[{#NODE.ID},{#LXC.VMID}]) > {$PVE.TRIGGER.DISK.WARNING:"{#LXC.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Disk usage high'
                  priority: WARNING
                  description: 'The disk usage of the LXC container {#LXC.NAME} on the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 06dee8adb3e848d89ab432a4db119e98
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Disk write speed'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.disk.write[{#NODE.ID},{#LXC.VMID}]'
              units: Bps
              description: 'Retrieves disk write speed of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.diskwrite
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: ee43a9fc7a894547a1cc639dc284c60f
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Swap total'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.maxswap[{#NODE.ID},{#LXC.VMID}]'
              units: B
              description: 'Retrieves the total swap of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.maxswap
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: component
                  value: swap
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: d8130fa283bf46669f1900b571637a1f
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Memory total'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.memory.max[{#NODE.ID},{#LXC.VMID}]'
              units: B
              description: 'Retrieves the total memory of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.maxmem
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: memory
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: f065a59f04ae4969ab572eee65b7d353
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Memory used'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.memory.usage[{#NODE.ID},{#LXC.VMID}]'
              units: B
              description: 'Retrieves the memory usage of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.mem
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: memory
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: ba3c961aadf04103b6480c3f496e3d40
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Memory utilization'
              type: CALCULATED
              key: 'proxmox_ve.node.lxc.memory.utilization[{#NODE.ID},{#LXC.VMID}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//proxmox_ve.node.lxc.memory.usage[{#NODE.ID},{#LXC.VMID}]) / last(//proxmox_ve.node.lxc.memory.max[{#NODE.ID},{#LXC.VMID}]) * 100'
              description: 'Retrieves memory utilization of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: memory
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: d61ff3c75f704105864a38f5442d1c19
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.lxc.memory.utilization[{#NODE.ID},{#LXC.VMID}]) > {$PVE.TRIGGER.MEMORY.WARNING:"{#LXC.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Memory usage high'
                  priority: WARNING
                  description: 'The memory usage of the LXC container {#LXC.NAME} on the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: d9e7cf16eb0242a79a7c4d86e3a66da8
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Network input speed'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.network.input[{#NODE.ID},{#LXC.VMID}]'
              units: bps
              description: 'Retrieves network input speed of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.netin
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: cd38f921a8f84947a7e0619968914e00
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Network output speed'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.network.output[{#NODE.ID},{#LXC.VMID}]'
              units: bps
              description: 'Retrieves network output speed of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.netout
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: da080118db964798a7fec566eccaf574
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Worked node'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.node[{#NODE.ID},{#LXC.VMID}]'
              value_type: CHAR
              description: 'Retrieves the node where the LXC container {#LXC.NAME} is running.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.lxc[?(@.vmid == "{#LXC.VMID}")].node.first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: proxmox_ve.cluster.resources.get
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: e586b7afb1ee481e94ba3b9cbdc1031c
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.lxc.node[{#NODE.ID},{#LXC.VMID}], #1) <> last(/Proxmox VE by HTTP/proxmox_ve.node.lxc.node[{#NODE.ID},{#LXC.VMID}], #2)'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Changed worked node'
                  event_name: 'Proxmox VE: LXC [{#LXC.NAME}] changed worked node to "{ITEM.LASTVALUE}"'
                  priority: INFO
                  description: 'The LXC container {#LXC.NAME} migrated to another node.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 5a24f791a2444f429cbcb26037f29da1
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Status'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.status[{#NODE.ID},{#LXC.VMID}]'
              description: 'Retrieves the status of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              valuemap:
                name: 'Proxmox LXC/QEMU status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: CUSTOM_VALUE
                  error_handler_params: unknown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                        'running': 2,
                        'stopped': 1,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: da7614ac842b4d3c9d6e4538c0ec09bc
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.lxc.status[{#NODE.ID},{#LXC.VMID}]) <> 2'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Not running'
                  priority: WARNING
                  description: 'The LXC container {#LXC.NAME} on the node {#NODE.NAME} is not running.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 440db0f97f3c4639a9e8ceb8bc633cb5
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Swap used'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.swap.usage[{#NODE.ID},{#LXC.VMID}]'
              units: B
              description: 'Retrieves the swap usage of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.swap
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: component
                  value: swap
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 17ee49333f0346d5b1073a4c45475dee
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Uptime'
              type: DEPENDENT
              key: 'proxmox_ve.node.lxc.uptime[{#NODE.ID},{#LXC.VMID}]'
              units: uptime
              description: 'Retrieves the uptime of the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.uptime
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              tags:
                - tag: component
                  value: lxc
                - tag: component
                  value: node
                - tag: component
                  value: uptime
                - tag: lxc
                  value: '{#LXC.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 12bc18cf9e2e40e5879a4b58efad70a2
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.lxc.uptime[{#NODE.ID},{#LXC.VMID}]) < {$PVE.TRIGGER.UPTIME:"{#LXC.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Has been restarted'
                  priority: WARNING
                  description: 'The LXC container {#LXC.NAME} on the node {#NODE.NAME} has been restarted.'
                  dependencies:
                    - name: 'Proxmox VE: Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Not running'
                      expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.lxc.status[{#NODE.ID},{#LXC.VMID}]) <> 2'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 9c0b4b8892a44c1c8a34e6a802c89d2f
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Get info'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.lxc[{#NODE.ID},{#LXC.VMID}]'
              history: '0'
              value_type: TEXT
              description: 'Retrieves information about the LXC container {#LXC.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '{}'
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/lxc/{#LXC.VMID}/status/current'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: raw
          trigger_prototypes:
            - uuid: 11307aab09fa406aaff00e291e2338d2
              expression: 'avg(/Proxmox VE by HTTP/proxmox_ve.node.lxc.swap.usage[{#NODE.ID},{#LXC.VMID}],5m) / last(/Proxmox VE by HTTP/proxmox_ve.node.lxc.maxswap[{#NODE.ID},{#LXC.VMID}]) * 100 > {$PVE.TRIGGER.SWAP.WARNING:"{#LXC.NAME}"}'
              name: 'Proxmox VE: Node [{#NODE.NAME}]: LXC [{#LXC.NAME}]: Swap usage high'
              priority: WARNING
              description: 'The swap usage of the LXC container {#LXC.NAME} on the node {#NODE.NAME} is high.'
              tags:
                - tag: scope
                  value: notice
          graph_prototypes:
            - uuid: 703372918f4a4f47bc9cab580d73d209
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}/{#LXC.VMID}]: CPU utilization'
              graph_items:
                - color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.cpu[{#NODE.ID},{#LXC.VMID}]'
            - uuid: e3824333db624de6802194b13ee6cafe
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}/{#LXC.VMID}]: Disk read speed'
              graph_items:
                - color: 2600ff
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.disk.read[{#NODE.ID},{#LXC.VMID}]'
                - sortorder: '1'
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.disk.write[{#NODE.ID},{#LXC.VMID}]'
            - uuid: ef81ffcc73cd4c8295caccf7dff1a09e
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}/{#LXC.VMID}]: Disk used'
              graph_items:
                - color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.disk.usage[{#NODE.ID},{#LXC.VMID}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.disk.maxdisk[{#NODE.ID},{#LXC.VMID}]'
            - uuid: 35c458a6feae4d7aa451ade81eb8664e
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}/{#LXC.VMID}]: Memory used'
              graph_items:
                - color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.memory.usage[{#NODE.ID},{#LXC.VMID}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.memory.max[{#NODE.ID},{#LXC.VMID}]'
            - uuid: 3935a5b9c4384f76a7b50fc1063392b0
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}/{#LXC.VMID}]: Network speed'
              graph_items:
                - color: 2600ff
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.network.input[{#NODE.ID},{#LXC.VMID}]'
                - sortorder: '1'
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.network.output[{#NODE.ID},{#LXC.VMID}]'
            - uuid: 2086bbe1f89a45ab9e8d8d15b883bc67
              name: 'Node [{#NODE.NAME}]: LXC [{#LXC.NAME}/{#LXC.VMID}]: Swap used'
              graph_items:
                - color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.swap.usage[{#NODE.ID},{#LXC.VMID}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.lxc.maxswap[{#NODE.ID},{#LXC.VMID}]'
          master_item:
            key: proxmox_ve.cluster.resources.get
          lld_macro_paths:
            - lld_macro: '{#LXC.NAME}'
              path: $.name
            - lld_macro: '{#LXC.STATUS}'
              path: $.status
            - lld_macro: '{#LXC.VMID}'
              path: $.vmid
            - lld_macro: '{#NODE.NAME}'
              path: $.node
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.lxc
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
        - uuid: c9e463381b924dafbf88cea373b3fe50
          name: 'Proxmox QEMU discovery'
          type: DEPENDENT
          key: 'proxmox_ve.node.qemu.discovery[{#NODE.ID}]'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#QEMU.NAME}'
                value: '{$PVE.FILTER.QEMU.MATCH}'
              - macro: '{#QEMU.NAME}'
                value: '{$PVE.FILTER.QEMU.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#QEMU.STATUS}'
                value: '{$PVE.FILTER.QEMULXC.STATUS.MATCH}'
          description: 'Discovers QEMU virtual machines on the node {#NODE.NAME}.'
          item_prototypes:
            - uuid: ff60e7840528434996b2e28b80ea151d
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Guest agent version'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.qemu.agent.version[{#NODE.ID},{#QEMU.VMID}]'
              delay: 12h
              value_type: CHAR
              description: 'Retrieves the QEMU guest agent version for the virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.result.version
                  error_handler: CUSTOM_VALUE
                  error_handler_params: Unknown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/info'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
              trigger_prototypes:
                - uuid: 757fba13cb1f43af9c8033c8462322e4
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.qemu.agent.version[{#NODE.ID},{#QEMU.VMID}])="Unknown"'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Error getting guest agent data'
                  priority: WARNING
                  description: |
                    Error retrieving the QEMU guest agent data for the virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.
                    The guest agent may not be running.
                  dependencies:
                    - name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Agent is not enabled'
                      expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.qemu.agent[{#NODE.ID},{#QEMU.VMID}]) <> 1'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: a73999de348a4d79ae7ec582c2550ce2
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Guest agent'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.agent[{#NODE.ID},{#QEMU.VMID}]'
              description: 'Retrieves the QEMU guest agent status for the virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              valuemap:
                name: 'Proxmox QEMU agent status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.agent
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '3'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
              trigger_prototypes:
                - uuid: e9f788fde7bc484eb964b4d6bfa5e293
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.qemu.agent[{#NODE.ID},{#QEMU.VMID}]) <> 1'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Agent is not enabled'
                  priority: INFO
                  description: 'The QEMU guest agent for the virtual machine {#QEMU.NAME} on the node {#NODE.NAME} is not enabled.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: ff45514952424922b46f2acfd548036d
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: CPU count'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.cpu.count[{#NODE.ID},{#QEMU.VMID}]'
              description: 'Retrieves CPU count of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.cpus
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: 1c8f0b2d3e4f4a5b8c9d0e1f2a3b4c5d
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: CPU utilization'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.cpu.usage[{#NODE.ID},{#QEMU.VMID}]'
              value_type: FLOAT
              units: '%'
              description: 'Retrieves the QEMU CPU utilization for the virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.cpu
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '100'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
              trigger_prototypes:
                - uuid: 854a8816d577453fabf606fa8eb35304
                  expression: 'avg(/Proxmox VE by HTTP/proxmox_ve.node.qemu.cpu.usage[{#NODE.ID},{#QEMU.VMID}], 5m) > {$PVE.TRIGGER.CPU.WARNING:"{#QEMU.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: CPU utilization high'
                  priority: WARNING
                  description: 'The CPU utilization of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 0d1dc0c895e94003b9874e4839707cef
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Disk read speed'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.disk.read[{#NODE.ID},{#QEMU.VMID}]'
              units: Bps
              description: 'Retrieves disk read speed of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.diskread
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: e3e9d0b1b3114d0199576cb92b4bd811
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Disk write speed'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.disk.write[{#NODE.ID},{#QEMU.VMID}]'
              units: Bps
              description: 'Retrieves disk write speed of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.diskwrite
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: bad696385bb743d98604ce6e769438d2
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Memory total'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.memory.maxmem[{#NODE.ID},{#QEMU.VMID}]'
              units: B
              description: 'Retrieves the total memory of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.maxmem
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: memory
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: c2471ee3018e4e2fb75b52f4af3a5929
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Memory used'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.memory.usage[{#NODE.ID},{#QEMU.VMID}]'
              units: B
              description: 'Retrieves the memory usage of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.mem
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: memory
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: b72d9654decf4bb998386c11892fe137
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Memory utilization'
              type: CALCULATED
              key: 'proxmox_ve.node.qemu.memory.utilization[{#NODE.ID},{#QEMU.VMID}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//proxmox_ve.node.qemu.memory.usage[{#NODE.ID},{#QEMU.VMID}]) / last(//proxmox_ve.node.qemu.memory.maxmem[{#NODE.ID},{#QEMU.VMID}]) * 100'
              description: 'Retrieves memory utilization of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
              trigger_prototypes:
                - uuid: 88fecebb47ec4af89ea2d0f458e25b64
                  expression: 'avg(/Proxmox VE by HTTP/proxmox_ve.node.qemu.memory.utilization[{#NODE.ID},{#QEMU.VMID}],5m) > {$PVE.TRIGGER.MEMORY.WARNING:"{#QEMU.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Memory usage high'
                  priority: WARNING
                  description: 'The memory usage of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: d112f6a55e484f3f816f20f7768a9e3e
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Network input speed'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.input[{#NODE.ID},{#QEMU.VMID}]'
              units: bps
              description: 'Retrieves network input speed of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.netin
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: e8344592bc0b40aa91528af2a2c4bd15
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Network output speed'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.output[{#NODE.ID},{#QEMU.VMID}]'
              units: bps
              description: 'Retrieves network output speed of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.netout
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: bbdf2640ea1e43a897da5d76f373fc80
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Worked node'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.node[{#NODE.ID},{#QEMU.VMID}]'
              value_type: CHAR
              description: 'Retrieves the node where the QEMU virtual machine {#QEMU.NAME} is running.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.qemu[?(@.vmid == "{#QEMU.VMID}")].node.first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: proxmox_ve.cluster.resources.get
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
              trigger_prototypes:
                - uuid: a02742905e2c4fbdb2f582d0b1905ee6
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.qemu.node[{#NODE.ID},{#QEMU.VMID}], #1) <> last(/Proxmox VE by HTTP/proxmox_ve.node.qemu.node[{#NODE.ID},{#QEMU.VMID}], #2)'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Changed worked node'
                  event_name: 'Proxmox VE: QEMU [{#QEMU.NAME}] changed worked node to "{ITEM.LASTVALUE}"'
                  priority: INFO
                  description: 'The QEMU virtual machine {#QEMU.NAME} migrated to another node.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 70dd2565afe54dc9b77a7c49f4ef82c1
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Status'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.status[{#NODE.ID},{#QEMU.VMID}]'
              description: 'Retrieves the status of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              valuemap:
                name: 'Proxmox LXC/QEMU status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: CUSTOM_VALUE
                  error_handler_params: unknown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                        'running': 2,
                        'stopped': 1,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
              trigger_prototypes:
                - uuid: 692bf9da2b484abea039746735cefd48
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.qemu.status[{#NODE.ID},{#QEMU.VMID}]) <> 2'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Not running'
                  priority: WARNING
                  description: 'The QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME} is not running.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: ed946713280f4cf89d6bdc7f258618b7
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Time zone'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.qemu.timezone[{#NODE.ID},{#QEMU.VMID}]'
              delay: 12h
              value_type: CHAR
              description: 'Retrieves the system timezone of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.result.zone
                  error_handler: CUSTOM_VALUE
                  error_handler_params: Unknown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-timezone'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: component
                  value: time
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: c1b4a1af4238431db864d4bff66b1c9c
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Time'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.qemu.time[{#NODE.ID},{#QEMU.VMID}]'
              delay: 10m
              value_type: FLOAT
              units: unixtime
              description: 'Retrieves the system time of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.result
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '1.0E-9'
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-time'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: component
                  value: time
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: 2e978c24fadb4f7eb0157d883c7d3bfb
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Uptime'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.uptime[{#NODE.ID},{#QEMU.VMID}]'
              units: uptime
              description: 'Retrieves the uptime of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.uptime
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: component
                  value: uptime
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
              trigger_prototypes:
                - uuid: 8c9c94cbdd8b491280faff5bc6f10b41
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.qemu.uptime[{#NODE.ID},{#QEMU.VMID}]) < {$PVE.TRIGGER.UPTIME:"{#QEMU.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Has been restarted'
                  priority: WARNING
                  description: 'The QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME} has been restarted.'
                  dependencies:
                    - name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Not running'
                      expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.qemu.status[{#NODE.ID},{#QEMU.VMID}]) <> 2'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 49287abe4f694a9895cbb66adf275bde
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Get info'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.qemu[{#NODE.ID},{#QEMU.VMID}]'
              history: '0'
              value_type: TEXT
              description: 'Retrieves information about the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '{}'
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/status/current'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: raw
          graph_prototypes:
            - uuid: e9fb079bd82b4644acea529990dec8a3
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}/{#QEMU.VMID}]: CPU utilization'
              graph_items:
                - color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.cpu.usage[{#NODE.ID},{#QEMU.VMID}]'
            - uuid: 3d8f0b2d3e4f4a5b8c9d0e1f2a3b4c5f
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}/{#QEMU.VMID}]: Disk read speed'
              graph_items:
                - color: 2600ff
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.disk.read[{#NODE.ID},{#QEMU.VMID}]'
                - sortorder: '1'
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.disk.write[{#NODE.ID},{#QEMU.VMID}]'
            - uuid: ba9b128b524e41a0a130b747daa90262
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}/{#QEMU.VMID}]: Memory used'
              graph_items:
                - color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.memory.usage[{#NODE.ID},{#QEMU.VMID}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.memory.maxmem[{#NODE.ID},{#QEMU.VMID}]'
            - uuid: f200d341935549c798ace87b105321f0
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}/{#QEMU.VMID}]: Network speed'
              graph_items:
                - color: 2600ff
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.network.input[{#NODE.ID},{#QEMU.VMID}]'
                - sortorder: '1'
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.network.output[{#NODE.ID},{#QEMU.VMID}]'
          master_item:
            key: proxmox_ve.cluster.resources.get
          lld_macro_paths:
            - lld_macro: '{#NODE.NAME}'
              path: $.node
            - lld_macro: '{#QEMU.NAME}'
              path: $.name
            - lld_macro: '{#QEMU.STATUS}'
              path: $.status
            - lld_macro: '{#QEMU.VMID}'
              path: $.vmid
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.qemu
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
        - uuid: 3e39886146c24b3e82d57ac347495c5c
          name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Filesystem discovery'
          type: HTTP_AGENT
          key: 'proxmox_ve.node.qemu.filesystem.discovery[{#NODE.ID},{#QEMU.VMID}]'
          delay: '{$PVE.PARAMS.INTERVAL.QEMU.FS}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#QEMU.FS.MOUNTPOINT}'
                value: '{$PVE.FILTER.QEMU.FS.MOUNT_POINT.MATCH}'
              - macro: '{#QEMU.FS.MOUNTPOINT}'
                value: '{$PVE.FILTER.QEMU.FS.MOUNT_POINT.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#QEMU.FS.TYPE}'
                value: '{$PVE.FILTER.QEMU.FS.TYPE.MATCH}'
              - macro: '{#QEMU.FS.TYPE}'
                value: '{$PVE.FILTER.QEMU.FS.TYPE.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovers filesystems of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
          item_prototypes:
            - uuid: 814d919286a845429064bd2c6f7f89cf
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.FS.MOUNTPOINT}]: Filesystem total (privileged)'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.filesystem.total.privileged[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
              units: B
              description: 'Retrieves the total space of the privileged filesystem mounted at {#QEMU.FS.MOUNTPOINT} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["total-bytes-privileged"]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu.filesystem[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
              tags:
                - tag: component
                  value: filesystem
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: filesystem
                  value: '{#QEMU.FS.MOUNTPOINT}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: ccc52ebc5f8d4eae88c09d7dfac7580f
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.FS.MOUNTPOINT}]: Filesystem total'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.filesystem.total[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
              units: B
              description: 'Retrieves the total space of the filesystem mounted at {#QEMU.FS.MOUNTPOINT} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["total-bytes"]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu.filesystem[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
              tags:
                - tag: component
                  value: filesystem
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: filesystem
                  value: '{#QEMU.FS.MOUNTPOINT}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: d3860343ad874217a7739c444a85dfc1
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.FS.MOUNTPOINT}]: Filesystem used'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.filesystem.usage[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
              units: B
              description: 'Retrieves the used space of the filesystem mounted at {#QEMU.FS.MOUNTPOINT} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["used-bytes"]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu.filesystem[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
              tags:
                - tag: component
                  value: filesystem
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: filesystem
                  value: '{#QEMU.FS.MOUNTPOINT}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: 4a7a0540bf0f45edab0b6a33957957cf
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.FS.MOUNTPOINT}]: Filesystem utilization'
              type: CALCULATED
              key: 'proxmox_ve.node.qemu.filesystem.utilization[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//proxmox_ve.node.qemu.filesystem.usage[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]) / last(//proxmox_ve.node.qemu.filesystem.total[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]) * 100'
              description: 'Retrieves filesystem utilization of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: filesystem
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: filesystem
                  value: '{#QEMU.FS.MOUNTPOINT}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
              trigger_prototypes:
                - uuid: 0ea2852582cf4a48b1d5c1a74713e9e1
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.qemu.filesystem.utilization[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]) > {$PVE.TRIGGER.DISK.WARNING:"{#QEMU.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.FS.MOUNTPOINT}]: Filesystem used high'
                  priority: WARNING
                  description: 'The filesystem usage of {#QEMU.FS.MOUNTPOINT} on the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 3f550a78afa34e79a550d0192e66bac4
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.FS.MOUNTPOINT}]: Filesystem get info'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.qemu.filesystem[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
              delay: 10m
              history: '0'
              value_type: TEXT
              description: 'Retrieves information about the filesystem mounted at {#QEMU.FS.MOUNTPOINT} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.result[?(@.mountpoint=="{#QEMU.FS.MOUNTPOINT}")].first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-fsinfo'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: raw
          graph_prototypes:
            - uuid: cd8aea318eea413b9f774739e6effda8
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}/{#QEMU.VMID}][{#QEMU.FS.MOUNTPOINT}]: Filesystem used'
              graph_items:
                - color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.filesystem.usage[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
                - sortorder: '1'
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.filesystem.total[{#NODE.ID},{#QEMU.VMID},{#QEMU.FS.MOUNTPOINT}]'
          parent_discovery_rule:
            key: 'proxmox_ve.node.qemu.discovery[{#NODE.ID}]'
          timeout: '10'
          url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-fsinfo'
          status_codes: '200,500,595'
          http_proxy: '{$PVE.PROXY}'
          headers:
            - name: Authorization
              value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
          lld_macro_paths:
            - lld_macro: '{#QEMU.FS.MOUNTPOINT}'
              path: $.mountpoint
            - lld_macro: '{#QEMU.FS.TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.result
              error_handler: CUSTOM_VALUE
              error_handler_params: '[]'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 4f8c1b2d3e4f4a5b8c9d0e1f2a3b4c5e
          name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: Network interfaces discovery'
          type: HTTP_AGENT
          key: 'proxmox_ve.node.qemu.network.discovery[{#NODE.ID},{#QEMU.VMID}]'
          delay: '{$PVE.PARAMS.INTERVAL.QEMU.NETWORK}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#QEMU.NETIF.NAME}'
                value: '{$PVE.FILTER.QEMU.NET.IFACE.NAME.MATCH}'
              - macro: '{#QEMU.NETIF.NAME}'
                value: '{$PVE.FILTER.QEMU.NET.IFACE.NAME.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovers network interfaces of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
          item_prototypes:
            - uuid: 0ca6ed3bdf7d4584a34ba3452f295146
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Network input dropped'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.input.dropped[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              units: '!dropped'
              description: 'Retrieves the number of input packets dropped on the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["statistics"]["rx-dropped"]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: 763cba20cd544659aafdd81e66c81d44
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Network input errors'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.input.errors[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              units: '!errors'
              description: 'Retrieves the number of input errors on the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["statistics"]["rx-errs"]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: dc4f4cdf62bd49fc9a9bf6d705fd2fe4
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Network input speed (in bps)'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.input.speed.bits[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              units: bps
              description: 'Retrieves the input speed of the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["statistics"]["rx-bytes"]'
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: 554ffe79db404b6a864a0af54be2120a
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Network input speed (in packets/s)'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.input.speed.packets[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              units: packets/s
              description: 'Retrieves the input speed in packets of the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["statistics"]["rx-packets"]'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: d60d950efd6c4ba8bee2cf9b30516285
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Hardware address'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.mac[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              value_type: CHAR
              description: 'Retrieves the hardware address of the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["hardware-address"]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: efd5da36a4064a4e910f74aa972654b0
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Network output dropped'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.output.dropped[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              units: '!dropped'
              description: 'Retrieves the number of output packets dropped on the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["statistics"]["tx-dropped"]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: d1764e64cdba4627b10bfbb33f500417
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Network output errors'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.output.errors[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              units: '!errors'
              description: 'Retrieves the number of output errors on the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["statistics"]["tx-errs"]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: f7a698fdd2794932a11388b95d539143
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Network output speed (in bps)'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.output.speed.bits[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              units: bps
              description: 'Retrieves the output speed of the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["statistics"]["tx-bytes"]'
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: 958a63c0c82e4545b18033ff8bff5384
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Network output speed (in packets/s)'
              type: DEPENDENT
              key: 'proxmox_ve.node.qemu.network.output.speed.packets[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              units: packets/s
              description: 'Retrieves the output speed in packets of the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$["statistics"]["tx-packets"]'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
            - uuid: 8455021604db43ff80d860ca4ca87e2c
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: Network interface info'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.qemu.network[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Retrieves information about the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.result[?(@.name=="{#QEMU.NETIF.NAME}")].first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/network-get-interfaces'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: raw
          graph_prototypes:
            - uuid: 1a7a579a10784f4d8b5087f26c507aca
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}/{#QEMU.VMID}][{#QEMU.NETIF.NAME}]: Network speed'
              graph_items:
                - color: 2600ff
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.network.input.speed.bits[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
                - sortorder: '1'
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.network.output.speed.bits[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
            - uuid: cff8762c3c0d40b199852574749b08de
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}/{#QEMU.VMID}][{#QEMU.NETIF.NAME}]: Network speed (in packets/s)'
              graph_items:
                - color: 2600ff
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.network.input.speed.packets[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
                - sortorder: '1'
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.qemu.network.output.speed.packets[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
          parent_discovery_rule:
            key: 'proxmox_ve.node.qemu.discovery[{#NODE.ID}]'
          timeout: '10'
          url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/network-get-interfaces'
          status_codes: '200,500,595'
          http_proxy: '{$PVE.PROXY}'
          headers:
            - name: Authorization
              value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
          lld_macro_paths:
            - lld_macro: '{#QEMU.NETIF.IP}'
              path: '$["ip-addresses"]'
            - lld_macro: '{#QEMU.NETIF.NAME}'
              path: $.name
            - lld_macro: '{#QEMU.NETIF.STATISTICS}'
              path: $.statistics
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.result
              error_handler: CUSTOM_VALUE
              error_handler_params: '[]'
          overrides:
            - name: 'Disable statistics'
              step: '1'
              filter:
                conditions:
                  - macro: '{#QEMU.NETIF.STATISTICS}'
                    operator: NOT_EXISTS
              operations:
                - operator: REGEXP
                  value: input|output
                  discover: NO_DISCOVER
            - name: 'Disable IP addresses discovery'
              step: '2'
              filter:
                conditions:
                  - macro: '{#QEMU.NETIF.IP}'
                    operator: NOT_EXISTS
              operations:
                - operationobject: LLD_RULE_PROTOTYPE
                  operator: LIKE
                  value: 'IP addresses'
                  discover: NO_DISCOVER
        - uuid: 16052c645d144eeeb17d6f2acded0863
          name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: IP addresses discovery'
          type: HTTP_AGENT
          key: 'proxmox_ve.node.qemu.network.ip.discovery[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME}]'
          delay: '{$PVE.PARAMS.INTERVAL.QEMU.NETWORK}'
          description: 'Discovers network interfaces of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
          item_prototypes:
            - uuid: 7e0d9797f75646b1ac464a55515a0969
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}][{#QEMU.NETIF.NAME}]: IP address #{#QEMU.NETIF.IP.ID}'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.qemu.network.ip[{#NODE.ID},{#QEMU.VMID},{#QEMU.NETIF.NAME},{#QEMU.NETIF.IP.ID}]'
              delay: 12h
              value_type: CHAR
              description: 'Retrieves information about the IP address {#QEMU.NETIF.IP.ADDRESS} of the network interface {#QEMU.NETIF.NAME} of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.result[?(@.name=="{#QEMU.NETIF.NAME}")]["ip-addresses"].first()'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      try {
                      	var data = JSON.parse(value);
                      
                      	data.sort(function (a, b) {
                      		return a['ip-address'].localeCompare(b['ip-address']);
                      	});
                      
                      	for (var i = 0; i < data.length; i++) {
                      		data[i]['id'] = i + 1;
                      	}
                      
                      	return JSON.stringify(data);
                      
                      } catch (e) {
                      
                      	Zabbix.log(3, "[ERROR] Proxmox ip address discovery error: " + e + " for value: " + value);
                      
                      	return JSON.stringify([]);
                      }
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id=="{#QEMU.NETIF.IP.ID}")].first()'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      try {
                      	var data = JSON.parse(value);
                      
                      	return data['ip-address'] + '/' + data['prefix'];
                      
                      } catch (e) {
                      
                      	Zabbix.log(3, "[ERROR] Proxmox ip address parsing error: " + e + " for value: " + value);
                      
                      	return "[ERROR] Proxmox ip address parsing error: " + e + " for value: " + value;
                      }
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/network-get-interfaces'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: component
                  value: qemu
                - tag: iface
                  value: '{#QEMU.NETIF.NAME}'
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
          parent_discovery_rule:
            key: 'proxmox_ve.node.qemu.network.discovery[{#NODE.ID},{#QEMU.VMID}]'
          timeout: '10'
          url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/network-get-interfaces'
          status_codes: '200,500,595'
          http_proxy: '{$PVE.PROXY}'
          headers:
            - name: Authorization
              value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
          lld_macro_paths:
            - lld_macro: '{#QEMU.NETIF.IP.ADDRESS}'
              path: '$["ip-address"]'
            - lld_macro: '{#QEMU.NETIF.IP.ID}'
              path: $.id
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.data.result[?(@.name=="{#QEMU.NETIF.NAME}")]["ip-addresses"].first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '[]'
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var data = JSON.parse(value);
                  
                  	data.sort(function (a, b) {
                  		return a['ip-address'].localeCompare(b['ip-address']);
                  	});
                  
                  	for (var i = 0; i < data.length; i++) {
                  		data[i]['id'] = i + 1;
                  	}
                  
                  	return JSON.stringify(data);
                  
                  } catch (e) {
                  
                  	Zabbix.log(3, "[ERROR] Proxmox ip address discovery error: " + e + " for value: " + value);
                  
                  	return JSON.stringify([]);
                  }
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
        - uuid: b022e5c58bd64db389dab20b44e372a7
          name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: OS info discovery'
          type: HTTP_AGENT
          key: 'proxmox_ve.node.qemu.os.discovery[{#NODE.ID},{#QEMU.VMID}]'
          delay: '{$PVE.PARAMS.INTERVAL.QEMU.OS}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#QEMU.OS.METRIC}'
                value: '{$PVE.FILTER.QEMU.OS.METRIC.MATCH}'
              - macro: '{#QEMU.OS.METRIC}'
                value: '{$PVE.FILTER.QEMU.OS.METRIC.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovers operating system information of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
          item_prototypes:
            - uuid: 52ee9eeab05443269000c1ae2f6dde6c
              name: 'Node [{#NODE.NAME}]: QEMU [{#QEMU.NAME}]: OS [{#QEMU.OS.METRIC}]'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.qemu.os.info[{#NODE.ID},{#QEMU.VMID},{#QEMU.OS.METRIC}]'
              delay: '{$PVE.PARAMS.INTERVAL.QEMU.OS}'
              value_type: CHAR
              description: 'Retrieves the operating system information of the QEMU virtual machine {#QEMU.NAME} on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.result["{#QEMU.OS.METRIC}"]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-osinfo'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: os
                - tag: component
                  value: qemu
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: os
                  value: '{#QEMU.OS.METRIC}'
                - tag: qemu
                  value: '{#QEMU.NAME}'
          parent_discovery_rule:
            key: 'proxmox_ve.node.qemu.discovery[{#NODE.ID}]'
          timeout: '10'
          url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/qemu/{#QEMU.VMID}/agent/get-osinfo'
          status_codes: '200,500,595'
          http_proxy: '{$PVE.PROXY}'
          headers:
            - name: Authorization
              value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
          lld_macro_paths:
            - lld_macro: '{#QEMU.OS.METRIC}'
              path: $.metric
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.result
              error_handler: DISCARD_VALUE
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var data = JSON.parse(value),
                  		output = [];
                  
                  	for (var field in data) {
                  		if (data.hasOwnProperty(field)) {
                  			output.push({
                  				metric: field,
                  				value: data[field]
                  			});
                  		}
                  	}
                  
                  	output.sort(function (a, b) {
                  		return a['metric'].localeCompare(b['metric']);
                  	});
                  
                  	return JSON.stringify(output);
                  
                  } catch (e) {
                  
                  	Zabbix.log(3, '[ERROR] Proxmox OS info discovery error: ' + e + ' for value: ' + value);
                  
                  	return JSON.stringify([]);
                  }
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
        - uuid: 9edd36cafac843879c698b70d925e472
          name: 'Node [{#NODE.NAME}]: Storage discovery'
          type: HTTP_AGENT
          key: 'proxmox_ve.node.storage.discovery[{#NODE.ID}]'
          delay: '{$PVE.PARAMS.INTERVAL.STORAGE}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#STORAGE.NAME}'
                value: '{$PVE.FILTER.STORAGE.NAME.MATCH}'
              - macro: '{#STORAGE.NAME}'
                value: '{$PVE.FILTER.STORAGE.NAME.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#STORAGE.SHARED}'
                value: '0'
          description: 'Discovers storage devices on the node {#NODE.NAME}.'
          item_prototypes:
            - uuid: 48fdd99d2647428f864bc26aa860deba
              name: 'Node [{#NODE.NAME}]: Storage [{#STORAGE.NAME}]: Content'
              type: DEPENDENT
              key: 'proxmox_ve.node.storage.content[{#NODE.ID},{#STORAGE.NAME}]'
              value_type: CHAR
              description: 'Retrieves the content type of the storage device "{#STORAGE.NAME}" on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.content
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.storage[{#NODE.ID},{#STORAGE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: storage
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: storage
                  value: '{#STORAGE.NAME}'
            - uuid: d36ce78b8ad242d2b436155c9ce566c8
              name: 'Node [{#NODE.NAME}]: Storage [{#STORAGE.NAME}]: Total'
              type: DEPENDENT
              key: 'proxmox_ve.node.storage.total[{#NODE.ID},{#STORAGE.NAME}]'
              units: B
              description: 'Retrieves the total space of the storage device "{#STORAGE.NAME}" on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.total
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.storage[{#NODE.ID},{#STORAGE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: storage
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: storage
                  value: '{#STORAGE.NAME}'
            - uuid: 6aabad76c8c44dc982469478cb7be3a9
              name: 'Node [{#NODE.NAME}]: Storage [{#STORAGE.NAME}]: Type'
              type: DEPENDENT
              key: 'proxmox_ve.node.storage.type[{#NODE.ID},{#STORAGE.NAME}]'
              value_type: CHAR
              description: 'Retrieves the type of the storage device "{#STORAGE.NAME}" on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.type
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.storage[{#NODE.ID},{#STORAGE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: storage
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: storage
                  value: '{#STORAGE.NAME}'
            - uuid: 2441813b412e47608f7267a6e720a108
              name: 'Node [{#NODE.NAME}]: Storage [{#STORAGE.NAME}]: Used'
              type: DEPENDENT
              key: 'proxmox_ve.node.storage.used[{#NODE.ID},{#STORAGE.NAME}]'
              units: B
              description: 'Retrieves the used space of the storage device "{#STORAGE.NAME}" on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.used
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.storage[{#NODE.ID},{#STORAGE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: storage
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: storage
                  value: '{#STORAGE.NAME}'
            - uuid: 7134005131c24ac28f2b09e77c1c6a25
              name: 'Node [{#NODE.NAME}]: Storage [{#STORAGE.NAME}]: Utilization'
              type: CALCULATED
              key: 'proxmox_ve.node.storage.utilization[{#NODE.ID},{#STORAGE.NAME}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//proxmox_ve.node.storage.used[{#NODE.ID},{#STORAGE.NAME}]) / last(//proxmox_ve.node.storage.total[{#NODE.ID},{#STORAGE.NAME}]) * 100'
              description: 'Retrieves the utilization percentage of the storage device "{#STORAGE.NAME}" on the node {#NODE.NAME}.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: storage
                - tag: node
                  value: '{#NODE.NAME}'
                - tag: storage
                  value: '{#STORAGE.NAME}'
              trigger_prototypes:
                - uuid: 366f5a856684456fbdbcb89653eeb28f
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.storage.utilization[{#NODE.ID},{#STORAGE.NAME}]) > {$PVE.TRIGGER.DISK.WARNING:"{#STORAGE.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}]: Storage [{#STORAGE.NAME}]: Usage high'
                  priority: WARNING
                  description: 'The storage usage of {#STORAGE.NAME} on the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 50680ac0ba6c42c7b7b28822f41364b5
              name: 'Node [{#NODE.NAME}]: Storage [{#STORAGE.NAME}]: Get info'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.storage[{#NODE.ID},{#STORAGE.NAME}]'
              delay: 1h
              history: '0'
              value_type: TEXT
              description: 'Retrieves information about the storage device "{#STORAGE.NAME}" on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data[?(@.storage=="{#STORAGE.NAME}")].first()'
                  error_handler: DISCARD_VALUE
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/storage'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: raw
          trigger_prototypes:
            - uuid: 65718347d14743b88ffa60051f688c37
              expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.storage.used[{#NODE.ID},{#STORAGE.NAME}]) / last(/Proxmox VE by HTTP/proxmox_ve.node.storage.total[{#NODE.ID},{#STORAGE.NAME}]) * 100 > {$PVE.TRIGGER.DISK.WARNING:"{#STORAGE.NAME}"}'
              name: 'Proxmox VE: Node [{#NODE.NAME}]: Storage [{#STORAGE.NAME}]: Usage high'
              priority: WARNING
              description: 'The storage usage of {#STORAGE.NAME} on the node {#NODE.NAME} is high.'
              tags:
                - tag: scope
                  value: notice
          graph_prototypes:
            - uuid: cdc304fb2ed84bd68a81ad6ae4c757b2
              name: 'Node [{#NODE.NAME}]: Storage [{#STORAGE.NAME}]: Used'
              graph_items:
                - color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.storage.used[{#NODE.ID},{#STORAGE.NAME}]'
                - sortorder: '1'
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.storage.total[{#NODE.ID},{#STORAGE.NAME}]'
          parent_discovery_rule:
            key: proxmox_ve.nodes.discovery
          timeout: '10'
          url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/storage'
          status_codes: '200,500,595'
          http_proxy: '{$PVE.PROXY}'
          headers:
            - name: Authorization
              value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
          lld_macro_paths:
            - lld_macro: '{#STORAGE.NAME}'
              path: $.storage
            - lld_macro: '{#STORAGE.SHARED}'
              path: $.shared
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data
              error_handler: CUSTOM_VALUE
              error_handler_params: '[]'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
        - uuid: e2368ac335164029bddef00a10efa820
          name: 'Proxmox nodes discovery'
          type: DEPENDENT
          key: proxmox_ve.nodes.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NODE.NAME}'
                value: '{$PVE.FILTER.NODE.MATCH}'
              - macro: '{#NODE.NAME}'
                value: '{$PVE.FILTER.NODE.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#NODE.STATUS}'
                value: '{$PVE.FILTER.NODE.STATUS}'
          item_prototypes:
            - uuid: f740ea0d181c47e392f8d6062af1a61a
              name: 'Node [{#NODE.NAME}]: CPU count'
              type: DEPENDENT
              key: 'proxmox_ve.node.cpu.max[{#NODE.ID}]'
              units: '!CPU'
              description: 'Retrieves the maximum CPU count of the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id == "{#NODE.ID}")].maxcpu.first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: proxmox_ve.get_node_data
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 3623b2e888414569871582c79026317b
              name: 'Node [{#NODE.NAME}]: CPU utilization'
              type: DEPENDENT
              key: 'proxmox_ve.node.cpu[{#NODE.ID}]'
              value_type: FLOAT
              units: '%'
              description: 'Retrieves the CPU utilization of the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id == "{#NODE.ID}")].cpu.first()'
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '100'
              master_item:
                key: proxmox_ve.get_node_data
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 7b583e627961448cb9b580fdce9697ad
                  expression: 'avg(/Proxmox VE by HTTP/proxmox_ve.node.cpu[{#NODE.ID}], 5m) > {$PVE.TRIGGER.CPU.WARNING:"{#NODE.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}] CPU utilization high'
                  priority: WARNING
                  description: 'The CPU utilization of the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: node
                    - tag: scope
                      value: performance
            - uuid: 06e86fe02b47408cb06ee7573eb3daf8
              name: 'Node [{#NODE.NAME}]: Disk utilization'
              type: CALCULATED
              key: 'proxmox_ve.node.disk.utilization[{#NODE.ID}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//proxmox_ve.node.disk[{#NODE.ID}]) / last(//proxmox_ve.node.maxdisk[{#NODE.ID}]) * 100'
              description: 'Retrieves the disk utilization percentage for the node {#NODE.NAME}.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 5242f0529716497e976ea3d1f9455ef4
                  expression: 'avg(/Proxmox VE by HTTP/proxmox_ve.node.disk.utilization[{#NODE.ID}], 5m) > {$PVE.TRIGGER.DISK.WARNING:"{#NODE.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}] disk utilization high'
                  priority: WARNING
                  description: 'The disk utilization of the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: node
            - uuid: 1143bf5a89a243fa805055432eaef82d
              name: 'Node [{#NODE.NAME}]: Disk used'
              type: DEPENDENT
              key: 'proxmox_ve.node.disk[{#NODE.ID}]'
              units: B
              description: 'Retrieves the disk used by the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id == "{#NODE.ID}")].disk.first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: proxmox_ve.get_node_data
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 357ea448aa994da6bd7b613775c661dc
              name: 'Node [{#NODE.NAME}]: Number of PCI devices'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.hardware.pci[{#NODE.ID}]'
              delay: 1h
              description: 'Retrieves the number of PCI devices on the node {#NODE.NAME}.'
              valuemap:
                name: 'Proxmox node PCI/USB devices'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.length()
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/hardware/pci'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: hardware
                - tag: component
                  value: node
                - tag: hardware
                  value: pci
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 43e606503d7d424294b708b69d3cc3b4
                  expression: 'change(/Proxmox VE by HTTP/proxmox_ve.node.hardware.pci[{#NODE.ID}]) <> 0'
                  name: 'Proxmox VE: Node [{#NODE.NAME}] changed number of PCI devices'
                  priority: INFO
                  description: 'The number of PCI devices on the node {#NODE.NAME} has changed.'
                  manual_close: 'YES'
            - uuid: d2a13387aa4f4ac0b811634630607d57
              name: 'Node [{#NODE.NAME}]: Number of USB devices'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.hardware.usb[{#NODE.ID}]'
              delay: 1h
              description: 'Retrieves the number of USB devices on the node {#NODE.NAME}.'
              valuemap:
                name: 'Proxmox node PCI/USB devices'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.length()
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/hardware/usb'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: hardware
                - tag: component
                  value: node
                - tag: hardware
                  value: usb
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: e2b3c254d6c14e40adc19ebacc58d5c7
                  expression: 'change(/Proxmox VE by HTTP/proxmox_ve.node.hardware.usb[{#NODE.ID}]) <> 0'
                  name: 'Proxmox VE: Node [{#NODE.NAME}] changed number of USB devices'
                  priority: INFO
                  description: 'The number of USB devices on the node {#NODE.NAME} has changed.'
                  manual_close: 'YES'
            - uuid: 1936539905a643869db29b38b3c5c4ae
              name: 'Node [{#NODE.NAME}]: IP address'
              type: DEPENDENT
              key: 'proxmox_ve.node.ip[{#NODE.ID}]'
              value_type: CHAR
              description: 'Retrieves the IP address of the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.nodes["{#NODE.NAME}"].ip'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: Unknown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: proxmox_ve.cluster.resources.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 26f241c06bd549d9a275da63fa5e3005
              name: 'Node [{#NODE.NAME}]: Time (local)'
              type: DEPENDENT
              key: 'proxmox_ve.node.localtime[{#NODE.ID}]'
              units: unixtime
              description: 'Retrieves the local time of the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.localtime
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'proxmox_ve.node.time.info[{#NODE.ID}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: time
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 466efa04cd384304b88e071f40bb7d71
              name: 'Node [{#NODE.NAME}]: Disk total'
              type: DEPENDENT
              key: 'proxmox_ve.node.maxdisk[{#NODE.ID}]'
              units: B
              description: 'Retrieves the total disk space on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id == "{#NODE.ID}")].maxdisk.first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: proxmox_ve.get_node_data
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 33b2e681a3444ca2aaf783ff1b4c2262
              name: 'Node [{#NODE.NAME}]: Memory total'
              type: DEPENDENT
              key: 'proxmox_ve.node.maxmem[{#NODE.ID}]'
              units: B
              description: 'Retrieves the total memory on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id == "{#NODE.ID}")].maxmem.first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: proxmox_ve.get_node_data
              tags:
                - tag: component
                  value: memory
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: bda2c8134071495aa81c1d3be7b7aafb
              name: 'Node [{#NODE.NAME}]: Memory utilization'
              type: CALCULATED
              key: 'proxmox_ve.node.mem.utilization[{#NODE.ID}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//proxmox_ve.node.mem[{#NODE.ID}]) / last(//proxmox_ve.node.maxmem[{#NODE.ID}]) * 100'
              description: 'Retrieves the memory utilization percentage for the node {#NODE.NAME}.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 868833059aab4d2dbc71ef5a8ddf2684
                  expression: 'avg(/Proxmox VE by HTTP/proxmox_ve.node.mem.utilization[{#NODE.ID}], 5m) > {$PVE.TRIGGER.MEMORY.WARNING:"{#NODE.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}] memory utilization high'
                  priority: WARNING
                  description: 'The memory utilization of the node {#NODE.NAME} is high.'
                  tags:
                    - tag: scope
                      value: node
                    - tag: scope
                      value: performance
            - uuid: a9b3314f781b4c139eeadec13c8ca545
              name: 'Node [{#NODE.NAME}]: Memory used'
              type: DEPENDENT
              key: 'proxmox_ve.node.mem[{#NODE.ID}]'
              units: B
              description: 'Retrieves the memory used by the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id == "{#NODE.ID}")].mem.first()'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: proxmox_ve.get_node_data
              tags:
                - tag: component
                  value: memory
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 836090c775494266ab89ca15de989477
              name: 'Node [{#NODE.NAME}]: Status'
              type: DEPENDENT
              key: 'proxmox_ve.node.status[{#NODE.ID}]'
              description: 'Retrieves the status of the node {#NODE.NAME}.'
              valuemap:
                name: 'Proxmox node status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id == "{#NODE.ID}")].status.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: unknown
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const status_map = {
                      	'online': '10',
                      	'unknown': '5',
                      	'offline': '1'
                      };
                      
                      return typeof status_map[value] === 'undefined' ? '0' : status_map[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: proxmox_ve.get_node_data
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 5b79405280c04f55b53b0128026e916f
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.status[{#NODE.ID}]) <> 10'
                  name: 'Proxmox VE: Node [{#NODE.NAME}] not online'
                  priority: WARNING
                  description: 'The node {#NODE.NAME} is not online.'
                  manual_close: 'YES'
            - uuid: 9d296d36d26648f3be04b2d154434b87
              name: 'Node [{#NODE.NAME}]: Subscribe level'
              type: DEPENDENT
              key: 'proxmox_ve.node.subscribe[{#NODE.ID}]'
              value_type: CHAR
              description: 'Retrieves the subscription level of the node {#NODE.NAME}.'
              valuemap:
                name: 'Proxmox subscription level'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.nodes["{#NODE.NAME}"].level'
                  error_handler: CUSTOM_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: proxmox_ve.cluster.resources.get
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 565d91b3cab74c52968c6ed244717225
              name: 'Node [{#NODE.NAME}]: Time info'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.time.info[{#NODE.ID}]'
              delay: 10m
              history: '0'
              value_type: TEXT
              description: 'Retrieves the current time on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/time'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: raw
            - uuid: fd3dd8ae953e4c4db06e67986f46f070
              name: 'Node [{#NODE.NAME}]: Time zone'
              type: DEPENDENT
              key: 'proxmox_ve.node.timezone[{#NODE.ID}]'
              value_type: CHAR
              description: 'Retrieves the timezone of the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.timezone
                  error_handler: CUSTOM_VALUE
                  error_handler_params: Unknown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'proxmox_ve.node.time.info[{#NODE.ID}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: time
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 10ac244555b94ef391129bd6c1fd4508
              name: 'Node [{#NODE.NAME}]: Time'
              type: DEPENDENT
              key: 'proxmox_ve.node.time[{#NODE.ID}]'
              units: unixtime
              description: 'Retrieves the current time on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.time
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'proxmox_ve.node.time.info[{#NODE.ID}]'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: time
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: f2dd7010e59e4af6a897ff8ad2e2b480
              name: 'Node [{#NODE.NAME}]: Available updates'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.updates[{#NODE.ID}]'
              delay: 12h
              valuemap:
                name: 'Proxmox node apt updates'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.length()
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/apt/update'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: updates
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 7acbdb1ffd9648a692844c916a5c3822
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.updates[{#NODE.ID}]) > 0'
                  name: 'Proxmox VE: Node [{#NODE.NAME}] has available updates'
                  priority: INFO
                  description: 'The node {#NODE.NAME} has available updates.'
                  tags:
                    - tag: scope
                      value: node
                    - tag: scope
                      value: notice
            - uuid: 0fb93d390b804a0498bbbcca31c0c229
              name: 'Node [{#NODE.NAME}]: Uptime'
              type: DEPENDENT
              key: 'proxmox_ve.node.uptime[{#NODE.ID}]'
              units: uptime
              description: 'Retrieves the uptime of the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id == "{#NODE.ID}")].uptime.first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: proxmox_ve.get_node_data
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: uptime
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 2e78d1cf8a9d4af68aa464433e356a75
                  expression: 'last(/Proxmox VE by HTTP/proxmox_ve.node.uptime[{#NODE.ID}]) < {$PVE.TRIGGER.UPTIME:"{#NODE.NAME}"}'
                  name: 'Proxmox VE: Node [{#NODE.NAME}] has been restarted'
                  priority: INFO
                  description: 'The node {#NODE.NAME} has been restarted.'
            - uuid: fd98043c577b4697992da7daf5a838b4
              name: 'Node [{#NODE.NAME}]: Version'
              type: HTTP_AGENT
              key: 'proxmox_ve.node.version[{#NODE.ID}]'
              delay: 12h
              value_type: CHAR
              description: 'Retrieves the version of the Proxmox VE on the node {#NODE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.version
                  error_handler: CUSTOM_VALUE
                  error_handler_params: Unknown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              timeout: '10'
              url: 'https://{$PVE.URL.HOST}:{$PVE.URL.PORT}/api2/json//nodes/{#NODE.NAME}/version'
              status_codes: '200,500,595'
              http_proxy: '{$PVE.PROXY}'
              headers:
                - name: Authorization
                  value: 'PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}'
              tags:
                - tag: component
                  value: node
                - tag: component
                  value: version
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: b3d2124cd95d4643a6645abf8ba617dd
                  expression: 'change(/Proxmox VE by HTTP/proxmox_ve.node.version[{#NODE.ID}]) = 1'
                  name: 'Proxmox VE: Node [{#NODE.NAME}] version changed'
                  priority: INFO
                  description: 'The version of Proxmox VE on the node {#NODE.NAME} has changed.'
                  manual_close: 'YES'
          graph_prototypes:
            - uuid: 72016662d4ce4e4b8b63784bacae3edf
              name: 'Node [{#NODE.NAME}] CPU utilization'
              graph_items:
                - color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.cpu[{#NODE.ID}]'
            - uuid: 6efe6c53b76a4352abbdbcde2c58d9d0
              name: 'Node [{#NODE.NAME}] disk'
              graph_items:
                - drawtype: BOLD_LINE
                  color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.disk[{#NODE.ID}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.maxdisk[{#NODE.ID}]'
            - uuid: 3ff711688d9249e8a1bb8ca82aa02663
              name: 'Node [{#NODE.NAME}] memory'
              graph_items:
                - drawtype: BOLD_LINE
                  color: ff0000
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.mem[{#NODE.ID}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 00ff00
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.maxmem[{#NODE.ID}]'
            - uuid: 1c1bc130956148b496979d19b1243314
              name: 'Node [{#NODE.NAME}] status'
              graph_items:
                - drawtype: DOTTED_LINE
                  color: 0004ff
                  item:
                    host: 'Proxmox VE by HTTP'
                    key: 'proxmox_ve.node.status[{#NODE.ID}]'
          master_item:
            key: proxmox_ve.get_node_data
          lld_macro_paths:
            - lld_macro: '{#NODE.CPU.MAX}'
              path: $.maxcpu
            - lld_macro: '{#NODE.CPU}'
              path: $.cpu
            - lld_macro: '{#NODE.DISK.MAX}'
              path: $.maxdisk
            - lld_macro: '{#NODE.DISK}'
              path: $.disk
            - lld_macro: '{#NODE.ID}'
              path: $.id
            - lld_macro: '{#NODE.MEMORY.MAX}'
              path: $.maxmem
            - lld_macro: '{#NODE.MEMORY}'
              path: $.mem
            - lld_macro: '{#NODE.NAME}'
              path: $.node
            - lld_macro: '{#NODE.STATUS}'
              path: $.status
            - lld_macro: '{#NODE.UPTIME}'
              path: $.uptime
          overrides:
            - name: 'Override for "cpu" macro'
              step: '1'
              filter:
                conditions:
                  - macro: '{#NODE.CPU}'
                    operator: NOT_EXISTS
              operations:
                - operator: REGEXP
                  value: ': CPU utilization$'
                  discover: NO_DISCOVER
            - name: 'Override for "maxcpu" macro'
              step: '2'
              filter:
                conditions:
                  - macro: '{#NODE.CPU.MAX}'
                    operator: NOT_EXISTS
              operations:
                - operator: REGEXP
                  value: ': CPU count$'
                  discover: NO_DISCOVER
            - name: 'Override for "mem" macro'
              step: '3'
              filter:
                conditions:
                  - macro: '{#NODE.MEMORY}'
                    operator: NOT_EXISTS
              operations:
                - operator: REGEXP
                  value: ': Memory used$'
                  discover: NO_DISCOVER
                - operator: REGEXP
                  value: ': Memory utilization$'
                  discover: NO_DISCOVER
            - name: 'Override for "maxmem" macro'
              step: '4'
              filter:
                conditions:
                  - macro: '{#NODE.MEMORY.MAX}'
                    operator: NOT_EXISTS
              operations:
                - operator: REGEXP
                  value: ': Memory total$'
                  discover: NO_DISCOVER
            - name: 'Override for "disk" macro'
              step: '5'
              filter:
                conditions:
                  - macro: '{#NODE.DISK}'
                    operator: NOT_EXISTS
              operations:
                - operator: REGEXP
                  value: ': Disk used$'
                  discover: NO_DISCOVER
            - name: 'Override for "maxdisk" macro'
              step: '6'
              filter:
                conditions:
                  - macro: '{#NODE.DISK.MAX}'
                    operator: NOT_EXISTS
              operations:
                - operator: REGEXP
                  value: ': Disk total$'
                  discover: NO_DISCOVER
            - name: 'Override for "uptime" macro'
              step: '7'
              filter:
                conditions:
                  - macro: '{#NODE.UPTIME}'
                    operator: NOT_EXISTS
              operations:
                - operator: REGEXP
                  value: ': Uptime$'
                  discover: NO_DISCOVER
            - name: 'Disable discovery of node certificates'
              step: '8'
              filter:
                conditions:
                  - macro: '{#NODE.NAME}'
                    value: '{$PVE.LLD.ENABLE.CERT}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: LLD_RULE_PROTOTYPE
                  operator: REGEXP
                  value: ' Certificate discovery$'
                  discover: NO_DISCOVER
            - name: 'Disable discovery of node disks'
              step: '9'
              filter:
                conditions:
                  - macro: '{#NODE.NAME}'
                    value: '{$PVE.LLD.ENABLE.DISK}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: LLD_RULE_PROTOTYPE
                  operator: REGEXP
                  value: ' Disks discovery$'
                  discover: NO_DISCOVER
            - name: 'Disable discovery of node storage'
              step: '10'
              filter:
                conditions:
                  - macro: '{#NODE.NAME}'
                    value: '{$PVE.LLD.ENABLE.STORAGE}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: LLD_RULE_PROTOTYPE
                  operator: REGEXP
                  value: ' Storage discovery$'
                  discover: NO_DISCOVER
        - uuid: e051676e5cef47038470f58d60519953
          name: 'Proxmox shared storage discovery'
          type: DEPENDENT
          key: proxmox_ve.shared.storage.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#STORAGE.NAME}'
                value: '{$PVE.FILTER.STORAGE.NAME.MATCH}'
              - macro: '{#STORAGE.NAME}'
                value: '{$PVE.FILTER.STORAGE.NAME.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 84569e8824394c5fa7a842840bef688e
              name: 'Storage [{#STORAGE.NAME}]: Content'
              type: DEPENDENT
              key: 'proxmox_ve.storage.content[{#STORAGE.NAME}]'
              value_type: CHAR
              description: 'Retrieves the content type of shared storage {#STORAGE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.storage.list[?(@.storage == "{#STORAGE.NAME}")].content.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: unknown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: proxmox_ve.cluster.resources.get
              tags:
                - tag: component
                  value: storage
                - tag: storage
                  value: '{#STORAGE.NAME}'
            - uuid: 0f3db2e0ae4f4cd68411c710d5d12c9e
              name: 'Storage [{#STORAGE.NAME}]: Total'
              type: DEPENDENT
              key: 'proxmox_ve.storage.total[{#STORAGE.NAME}]'
              units: B
              description: 'Retrieves the total size of shared storage {#STORAGE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.storage.list[?(@.storage == "{#STORAGE.NAME}")].maxdisk.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: proxmox_ve.cluster.resources.get
              tags:
                - tag: component
                  value: storage
                - tag: storage
                  value: '{#STORAGE.NAME}'
            - uuid: 2692019e125f4aee91dc3f7a25bfe5a1
              name: 'Storage [{#STORAGE.NAME}]: Type'
              type: DEPENDENT
              key: 'proxmox_ve.storage.type[{#STORAGE.NAME}]'
              value_type: CHAR
              description: 'Retrieves the type of shared storage {#STORAGE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.storage.list[?(@.storage == "{#STORAGE.NAME}")].plugintype.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: unknown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: proxmox_ve.cluster.resources.get
              tags:
                - tag: component
                  value: storage
                - tag: storage
                  value: '{#STORAGE.NAME}'
            - uuid: f461c12c867b4f9899b4859201b3bd3f
              name: 'Storage [{#STORAGE.NAME}]: Used'
              type: DEPENDENT
              key: 'proxmox_ve.storage.used[{#STORAGE.NAME}]'
              units: B
              description: 'Retrieves the used size of shared storage {#STORAGE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.storage.list[?(@.storage == "{#STORAGE.NAME}")].disk.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: proxmox_ve.cluster.resources.get
              tags:
                - tag: component
                  value: storage
                - tag: storage
                  value: '{#STORAGE.NAME}'
            - uuid: 9fc8137e40fc4a17a67704fc0bbdb70c
              name: 'Storage [{#STORAGE.NAME}]: Utilization'
              type: CALCULATED
              key: 'proxmox_ve.storage.utilization[{#STORAGE.NAME}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//proxmox_ve.storage.used[{#STORAGE.NAME}]) / last(//proxmox_ve.storage.total[{#STORAGE.NAME}]) * 100'
              description: 'Retrieves the storage utilization percentage for shared storage {#STORAGE.NAME}.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: storage
                - tag: storage
                  value: '{#STORAGE.NAME}'
          master_item:
            key: proxmox_ve.cluster.resources.get
          lld_macro_paths:
            - lld_macro: '{#STORAGE.NAME}'
              path: $.storage
            - lld_macro: '{#STORAGE.TYPE}'
              path: $.plugintype
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.storage.list
              error_handler: CUSTOM_VALUE
              error_handler_params: '[]'
        - uuid: 245eb79c15e047d592b5a7678682f352
          name: 'Proxmox users discovery'
          type: DEPENDENT
          key: proxmox_ve.users.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#USER.FULLNAME}'
                value: '{$PVE.FILTER.USER.MATCH}'
              - macro: '{#USER.FULLNAME}'
                value: '{$PVE.FILTER.USER.NOTMATCH}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 096a3bd30de646518f9d72983fd0d06f
              name: 'User [{#USER.FULLNAME}]: Enabled'
              type: DEPENDENT
              key: 'proxmox_ve.user.enabled[{#USER.ID}]'
              description: 'Retrieves enabled status for the user {#USER.FIRSTNAME} {#USER.LASTNAME} ({#USER.ID}).'
              valuemap:
                name: 'Proxmox user enabled status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data[?(@.userid == "{#USER.ID}")].enable.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: proxmox_ve.get_user_data
              tags:
                - tag: component
                  value: user
                - tag: user
                  value: '{#USER.ID}'
              trigger_prototypes:
                - uuid: 2680a1a2d6f743cf9381255dd7fea570
                  expression: 'change(/Proxmox VE by HTTP/proxmox_ve.user.enabled[{#USER.ID}]) <> 0'
                  name: 'Proxmox VE: User [{#USER.FULLNAME}] enabled status changed'
                  priority: INFO
                  description: 'The user {#USER.FULLNAME} enabled status has changed.'
                  manual_close: 'YES'
            - uuid: 2995051bb2984c3ca382270a06c7c055
              name: 'User [{#USER.FULLNAME}]: Expire after'
              type: DEPENDENT
              key: 'proxmox_ve.user.expire[{#USER.ID}]'
              value_type: FLOAT
              units: uptime
              description: |
                Retrieves the expiration time for the user {#USER.FULLNAME}.
                The value is calculated as the difference between the current time and the expiration time.
              valuemap:
                name: 'Proxmox user expire date'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data[?(@.userid == "{#USER.ID}")].expire.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      if (value === '0') {
                      	return -1;
                      } else if (parseInt(value) <= Date.now() / 1000) {
                      	return 0;
                      } else {
                      	return Math.trunc(parseInt(value) - Date.now() / 1000);
                      }
              master_item:
                key: proxmox_ve.get_user_data
              tags:
                - tag: component
                  value: user
                - tag: user
                  value: '{#USER.ID}'
          trigger_prototypes:
            - uuid: c22fb47f8bc8436291ed0efeb245b022
              expression: 'last(/Proxmox VE by HTTP/proxmox_ve.user.expire[{#USER.ID}]) = 0 and last(/Proxmox VE by HTTP/proxmox_ve.user.enabled[{#USER.ID}]) = 1'
              name: 'Proxmox VE: User [{#USER.FULLNAME}] expired'
              priority: INFO
              description: 'The user {#USER.FULLNAME} has expired.'
              manual_close: 'YES'
          master_item:
            key: proxmox_ve.get_user_data
          lld_macro_paths:
            - lld_macro: '{#USER.FIRSTNAME}'
              path: $.firstname
            - lld_macro: '{#USER.FULLNAME}'
              path: $.fullname
            - lld_macro: '{#USER.ID}'
              path: $.userid
            - lld_macro: '{#USER.LASTNAME}'
              path: $.lastname
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: virtualization
        - tag: target
          value: proxmox
      macros:
        - macro: '{$PVE.FILTER.CERT.FILE.MATCH}'
          value: '.*'
          description: 'Filter for certificate file discovery by name.'
          config:
            type: TEXT
            priority: '22'
            section_name: Filters
            label: 'Certificate file discovery filter'
            description: 'The filter for certificate file discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.CERT.FILE.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for certificate file discovery by name.'
          config:
            type: TEXT
            priority: '23'
            section_name: Filters
            label: 'Certificate file discovery exclude filter'
            description: 'The exclude filter for certificate file discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.DISK.MATCH}'
          value: '.*'
          description: 'Filter for disk discovery by name.'
          config:
            type: TEXT
            priority: '25'
            section_name: Filters
            label: 'Disk discovery filter'
            description: 'The filter for disk discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.DISK.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for disk discovery by name.'
          config:
            type: TEXT
            priority: '26'
            section_name: Filters
            label: 'Disk discovery exclude filter'
            description: 'The exclude filter for disk discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.LXC.MATCH}'
          value: '.*'
          description: 'Filter for LXC discovery by name.'
          config:
            type: TEXT
            priority: '29'
            section_name: Filters
            label: 'LXC discovery filter'
            description: 'The filter for LXC discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.LXC.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for LXC discovery by name.'
          config:
            type: TEXT
            priority: '30'
            section_name: Filters
            label: 'LXC discovery exclude filter'
            description: 'The exclude filter for LXC discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.NODE.MATCH}'
          value: '.*'
          description: 'Filter for node discovery by name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Node discovery filter'
            description: 'The filter for node discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.NODE.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for node discovery by name.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Node discovery exclude filter'
            description: 'The exclude filter for node discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.NODE.STATUS}'
          value: '.*'
          description: 'Filter for node discovery by status.'
          config:
            type: CHECKBOX
            priority: '13'
            section_name: Other
            label: 'Discovery only online nodes'
            description: 'The filter for node discovery by status.'
            options:
              - checked: online
                unchecked: '.*'
        - macro: '{$PVE.FILTER.QEMU.FS.MOUNT_POINT.MATCH}'
          value: '.*'
          description: 'Filter for QEMU virtual machine filesystem discovery by mount point.'
          config:
            type: TEXT
            priority: '33'
            section_name: Filters
            label: 'QEMU virtual machine filesystem mount point discovery filter'
            description: 'The filter for QEMU virtual machine filesystem discovery by mount point.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMU.FS.MOUNT_POINT.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for QEMU virtual machine filesystem discovery by mount point.'
          config:
            type: TEXT
            priority: '34'
            section_name: Filters
            label: 'QEMU virtual machine filesystem mount point discovery exclude filter'
            description: 'The exclude filter for QEMU virtual machine filesystem discovery by mount point.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMU.FS.TYPE.MATCH}'
          value: '.*'
          description: 'Filter for QEMU virtual machine filesystem discovery by type.'
          config:
            type: TEXT
            priority: '35'
            section_name: Filters
            label: 'QEMU virtual machine filesystem type discovery filter'
            description: 'The filter for QEMU virtual machine filesystem discovery by type.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMU.FS.TYPE.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for QEMU virtual machine filesystem discovery by type.'
          config:
            type: TEXT
            priority: '36'
            section_name: Filters
            label: 'QEMU virtual machine filesystem type discovery exclude filter'
            description: 'The exclude filter for QEMU virtual machine filesystem discovery by type.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMU.MATCH}'
          value: '.*'
          description: 'Filter for QEMU virtual machine discovery by name.'
          config:
            type: TEXT
            priority: '31'
            section_name: Filters
            label: 'QEMU virtual machine discovery filter'
            description: 'The filter for QEMU virtual machine discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMU.NET.IFACE.NAME.MATCH}'
          value: '.*'
          description: 'Filter for QEMU virtual machine network interface discovery by name.'
          config:
            type: TEXT
            priority: '41'
            section_name: Filters
            label: 'QEMU virtual machine network interface discovery filter'
            description: 'The filter for QEMU virtual machine network interface discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMU.NET.IFACE.NAME.NOTMATCH}'
          value: 'lo|Loopback.*'
          description: 'Exclude filter for QEMU virtual machine network interface discovery by name.'
          config:
            type: TEXT
            priority: '42'
            section_name: Filters
            label: 'QEMU virtual machine network interface discovery exclude filter'
            description: 'The exclude filter for QEMU virtual machine network interface discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMU.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for QEMU virtual machine discovery by name.'
          config:
            type: TEXT
            priority: '32'
            section_name: Filters
            label: 'QEMU virtual machine discovery exclude filter'
            description: 'The exclude filter for QEMU virtual machine discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMU.OS.METRIC.MATCH}'
          value: '.*'
          description: 'Filter for QEMU virtual machine OS metric discovery by name.'
          config:
            type: TEXT
            priority: '38'
            section_name: Filters
            label: 'QEMU virtual machine OS metric discovery filter'
            description: 'The filter for QEMU virtual machine OS metric discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMU.OS.METRIC.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for QEMU virtual machine OS metric discovery by name.'
          config:
            type: TEXT
            priority: '39'
            section_name: Filters
            label: 'QEMU virtual machine OS metric discovery exclude filter'
            description: 'The exclude filter for QEMU virtual machine OS metric discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.QEMULXC.STATUS.MATCH}'
          value: '.*'
          description: 'Filter for QEMU and LXC discovery by status.'
          config:
            type: CHECKBOX
            priority: '28'
            section_name: Filters
            label: 'Discovery only running QEMU virtual machines and LXC containers'
            description: |
              The filter for QEMU and LXC discovery by status.
              If enabled, only running QEMU and LXC will be discovered.
            options:
              - checked: running
                unchecked: '.*'
        - macro: '{$PVE.FILTER.STORAGE.NAME.MATCH}'
          value: '.*'
          description: 'Filter for storage discovery by name.'
          config:
            type: TEXT
            priority: '44'
            section_name: Filters
            label: 'Storage discovery filter'
            description: 'The filter for storage discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.STORAGE.NAME.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for storage discovery by name.'
          config:
            type: TEXT
            priority: '45'
            section_name: Filters
            label: 'Storage discovery exclude filter'
            description: 'The exclude filter for storage discovery by name.'
            regex: '.*'
        - macro: '{$PVE.FILTER.USER.MATCH}'
          value: '.*'
          description: 'Filter for user discovery by fullname.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'User discovery filter'
            description: 'The filter for user discovery by fullname.'
            regex: '.*'
        - macro: '{$PVE.FILTER.USER.NOTMATCH}'
          value: CHANGE_ME_IF_NEEDED
          description: 'Exclude filter for user discovery by fullname.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'User discovery exclude filter'
            description: 'The exclude filter for user discovery by fullname.'
            regex: '.*'
        - macro: '{$PVE.LLD.ENABLE.CERT}'
          value: '.*'
          description: 'Enable discovery of node certificates.'
          config:
            type: CHECKBOX
            priority: '19'
            section_name: 'Low Level Discovery'
            label: 'Enable discovery of node certificates'
            description: 'If enabled, the template will discover node certificates.'
            options:
              - checked: '.*'
                unchecked: NO_DISCOVERY
        - macro: '{$PVE.LLD.ENABLE.DISK}'
          value: '.*'
          description: 'Enable discovery of node disks.'
          config:
            type: CHECKBOX
            priority: '20'
            section_name: 'Low Level Discovery'
            label: 'Enable discovery of node disks'
            description: 'If enabled, the template will discover node disks.'
            options:
              - checked: '.*'
                unchecked: NO_DISCOVERY
        - macro: '{$PVE.LLD.ENABLE.STORAGE}'
          value: '.*'
          description: 'Enable discovery of node storage.'
          config:
            type: CHECKBOX
            priority: '21'
            section_name: 'Low Level Discovery'
            label: 'Enable discovery of node storage'
            description: 'If enabled, the template will discover node storage.'
            options:
              - checked: '.*'
                unchecked: NO_DISCOVERY
        - macro: '{$PVE.PARAMS.INTERVAL.CERT}'
          value: 1h
          description: 'Interval for certificate data retrieval.'
          config:
            type: TEXT
            priority: '24'
            section_name: Other
            label: 'Certificate data update interval'
            description: |
              The interval for retrieving certificate data from the Proxmox VE API.
              Use for LLD and item updates.
            regex: '.*'
        - macro: '{$PVE.PARAMS.INTERVAL.CLUSTER}'
          value: 1m
          description: 'Interval for cluster data retrieval.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'Cluster data update interval'
            description: 'The interval for retrieving cluster data from the Proxmox VE API.'
            regex: '.*'
        - macro: '{$PVE.PARAMS.INTERVAL.DISK}'
          value: 1h
          description: 'Interval for disk discovery.'
          config:
            type: TEXT
            priority: '27'
            section_name: Other
            label: 'Disk discovery interval'
            description: 'The interval for discovering disk from the Proxmox VE API.'
            regex: '.*'
        - macro: '{$PVE.PARAMS.INTERVAL.NODE}'
          value: 1m
          description: 'Interval for node data retrieval.'
          config:
            type: TEXT
            priority: '8'
            section_name: Other
            label: 'Node data update interval'
            description: |
              The interval for retrieving node data from the Proxmox VE API.
              Use for LLD and item updates.
            regex: '.*'
        - macro: '{$PVE.PARAMS.INTERVAL.QEMU.FS}'
          value: 1h
          description: 'Interval for QEMU virtual machine filesystem discover.'
          config:
            type: TEXT
            priority: '37'
            section_name: Other
            label: 'QEMU virtual machine filesystem discovery interval'
            description: 'The interval for discovery QEMU virtual machine filesystem from the Proxmox VE API.'
            regex: '.*'
        - macro: '{$PVE.PARAMS.INTERVAL.QEMU.NETWORK}'
          value: 12h
          description: 'Interval for QEMU virtual machine network interface discovery.'
          config:
            type: TEXT
            priority: '43'
            section_name: Other
            label: 'QEMU virtual machine network interface discovery interval'
            description: 'The interval for discovery QEMU virtual machine network interface from the Proxmox VE API.'
            regex: '.*'
        - macro: '{$PVE.PARAMS.INTERVAL.QEMU.OS}'
          value: 12h
          description: 'Interval for QEMU virtual machine OS metric data retrieval.'
          config:
            type: TEXT
            priority: '40'
            section_name: Other
            label: 'QEMU virtual machine OS metric data update interval'
            description: |
              The interval for retrieving QEMU virtual machine OS metric data from the Proxmox VE API.
              Use for LLD and item updates.
            regex: '.*'
        - macro: '{$PVE.PARAMS.INTERVAL.STORAGE}'
          value: 12h
          description: 'Interval for storage discovery.'
          config:
            type: TEXT
            priority: '46'
            section_name: Other
            label: 'Storage discovery interval'
            description: 'The interval for discovering storage from the Proxmox VE API.'
            regex: '.*'
        - macro: '{$PVE.PARAMS.INTERVAL.USER}'
          value: 1h
          description: 'Interval for user data retrieval.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'User data update interval'
            description: |
              The interval for retrieving user data from the Proxmox VE API.
              Use for LLD and item updates.
            regex: '.*'
        - macro: '{$PVE.PROXY}'
          description: 'Proxy settings for the Proxmox VE API.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'Proxmox VE API Proxy'
            description: |
              The proxy settings for the Proxmox VE API.
              Set empty value if you do not want to use a proxy.
            regex: '.*'
        - macro: '{$PVE.TOKEN.ID}'
          value: USER@REALM!TOKENID
          description: 'API tokens allow stateless access to most parts of the REST API by another system, software or API client.'
          config:
            type: TEXT
            priority: '3'
            label: 'Proxmox VE API Token ID'
            description: 'The ID of the API token to use for authentication.'
            required: 'YES'
            regex: '.*'
        - macro: '{$PVE.TOKEN.SECRET}'
          type: SECRET_TEXT
          description: 'Secret key.'
          config:
            type: TEXT
            priority: '4'
            label: 'Proxmox VE API Token Secret'
            description: 'The secret key of the API token to use for authentication.'
            required: 'YES'
            regex: '.*'
        - macro: '{$PVE.TRIGGER.CPU.WARNING}'
          value: '90'
          description: 'Threshold for CPU utilization warning triggers in percentage. This macro support context.'
          config:
            type: TEXT
            priority: '15'
            section_name: Other
            label: 'Threshold for CPU utilization (in %).'
            description: 'If the CPU utilization is greater than this value, a trigger will be activated. In the range from 1 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PVE.TRIGGER.DISK.WARNING}'
          value: '90'
          description: 'Threshold for disk usage warning triggers in percentage. This macro support context.'
          config:
            type: TEXT
            priority: '17'
            section_name: Other
            label: 'Threshold for disk usage (in %).'
            description: 'If the disk usage is greater than this value, a trigger will be activated. In the range from 1 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PVE.TRIGGER.MEMORY.WARNING}'
          value: '90'
          description: 'Threshold for memory usage warning triggers in percentage. This macro support context.'
          config:
            type: TEXT
            priority: '16'
            section_name: Other
            label: 'Threshold for memory usage (in %).'
            description: 'If the memory usage is greater than this value, a trigger will be activated. In the range from 1 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PVE.TRIGGER.SWAP.WARNING}'
          value: '90'
          description: 'Threshold for swap usage warning triggers in percentage. This macro support context.'
          config:
            type: TEXT
            priority: '18'
            section_name: Other
            label: 'Threshold for swap usage (in %).'
            description: 'If the swap usage is greater than this value, a trigger will be activated. In the range from 1 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PVE.TRIGGER.UPTIME}'
          value: 15m
          description: 'Threshold for uptime triggers. This macro support context.'
          config:
            type: TEXT
            priority: '14'
            section_name: Other
            label: 'Threshold for uptime triggers.'
            description: 'If the node uptime is less than this value, a trigger will be activated..'
            regex: '.*'
        - macro: '{$PVE.URL.HOST}'
          description: 'The hostname or IP address of the Proxmox VE API host.'
          config:
            type: TEXT
            priority: '1'
            label: 'Proxmox VE Host'
            description: 'The hostname or IP address of the Proxmox VE API host.'
            required: 'YES'
            regex: '.*'
        - macro: '{$PVE.URL.PORT}'
          value: '8006'
          description: 'The port number of the Proxmox VE API host.'
          config:
            type: TEXT
            priority: '2'
            label: 'Proxmox VE Port'
            description: 'The port number of the Proxmox VE API host. In the range from 1 to 65535 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: c5dc124c7789432a905f4cfc6c6eda81
          name: 'Proxmox VE'
          display_period: '3600'
          auto_start: 'NO'
          pages:
            - name: 'Proxmox VE overview'
              widgets:
                - type: item
                  name: Status
                  width: '12'
                  height: '3'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: decimal_size
                      value: '10'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.quorum.status
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                    - type: STRING
                      name: thresholds.0.color
                      value: FF8A65
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: 81C784
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: 3272fc
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: gauge
                  name: CPU
                  'y': '3'
                  width: '12'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: angle
                      value: '270'
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: CPU
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.cpu.utilization
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: scale_show_units
                      value: '0'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '3'
                    - type: INTEGER
                      name: show.3
                      value: '4'
                    - type: INTEGER
                      name: show.4
                      value: '5'
                    - type: STRING
                      name: thresholds.0.color
                      value: 4CAF50
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFFF00
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '50'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF8000
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '80'
                    - type: STRING
                      name: thresholds.3.color
                      value: FF4000
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: value_arc_color
                      value: 1E88E5
                - type: item
                  'y': '7'
                  width: '12'
                  height: '1'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.cpu.count
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: topitems
                  'y': '8'
                  width: '18'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: columns.0.base_color
                      value: 4CAF50
                    - type: INTEGER
                      name: columns.0.display
                      value: '3'
                    - type: STRING
                      name: columns.0.items.0
                      value: '*CPU utilization'
                    - type: INTEGER
                      name: columns.0.item_tags.0.operator
                      value: '2'
                    - type: STRING
                      name: columns.0.item_tags.0.tag
                      value: component
                    - type: STRING
                      name: columns.0.item_tags.0.value
                      value: cluster
                    - type: INTEGER
                      name: columns.0.item_tags.1.operator
                      value: '5'
                    - type: STRING
                      name: columns.0.item_tags.1.tag
                      value: qemu
                    - type: STRING
                      name: columns.0.item_tags.1.value
                      value: ''
                    - type: INTEGER
                      name: columns.0.item_tags.2.operator
                      value: '5'
                    - type: STRING
                      name: columns.0.item_tags.2.tag
                      value: lxc
                    - type: STRING
                      name: columns.0.item_tags.2.value
                      value: ''
                    - type: STRING
                      name: columns.0.max
                      value: '100'
                    - type: STRING
                      name: columns.0.min
                      value: '0'
                    - type: STRING
                      name: columns.0.thresholds.0.color
                      value: FFFF00
                    - type: STRING
                      name: columns.0.thresholds.0.threshold
                      value: '50'
                    - type: STRING
                      name: columns.0.thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: columns.0.thresholds.1.threshold
                      value: '80'
                    - type: STRING
                      name: columns.0.thresholds.2.color
                      value: FF4000
                    - type: STRING
                      name: columns.0.thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: item_ordering_limit
                      value: '20'
                    - type: INTEGER
                      name: item_ordering_order_by
                      value: '2'
                    - type: INTEGER
                      name: layout
                      value: '1'
                    - type: INTEGER
                      name: problems
                      value: '2'
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show_column_header
                      value: '0'
                - type: honeycomb
                  name: 'Node status'
                  x: '12'
                  width: '15'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Node [*]: Status'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '5'
                    - type: STRING
                      name: item_tags.0.tag
                      value: qemu
                    - type: STRING
                      name: item_tags.0.value
                      value: ''
                    - type: INTEGER
                      name: item_tags.1.operator
                      value: '5'
                    - type: STRING
                      name: item_tags.1.tag
                      value: lxc
                    - type: STRING
                      name: item_tags.1.value
                      value: ''
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^(Node \[)(.*)(\]: Status)", "\2")}'
                    - type: STRING
                      name: reference
                      value: FEFFA
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: STRING
                      name: thresholds.0.color
                      value: B0BEC5
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '5'
                    - type: STRING
                      name: thresholds.1.color
                      value: E65660
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: 3BC97D
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '10'
                    - type: STRING
                      name: thresholds.3.color
                      value: B0BEC5
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '0'
                - type: gauge
                  x: '12'
                  'y': '3'
                  width: '12'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: angle
                      value: '270'
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: Memory
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.memory.utilization
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: scale_show_units
                      value: '0'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '3'
                    - type: INTEGER
                      name: show.3
                      value: '4'
                    - type: INTEGER
                      name: show.4
                      value: '5'
                    - type: STRING
                      name: thresholds.0.color
                      value: 4CAF50
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFFF00
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '50'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF8000
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '80'
                    - type: STRING
                      name: thresholds.3.color
                      value: FF4000
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: value_arc_color
                      value: 1E88E5
                - type: item
                  x: '12'
                  'y': '7'
                  width: '6'
                  height: '1'
                  hide_header: 'YES'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.memory.used
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: item
                  x: '18'
                  'y': '7'
                  width: '6'
                  height: '1'
                  hide_header: 'YES'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.memory.total
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: topitems
                  x: '18'
                  'y': '8'
                  width: '18'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: columns.0.base_color
                      value: 4CAF50
                    - type: INTEGER
                      name: columns.0.display
                      value: '2'
                    - type: STRING
                      name: columns.0.items.0
                      value: '*Memory utilization'
                    - type: INTEGER
                      name: columns.0.item_tags.0.operator
                      value: '2'
                    - type: STRING
                      name: columns.0.item_tags.0.tag
                      value: component
                    - type: STRING
                      name: columns.0.item_tags.0.value
                      value: cluster
                    - type: INTEGER
                      name: columns.0.item_tags.1.operator
                      value: '5'
                    - type: STRING
                      name: columns.0.item_tags.1.tag
                      value: qemu
                    - type: STRING
                      name: columns.0.item_tags.1.value
                      value: ''
                    - type: INTEGER
                      name: columns.0.item_tags.2.operator
                      value: '5'
                    - type: STRING
                      name: columns.0.item_tags.2.tag
                      value: lxc
                    - type: STRING
                      name: columns.0.item_tags.2.value
                      value: ''
                    - type: STRING
                      name: columns.0.max
                      value: '100'
                    - type: STRING
                      name: columns.0.min
                      value: '0'
                    - type: STRING
                      name: columns.0.thresholds.0.color
                      value: FFFF00
                    - type: STRING
                      name: columns.0.thresholds.0.threshold
                      value: '50'
                    - type: STRING
                      name: columns.0.thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: columns.0.thresholds.1.threshold
                      value: '80'
                    - type: STRING
                      name: columns.0.thresholds.2.color
                      value: FF4000
                    - type: STRING
                      name: columns.0.thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: item_ordering_limit
                      value: '20'
                    - type: INTEGER
                      name: item_ordering_order_by
                      value: '2'
                    - type: INTEGER
                      name: layout
                      value: '1'
                    - type: INTEGER
                      name: problems
                      value: '2'
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show_column_header
                      value: '0'
                - type: gauge
                  x: '24'
                  'y': '3'
                  width: '12'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: angle
                      value: '270'
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: Storage
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.storage.utilization
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: scale_show_units
                      value: '0'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '3'
                    - type: INTEGER
                      name: show.3
                      value: '4'
                    - type: INTEGER
                      name: show.4
                      value: '5'
                    - type: STRING
                      name: thresholds.0.color
                      value: 4CAF50
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFFF00
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '50'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF8000
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '80'
                    - type: STRING
                      name: thresholds.3.color
                      value: FF4000
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: value_arc_color
                      value: 1E88E5
                - type: item
                  x: '24'
                  'y': '7'
                  width: '6'
                  height: '1'
                  hide_header: 'YES'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.storage.used
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: piechart
                  name: Nodes
                  x: '27'
                  width: '15'
                  height: '3'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: draw_type
                      value: '1'
                    - type: STRING
                      name: ds.0.color.0
                      value: 81C784
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.nodes.online
                    - type: INTEGER
                      name: ds.0.type.0
                      value: '0'
                    - type: STRING
                      name: ds.1.color.0
                      value: FF8A65
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.nodes.offline
                    - type: INTEGER
                      name: ds.1.type.0
                      value: '0'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_value
                      value: '1'
                    - type: INTEGER
                      name: total_show
                      value: '1'
                - type: item
                  x: '30'
                  'y': '7'
                  width: '6'
                  height: '1'
                  hide_header: 'YES'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.storage.total
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: svggraph
                  x: '36'
                  'y': '3'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 0080FF
                    - type: STRING
                      name: ds.0.color.1
                      value: FFD54F
                    - type: STRING
                      name: ds.0.color.2
                      value: 0EC9AC
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '1'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.cpu.utilization
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.memory.utilization
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.storage.utilization
                    - type: INTEGER
                      name: ds.0.missingdatafunc
                      value: '3'
                    - type: INTEGER
                      name: ds.0.transparency
                      value: '4'
                    - type: INTEGER
                      name: ds.0.type
                      value: '2'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: lefty_max
                      value: '100'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: ZZQQX
                    - type: INTEGER
                      name: righty
                      value: '0'
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: topitems
                  x: '36'
                  'y': '8'
                  width: '18'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: columns.0.base_color
                      value: 4CAF50
                    - type: INTEGER
                      name: columns.0.display_value_as
                      value: '2'
                    - type: STRING
                      name: columns.0.items.0
                      value: 'Node [*]: uptime'
                    - type: INTEGER
                      name: columns.0.item_tags.0.operator
                      value: '2'
                    - type: STRING
                      name: columns.0.item_tags.0.tag
                      value: component
                    - type: STRING
                      name: columns.0.item_tags.0.value
                      value: cluster
                    - type: INTEGER
                      name: columns.0.item_tags.1.operator
                      value: '5'
                    - type: STRING
                      name: columns.0.item_tags.1.tag
                      value: qemu
                    - type: STRING
                      name: columns.0.item_tags.1.value
                      value: ''
                    - type: INTEGER
                      name: columns.0.item_tags.2.operator
                      value: '5'
                    - type: STRING
                      name: columns.0.item_tags.2.tag
                      value: lxc
                    - type: STRING
                      name: columns.0.item_tags.2.value
                      value: ''
                    - type: INTEGER
                      name: item_ordering_limit
                      value: '20'
                    - type: INTEGER
                      name: item_ordering_order_by
                      value: '2'
                    - type: INTEGER
                      name: layout
                      value: '1'
                    - type: INTEGER
                      name: problems
                      value: '2'
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show_column_header
                      value: '0'
                - type: piechart
                  name: 'Virtual mashines'
                  x: '42'
                  width: '15'
                  height: '3'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: draw_type
                      value: '1'
                    - type: STRING
                      name: ds.0.color.0
                      value: 81C784
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.vms.running
                    - type: INTEGER
                      name: ds.0.type.0
                      value: '0'
                    - type: STRING
                      name: ds.1.color.0
                      value: FF8A65
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.vms.stopped
                    - type: INTEGER
                      name: ds.1.type.0
                      value: '0'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_value
                      value: '1'
                    - type: INTEGER
                      name: total_show
                      value: '1'
                - type: topitems
                  x: '54'
                  'y': '8'
                  width: '18'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: columns.0.base_color
                      value: 4CAF50
                    - type: INTEGER
                      name: columns.0.display
                      value: '2'
                    - type: STRING
                      name: columns.0.items.0
                      value: '*torage [*]: Utilization'
                    - type: STRING
                      name: columns.0.max
                      value: '100'
                    - type: STRING
                      name: columns.0.min
                      value: '0'
                    - type: STRING
                      name: columns.0.thresholds.0.color
                      value: FFFF00
                    - type: STRING
                      name: columns.0.thresholds.0.threshold
                      value: '50'
                    - type: STRING
                      name: columns.0.thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: columns.0.thresholds.1.threshold
                      value: '80'
                    - type: STRING
                      name: columns.0.thresholds.2.color
                      value: FF4000
                    - type: STRING
                      name: columns.0.thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: item_ordering_limit
                      value: '20'
                    - type: INTEGER
                      name: item_ordering_order_by
                      value: '2'
                    - type: INTEGER
                      name: layout
                      value: '1'
                    - type: INTEGER
                      name: problems
                      value: '2'
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show_column_header
                      value: '0'
                - type: piechart
                  name: 'LXC containers'
                  x: '57'
                  width: '15'
                  height: '3'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: draw_type
                      value: '1'
                    - type: STRING
                      name: ds.0.color.0
                      value: 81C784
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.lxc.running
                    - type: INTEGER
                      name: ds.0.type.0
                      value: '0'
                    - type: STRING
                      name: ds.1.color.0
                      value: FF8A65
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'Proxmox VE by HTTP'
                        key: proxmox_ve.cluster.lxc.stopped
                    - type: INTEGER
                      name: ds.1.type.0
                      value: '0'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_value
                      value: '1'
                    - type: INTEGER
                      name: total_show
                      value: '1'
            - name: 'Proxmox VE Virtual machines/LXC containers'
              widgets:
                - type: honeycomb
                  name: 'Virtual machines'
                  width: '36'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Node [*]: QEMU [*]: status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^(Node \[)(.*)(: QEMU \[)(.*)(\]: Status)", "\4")}'
                    - type: STRING
                      name: reference
                      value: CEUHK
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: STRING
                      name: thresholds.0.color
                      value: B0BEC5
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: E65660
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: 3BC97D
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                - type: itemnavigator
                  name: QEMU
                  'y': '3'
                  width: '12'
                  height: '10'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: qemu
                    - type: STRING
                      name: items.0
                      value: 'Node [*]: QEMU [*]: *Utilization'
                    - type: STRING
                      name: items.1
                      value: 'Node [*]: QEMU [*]: Network input speed*'
                    - type: STRING
                      name: items.2
                      value: 'Node [*]: QEMU [*]: Network output speed*'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '3'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: raw
                    - type: STRING
                      name: reference
                      value: LAYQE
                    - type: INTEGER
                      name: show_lines
                      value: '500'
                - type: topitems
                  x: '12'
                  'y': '3'
                  width: '12'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: columns.0.display
                      value: '2'
                    - type: STRING
                      name: columns.0.items.0
                      value: 'Node [*]: QEMU [*]: CPU utilization'
                    - type: STRING
                      name: columns.0.max
                      value: '100'
                    - type: STRING
                      name: columns.0.min
                      value: '0'
                    - type: INTEGER
                      name: item_ordering_order_by
                      value: '2'
                    - type: INTEGER
                      name: layout
                      value: '1'
                    - type: INTEGER
                      name: problems
                      value: '2'
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show_column_header
                      value: '0'
                - type: svggraph
                  x: '12'
                  'y': '8'
                  width: '24'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 0080FF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: LAYQE._itemid
                    - type: INTEGER
                      name: ds.0.transparency
                      value: '7'
                    - type: INTEGER
                      name: ds.0.type
                      value: '2'
                    - type: INTEGER
                      name: ds.0.width
                      value: '3'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: OTZNF
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: righty
                      value: '0'
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: topitems
                  x: '24'
                  'y': '3'
                  width: '12'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: columns.0.display
                      value: '2'
                    - type: STRING
                      name: columns.0.items.0
                      value: 'Node [*]: QEMU [*]: Memory utilization'
                    - type: STRING
                      name: columns.0.max
                      value: '100'
                    - type: STRING
                      name: columns.0.min
                      value: '0'
                    - type: INTEGER
                      name: item_ordering_order_by
                      value: '2'
                    - type: INTEGER
                      name: layout
                      value: '1'
                    - type: INTEGER
                      name: problems
                      value: '2'
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show_column_header
                      value: '0'
                - type: honeycomb
                  name: 'LXC containers'
                  x: '36'
                  width: '36'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Node [*]: LXC [*]: Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^(Node \[)(.*)(: LXC \[)(.*)(\]: Status)", "\4")}'
                    - type: STRING
                      name: reference
                      value: FYYJF
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: STRING
                      name: thresholds.0.color
                      value: B0BEC5
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: E65660
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: 3BC97D
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                - type: itemnavigator
                  name: LXC
                  x: '36'
                  'y': '3'
                  width: '12'
                  height: '10'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: group_by.0.attribute
                      value: '3'
                    - type: STRING
                      name: group_by.0.tag_name
                      value: lxc
                    - type: STRING
                      name: items.0
                      value: 'Node [*]: LXC [*]: *Utilization'
                    - type: STRING
                      name: items.1
                      value: 'Node [*]: LXC [*]: Network*'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '3'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: raw
                    - type: STRING
                      name: reference
                      value: NYHTO
                    - type: INTEGER
                      name: show_lines
                      value: '500'
                - type: topitems
                  x: '48'
                  'y': '3'
                  width: '12'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: columns.0.display
                      value: '2'
                    - type: STRING
                      name: columns.0.items.0
                      value: 'Node [*]: LXC [*]: CPU utilization'
                    - type: STRING
                      name: columns.0.max
                      value: '100'
                    - type: STRING
                      name: columns.0.min
                      value: '0'
                    - type: INTEGER
                      name: item_ordering_order_by
                      value: '2'
                    - type: INTEGER
                      name: layout
                      value: '1'
                    - type: INTEGER
                      name: problems
                      value: '2'
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show_column_header
                      value: '0'
                - type: svggraph
                  x: '48'
                  'y': '8'
                  width: '24'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 0080FF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: NYHTO._itemid
                    - type: INTEGER
                      name: ds.0.transparency
                      value: '7'
                    - type: INTEGER
                      name: ds.0.type
                      value: '2'
                    - type: INTEGER
                      name: ds.0.width
                      value: '3'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: BWRJQ
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: righty
                      value: '0'
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: topitems
                  x: '60'
                  'y': '3'
                  width: '12'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: columns.0.display
                      value: '2'
                    - type: STRING
                      name: columns.0.items.0
                      value: 'Node [*]: LXC [*]: Memory utilization'
                    - type: STRING
                      name: columns.0.max
                      value: '100'
                    - type: STRING
                      name: columns.0.min
                      value: '0'
                    - type: INTEGER
                      name: item_ordering_order_by
                      value: '2'
                    - type: INTEGER
                      name: layout
                      value: '1'
                    - type: INTEGER
                      name: problems
                      value: '2'
                    - type: INTEGER
                      name: rf_rate
                      value: '10'
                    - type: INTEGER
                      name: show_column_header
                      value: '0'
      valuemaps:
        - uuid: b515085461664df1923e94cae6a7ab77
          name: 'Proxmox cluster quorum status'
          mappings:
            - value: '2'
              newvalue: 'Standalone node'
            - value: '1'
              newvalue: 'Quorum achieved'
            - value: '0'
              newvalue: 'No quorum'
        - uuid: 1ca4a765eea54e75b01fc177fce95512
          name: 'Proxmox LXC/QEMU status'
          mappings:
            - value: '2'
              newvalue: Running
            - value: '1'
              newvalue: Stopped
            - value: '0'
              newvalue: Unknown
        - uuid: ff43ebc253fa4f019b211fd8857f4181
          name: 'Proxmox node apt updates'
          mappings:
            - value: '0'
              newvalue: 'Up to date'
            - type: GREATER_OR_EQUAL
              value: '1'
              newvalue: 'Updates available'
        - uuid: f0ebac5571684a76aac529e5e74d5190
          name: 'Proxmox node disk SMART status'
          mappings:
            - value: '1'
              newvalue: Healthy
            - value: '0'
              newvalue: Unhealthy
        - uuid: 0b27ca9a1c4247aeb09c123106e25ce9
          name: 'Proxmox node PCI/USB devices'
          mappings:
            - value: '0'
              newvalue: 'No devices'
        - uuid: 9c307d5f81a240f0bce71fe450a1df7d
          name: 'Proxmox node status'
          mappings:
            - value: '10'
              newvalue: Online
            - value: '5'
              newvalue: Unknown
            - value: '1'
              newvalue: Offline
            - value: '0'
              newvalue: Undefined
        - uuid: 6dbee068fa6c4907b57667ee1525942c
          name: 'Proxmox QEMU agent status'
          mappings:
            - value: '1'
              newvalue: Enabled
            - value: '0'
              newvalue: Disabled
            - value: '3'
              newvalue: Unknown
        - uuid: 2c3f8b0e4a1f4b5c9a8b7c6d5e4f3a2b
          name: 'Proxmox subscription level'
          mappings:
            - newvalue: 'No subscription'
        - uuid: fdd273eea4ed40d0bec2bb5a620b38ac
          name: 'Proxmox user enabled status'
          mappings:
            - value: '1'
              newvalue: Enabled
            - value: '0'
              newvalue: Disabled
        - uuid: 37951abd4a04421994cfe25c66733d30
          name: 'Proxmox user expire date'
          mappings:
            - value: '-1'
              newvalue: Never
            - value: '0'
              newvalue: Expired
            - type: IN_RANGE
              value: 1-604800
              newvalue: 'Less than 7 days'
            - type: IN_RANGE
              value: 604801-2592000
              newvalue: 'Less than 30 days'
    - uuid: 56079badd056419383cc26e6a4fcc7e0
      template: VMware
      name: VMware
      description: |
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/.
        
        Note: To enable discovery of hardware sensors of VMware Hypervisors, set the macro '{$VMWARE.HV.SENSOR.DISCOVERY}' to the value 'true' on the discovered host level.
        
        Note: To create custom performance counter see documentation: https://www.zabbix.com/documentation/8.0/manual/vm_monitoring/vmware_keys#footnotes.
        
        Note: To get all supported counters and generate path for custom performance counter see documentation: https://www.zabbix.com/documentation/8.0/manual/appendix/items/perf_counters.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template set is designed for the effortless deployment of VMware vCenter and ESX hypervisor monitoring and doesn't require any external scripts.
        
        - The template "VMware Guest" is used in discovery and normally should not be manually linked to a host.
        - The template "VMware Hypervisor" can be used in discovery as well as manually linked to a host.
        
        For additional information, please see [Zabbix documentation on VM monitoring](https://www.zabbix.com/documentation/8.0/manual/vm_monitoring).
        
        ## Setup
        
        1. Compile Zabbix server with the required options (`--with-libxml2` and `--with-libcurl`).
        2. Set the `StartVMwareCollectors` option in the Zabbix server configuration file to "1" or more.
        3. Create a new host.
        4. If you want to use a separate user for monitoring, make sure that the user is a member of the `SystemConfiguration.ReadOnly` and `vStatsGroup` groups.
        Set the host wizard configuration fields required for VMware authentication: `VMware URL`, `VMware username` and `VMware password`.
        5. Link the template to the host created earlier.
        
        Note: To enable discovery of hardware sensors of VMware hypervisors, set the host wizard configuration field `Monitoring of hardware sensors` to the selected state.
        
        Additional resources:
        - How to [create a custom performance counter](https://www.zabbix.com/documentation/8.0/manual/vm_monitoring/vmware_keys#footnotes).
        - How to get all supported counters and [generate a path for the custom performance counter](https://www.zabbix.com/documentation/8.0/manual/appendix/items/perf_counters).
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: Templates/Applications
      items:
        - uuid: 5a0c711cae454f0e92a492dd1718101f
          name: 'Get alarms'
          type: SIMPLE
          key: 'vmware.alarms.get[{$VMWARE.URL}]'
          history: '0'
          value_type: TEXT
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Get alarm status.'
          tags:
            - tag: component
              value: raw
        - uuid: 5ce209f4d94f460488a74a92a52d92b1
          name: 'Event log'
          type: SIMPLE
          key: 'vmware.eventlog[{$VMWARE.URL},skip]'
          value_type: LOG
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Collect VMware event log. See also: https://www.zabbix.com/documentation/8.0/manual/config/items/preprocessing/examples#filtering_vmware_event_log_records'
          tags:
            - tag: component
              value: log
        - uuid: ee2edadb8ce943ef81d25dbbba8667a4
          name: 'Full name'
          type: SIMPLE
          key: 'vmware.fullname[{$VMWARE.URL}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware service full name.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
        - uuid: 91756015645746e68b3f85b4cd1b5abd
          name: 'Overall Health VC State error check'
          type: DEPENDENT
          key: vmware.health.check
          value_type: CHAR
          description: 'Data collection error check.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: vmware.health.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: a11ed3829afb48fb99b9feb2dab4a45d
              expression: length(last(/VMware/vmware.health.check))>0
              name: 'VMware: Failed to get Overall Health VC State'
              opdata: 'Current error: {ITEM.LASTVALUE}'
              priority: WARNING
              description: 'Failed to get data. Check debug log for more information.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 889333d3225147e1b1604119050a121f
          name: 'Get Overall Health VC State'
          type: SCRIPT
          key: vmware.health.get
          history: '0'
          value_type: TEXT
          params: |
            var Vcenter = {
            	 params: {},
            	 vmware_api_session_id: '',
            	 health_status: '',
            	 error_msg: '',
            
            	 setParams: function (params) {
            		  ['url', 'username', 'password'].forEach(function (field) {
            			  if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				  throw 'Required param is not set: ' + field + '.';
            			  }
            		  });
            
            		  if (params['url'].endsWith('/')) {
            			   params['url'] = params['url'].slice(0,-1);
            		  }
            		  params['url'] = params['url'].replace('/sdk','');
            
            		  Vcenter.params = params;
            	 },
            
            	 isGtOrEqVersion: function (first_version, second_version) {
            		  var first = first_version.split('.').map(Number),
            			  second = second_version.split('.').map(Number);
            
            		  if (first.length > second.length) {
            			  const max_componens_length = first.length
            		  }
            		  else {
            			  const max_componens_length = second.length
            		  }
            
            		  var num_components = first.length;
            		  while (num_components < max_componens_length) {
            			  first.push(0);
            			  num_components = num_components +1;
            		  }
            
            		  var num_components = second.length;
            		  while (num_components < max_componens_length) {
            			  second.push(0);
            			  num_components = num_components +1;
            		  }
            
            		  if (first[0] > second[0] ||
            			  (first[0] === second[0] && first[1] > second[1]) ||
            			  (first[0] === second[0] && first[1] === second[1] && first[2] >= second[2])) {
            			  return true;
            		  }
            
            		  return false;
            	  },
            
            	 login: function () {
            		  var response, request = new HttpRequest();
            		  request.setHttpAuth(HTTPAUTH_BASIC, Vcenter.params.username, Vcenter.params.password);
            		  request.addHeader('Accept: application/json');
            		  request.addHeader('Content-Type: application/json');
            
            		  response = request.post(Vcenter.params.url + '/api/session', '');
            		  if (request.getStatus() >= 200 && request.getStatus() < 300 && (!JSON.parse(response).error)) {
            			   Vcenter.vmware_api_session_id = Vcenter.removeQuotes(response);
            			   return true;
            		  }
            
            		  response = request.post(Vcenter.params.url + '/rest/com/vmware/cis/session', '');
            		  if (request.getStatus() >= 200 && request.getStatus() < 300) {
            			   Vcenter.vmware_api_session_id = JSON.parse(response).value;
            			   return true;
            		  }
            
            		  return false;
            	 },
            
            	 logout: function () {
            		  path = '/rest/com/vmware/cis/session';
            		  if (Vcenter.vmware_api_version && Vcenter.isGtOrEqVersion(Vcenter.vmware_api_version, '7.0.2')) {
            			   path = '/api/session';
            		  }
            
            		  Vcenter.request(Vcenter.params.url + path, 'delete');
            	 },
            
            	 get_version: function () {
            		  path = '/rest/appliance/system/version';
            
            		  try {
            			   Vcenter.vmware_api_version = Vcenter.request(Vcenter.params.url + path, 'get').version;
            			   return true;
            		  }
            		  catch (error) {
            			   return false;
            		  }
            	 },
            
            	 removeQuotes: function (str){
            		  if (str.startsWith('"') && str.endsWith('"')) {
            			  return str.slice(1, -1);
            		  }
            
            		  return str;
            	 },
            
            	 getHealthStatus: function () {
            		  path = '/api/appliance/health/system';
            		  if (!Vcenter.isGtOrEqVersion(Vcenter.vmware_api_version, '7.0.2')) {
            			   path = '/rest/appliance/health/system';
            		  }
            
            		  result = Vcenter.removeQuotes(Vcenter.request(Vcenter.params.url + path, 'get'));
            
            		  const idx = [
            			   'green',
            			   'yellow',
            			   'orange',
            			   'red',
            			   'gray'
            			   ].indexOf(result.toLowerCase());
            		  Vcenter.health_status = idx !== -1 ? idx : 5;
            	 },
            
            	 request: function (url, method) {
            		  var response, request = new HttpRequest();
            
            		  if (typeof Vcenter.params.proxy !== 'undefined' && Vcenter.params.proxy !== '') {
            			   request.setProxy(Vcenter.params.proxy);
            		  }
            
            		  request.setHttpAuth(HTTPAUTH_NONE);
            		  request.addHeader("Cookie: vmware-api-session-id=" + Vcenter.vmware_api_session_id);
            
            		  Zabbix.log(4, '[ VMware vCenter ] Sending request: ' + url);
            
            		  switch (method) {
            			   case 'get':
            				   response = request.get(url);
            				   break;
            
            			   case 'post':
            				   response = request.post(url);
            				   break;
            
            			   case 'delete':
            					response = request.delete(url);
            					break;
            
            			   default:
            				   throw 'Unsupported HTTP request method: ' + method;
            		  }
            
            		  Zabbix.log(4, '[ VMware vCenter ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		  if (request.getStatus() < 200 || request.getStatus() >= 300) {
            			   throw 'Cannot connect to VMware vCenter. Check debug log for more information.';
            		  }
            
            		  if (method !== 'delete' && JSON.parse(response).value) {
            			   return JSON.parse(response).value;
            		  }
            		  else {
            			   return response;
            		  }
            	 }
            };
            
            try {
            	 Vcenter.setParams(JSON.parse(value));
            	 
            	 if (Vcenter.login() && Vcenter.get_version() && Vcenter.isGtOrEqVersion(Vcenter.vmware_api_version, '6.5.0')) {
            		  Vcenter.getHealthStatus();
            	 }
            	 else {
            		  Vcenter.health_status = 6;
            	 }
            
            	 if (Vcenter.vmware_api_session_id) {
            		  Vcenter.logout();
            	 }
            }
            catch (error) {
            	 Zabbix.log(3, '[ VMware vCenter ] ERROR: ' + error);
            	 Vcenter.error_msg = 'Failed to get data from API:' + error;
            }
            
            return JSON.stringify({'health': Vcenter.health_status, 'error': Vcenter.error_msg});
          description: 'Gets overall health of the system. This item works only with VMware vCenter versions above 6.5.'
          timeout: '10'
          parameters:
            - name: password
              value: '{$VMWARE.PASSWORD}'
            - name: proxy
              value: '{$VMWARE.PROXY}'
            - name: url
              value: '{$VMWARE.URL}'
            - name: username
              value: '{$VMWARE.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: 2d18e0c8b8284c1bafd4bd131dcb640d
          name: 'Overall Health VC State'
          type: DEPENDENT
          key: vmware.health.state
          description: |
            VMware Overall health of system. One of the following:
            - Gray: No health data is available for this service.
            - Green: Service is healthy.
            - Yellow: The service is in a healthy state, but experiencing some level of problems.
            - Orange: The service health is degraded. The service might have serious problems.
            - Red: The service is unavailable, not functioning properly, or will stop functioning soon.
            - Not available: The health status is unavailable (not supported on the vCenter or ESXi side).
          valuemap:
            name: 'VMware Overall Health VC State'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.health
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: vmware.health.get
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: 4058114acbc743e087f5b10e22c997d1
              expression: 'last(/VMware/vmware.health.state)>0 and last(/VMware/vmware.health.state)<>6'
              name: 'VMware: Overall Health VC State is not Green'
              opdata: 'Current Overall Health VC State: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'One or more components in the appliance might be in an unusable status and the appliance might soon become unresponsive.'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: a0ec9145f2234fbea79a28c57ebdb44d
          name: Version
          type: SIMPLE
          key: 'vmware.version[{$VMWARE.URL}]'
          delay: 1h
          value_type: CHAR
          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: a1f545a8acb5423884a3ef46b0aaa1c6
          name: 'VMware alarm discovery'
          type: DEPENDENT
          key: vmware.alarms.discovery
          lifetime: '0'
          description: 'Discovery of alarms.'
          item_prototypes:
            - uuid: b52727a894964058a5f0a9701e3f7edb
              name: '{#VMWARE.ALARMS.NAME}'
              type: DEPENDENT
              key: 'vmware.alarms.status["{#VMWARE.ALARMS.KEY}"]'
              value_type: CHAR
              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:
                    - 1h
              master_item:
                key: 'vmware.alarms.get[{$VMWARE.URL}]'
              tags:
                - tag: component
                  value: alarms
              trigger_prototypes:
                - uuid: ec5711e1881149ffbf67325f16b960a4
                  expression: 'last(/VMware/vmware.alarms.status["{#VMWARE.ALARMS.KEY}"])<>-1'
                  name: 'VMware: {#VMWARE.ALARMS.NAME}'
                  description: '{#VMWARE.ALARMS.DESC}'
                  tags:
                    - tag: scope
                      value: notice
          master_item:
            key: 'vmware.alarms.get[{$VMWARE.URL}]'
          lld_macro_paths:
            - 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
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Trigger priority red'
              step: '1'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: red
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: HIGH
            - name: 'Trigger priority yellow'
              step: '2'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: yellow
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: WARNING
            - name: 'Trigger priority green'
              step: '3'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: green
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: INFO
        - uuid: 16ffc933cce74cf28a6edf306aa99782
          name: 'VMware cluster discovery'
          type: SIMPLE
          key: 'vmware.cluster.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of clusters.'
          item_prototypes:
            - uuid: 46111f91dd564a459dbc1d396e2e6c76
              name: 'Status of [{#CLUSTER.NAME}] cluster'
              type: SIMPLE
              key: 'vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}]'
              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}'
                - tag: component
                  value: cluster
              trigger_prototypes:
                - uuid: 9f7bcea84eb54fe5b79481267e6db341
                  expression: 'last(/VMware/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=3'
                  name: 'VMware: The [{#CLUSTER.NAME}] status is Red'
                  priority: HIGH
                  description: 'A cluster enabled for DRS becomes invalid (red) when the tree is no longer internally consistent, that is, when resource constraints are not observed. See also: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-C7417CAA-BD38-41D0-9529-9E7A5898BB12.html'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: bf1e7838597241228506c5cfb7063950
                  expression: 'last(/VMware/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=2'
                  name: 'VMware: The [{#CLUSTER.NAME}] status is Yellow'
                  priority: AVERAGE
                  description: '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. See also: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-ED8240A0-FB54-4A31-BD3D-F23FE740F10C.html'
                  dependencies:
                    - name: 'VMware: The [{#CLUSTER.NAME}] status is Red'
                      expression: 'last(/VMware/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: 8fb6a45cbe074b0cb6df53758e2c6623
          name: 'VMware datastore discovery'
          type: SIMPLE
          key: 'vmware.datastore.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of VMware datastores.'
          item_prototypes:
            - uuid: 4b61838ba4c34e709b25081ae5b059b5
              name: 'Average read latency of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
              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: 54c2631edeb04ef39701ad3bf03be1af
              name: 'Average read IOPS of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
              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: 5355c401dc244bc588ccd18767577c93
              name: 'Free space on datastore [{#DATASTORE}] (percentage)'
              type: SIMPLE
              key: 'vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree]'
              delay: 5m
              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: 8783e6c0bb394763afecddfd49929a01
                  expression: 'last(/VMware/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree])<{$VMWARE.DATASTORE.SPACE.CRIT}'
                  name: 'VMware: [{#DATASTORE}]: Free space is critically low'
                  event_name: 'VMware: Datastore free space is critically low ([{#DATASTORE}] free space < {$VMWARE.DATASTORE.SPACE.CRIT}%)'
                  priority: HIGH
                  description: 'Datastore free space has fallen below the critical threshold.'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 201980a75d734a42b3fbe1b0d3c9f55c
                  expression: 'last(/VMware/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree])<{$VMWARE.DATASTORE.SPACE.WARN}'
                  name: 'VMware: [{#DATASTORE}]: Free space is low'
                  event_name: 'VMware: Datastore free space is low ([{#DATASTORE}] free space < {$VMWARE.DATASTORE.SPACE.WARN}%)'
                  priority: WARNING
                  description: 'Datastore free space has fallen below the warning threshold.'
                  dependencies:
                    - name: 'VMware: [{#DATASTORE}]: Free space is critically low'
                      expression: 'last(/VMware/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree])<{$VMWARE.DATASTORE.SPACE.CRIT}'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: 84f13c4fde2d4a17baaf0c8c1eb4f2c0
              name: 'Total size of datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID}]'
              delay: 5m
              units: B
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware datastore space in bytes.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
            - uuid: 540cd0fbc56c4b8ea19f2ff5839ce00d
              name: 'Average write latency of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
              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: 0026edd933404faf992d08628c9ab364
              name: 'Average write IOPS of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
              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
              operations:
                - operator: LIKE
                  value: Average
                  discover: NO_DISCOVER
        - uuid: a5bc075e89f248e7b411d8f960897a08
          name: 'VMware hypervisor discovery'
          type: SIMPLE
          key: 'vmware.hv.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of hypervisors.'
          host_prototypes:
            - uuid: 051a1469d4d045cbbf818fcc843a352e
              host: '{#HV.UUID}'
              name: '{#HV.NAME}'
              group_links:
                - group:
                    name: Applications
              group_prototypes:
                - name: '{#CLUSTER.NAME} (hypervisor)'
                - name: '{#DATACENTER.NAME}'
              templates:
                - name: 'VMware Hypervisor'
              macros:
                - macro: '{$VMWARE.HV.UUID}'
                  value: '{#HV.UUID}'
                  description: 'UUID of hypervisor.'
              custom_interfaces: 'YES'
              interfaces:
                - ip: '{#HV.IP}'
        - uuid: 9fd559f4e88c4677a1b874634dd686f5
          name: 'VMware VM discovery'
          type: SIMPLE
          key: 'vmware.vm.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#VM.POWERSTATE}'
                value: '{$VMWARE.VM.POWERSTATE}'
          description: 'Discovery of guest virtual machines.'
          host_prototypes:
            - uuid: 23b9ae9d6f33414880db1cb107115810
              host: '{#VM.UUID}'
              name: '{#VM.NAME}'
              group_links:
                - group:
                    name: Applications
              group_prototypes:
                - name: '{#CLUSTER.NAME} (vm)'
                - name: '{#DATACENTER.NAME}/{#VM.FOLDER} (vm)'
                - name: '{#HV.NAME}'
              templates:
                - name: 'VMware Guest'
              macros:
                - macro: '{$VMWARE.VM.UUID}'
                  value: '{#VM.UUID}'
                  description: 'UUID of guest virtual machine.'
              custom_interfaces: 'YES'
              interfaces:
                - ip: '{#VM.IP}'
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: virtualization
        - tag: target
          value: vmware
      macros:
        - macro: '{$VMWARE.DATASTORE.SPACE.CRIT}'
          value: '10'
          description: 'The critical threshold of the datastore free space.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Critical datastore free space threshold'
            description: 'Critical threshold of the datastore free space. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VMWARE.DATASTORE.SPACE.WARN}'
          value: '20'
          description: 'The warning threshold of the datastore free space.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Warning datastore free space threshold'
            description: 'Warning threshold of the datastore free space. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VMWARE.HV.SENSOR.DISCOVERY}'
          value: 'FALSE'
          description: 'Set "true"/"false" to enable or disable monitoring of hardware sensors.'
          config:
            type: CHECKBOX
            priority: '7'
            section_name: Filters
            label: 'Monitoring of hardware sensors'
            description: 'Whether it is necessary to monitor of hardware sensors.'
            options:
              - checked: 'true'
                unchecked: 'false'
        - macro: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of hardware sensor names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Include hardware sensors filter'
            description: 'Regex string to include hardware sensors by sensors name.'
        - 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.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Exclude hardware sensors filter'
            description: 'Regex string to exclude hardware sensors by sensors name.'
        - macro: '{$VMWARE.PASSWORD}'
          type: SECRET_TEXT
          description: 'VMware service `{$USERNAME}` user password.'
          config:
            type: TEXT
            priority: '3'
            label: 'VMware password'
            required: 'YES'
        - macro: '{$VMWARE.PROXY}'
          description: 'Sets the HTTP proxy for script items. If this parameter is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'HTTP proxy'
            description: 'HTTP proxy to use for requests.'
        - macro: '{$VMWARE.URL}'
          description: 'VMware service (vCenter or ESX hypervisor) SDK URL (https://servername/sdk).'
          config:
            type: TEXT
            priority: '1'
            label: 'VMware URL'
            description: 'URL for vCenter or ESX hypervisor (https://servername/sdk).'
            required: 'YES'
        - macro: '{$VMWARE.USERNAME}'
          description: 'VMware service user name.'
          config:
            type: TEXT
            priority: '2'
            label: 'VMware username'
            required: 'YES'
        - macro: '{$VMWARE.VM.POWERSTATE}'
          value: poweredOn|poweredOff|suspended
          description: 'Possibility to filter out VMs by power state.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'VMs power state filter'
            description: 'Regex string with desired power state of VMs for discovering.'
      dashboards:
        - uuid: 00e64ad19fff4dc9af2ab2c0c1ccc290
          name: Overview
          pages:
            - name: 'VMware: Overview'
              widgets:
                - type: honeycomb
                  name: 'Overall status'
                  width: '15'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Overall Health VC State'
                    - type: STRING
                      name: primary_label
                      value: 'Overall status'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: STRING
                      name: thresholds.0.color
                      value: 80FF00
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFFF00
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: FFBF00
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.3.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '3'
                    - type: STRING
                      name: thresholds.4.color
                      value: D2D2D2
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '4'
                    - type: STRING
                      name: thresholds.5.color
                      value: D2D2D2
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '5'
                    - type: STRING
                      name: thresholds.6.color
                      value: 90A4AE
                    - type: STRING
                      name: thresholds.6.threshold
                      value: '6'
                - type: honeycomb
                  name: 'Total size of datastore'
                  'y': '4'
                  width: '36'
                  height: '8'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 81D4FA
                    - type: STRING
                      name: items.0
                      value: 'Total size of datastore*'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("datastore.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: item
                  name: 'Full name'
                  x: '15'
                  width: '57'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: VMware
                        key: 'vmware.fullname[{$VMWARE.URL}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: Version
                  x: '15'
                  'y': '2'
                  width: '57'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: VMware
                        key: 'vmware.version[{$VMWARE.URL}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: honeycomb
                  name: 'Free space on datastore'
                  x: '36'
                  'y': '4'
                  width: '36'
                  height: '8'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Free space on datastore*'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("datastore.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAC
                    - type: STRING
                      name: thresholds.0.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '10'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '20'
                    - type: STRING
                      name: thresholds.2.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '30'
            - name: 'VMware: Datastore'
              widgets:
                - type: graphprototype
                  name: 'Average read IOps of the datastore'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: VMware
                        key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average read latency of the datastore'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: VMware
                        key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
                    - type: STRING
                      name: reference
                      value: AAAAE
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average write IOps of the datastore'
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: VMware
                        key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
                    - type: STRING
                      name: reference
                      value: AAAAF
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average write latency of the datastore'
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: VMware
                        key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
                    - type: STRING
                      name: reference
                      value: AAAAG
                    - type: INTEGER
                      name: source_type
                      value: '3'
      valuemaps:
        - uuid: 7e24ccef9d754cb4805df5b1f27f4ef4
          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: 3c59c22905054d42ac4ee8b72fe5f270
          name: 'VMware status'
          mappings:
            - value: '0'
              newvalue: Gray
            - value: '1'
              newvalue: Green
            - value: '2'
              newvalue: Yellow
            - value: '3'
              newvalue: Red
    - uuid: ca02e82e6c414d0aa7aedc8d78468a49
      template: 'VMware FQDN'
      name: 'VMware FQDN'
      description: |
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/.
        
        Note: To enable discovery of hardware sensors of VMware Hypervisors, set the macro '{$VMWARE.HV.SENSOR.DISCOVERY}' to the value 'true' on the discovered host level.
        
        Note: To create custom performance counter see documentation: https://www.zabbix.com/documentation/8.0/manual/vm_monitoring/vmware_keys#footnotes.
        
        Note: To get all supported counters and generate path for custom performance counter see documentation: https://www.zabbix.com/documentation/8.0/manual/appendix/items/perf_counters.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template set is designed for the effortless deployment of VMware vCenter and ESX hypervisor monitoring and doesn't require any external scripts.
        
        - The template "VMware Guest" is used in discovery and normally should not be manually linked to a host.
        - The template "VMware Hypervisor" can be used in discovery as well as manually linked to a host.
        
        For additional information, please see [Zabbix documentation on VM monitoring](https://www.zabbix.com/documentation/8.0/manual/vm_monitoring).
        
        ## Setup
        
        1. Compile Zabbix server with the required options (`--with-libxml2` and `--with-libcurl`).
        2. Set the `StartVMwareCollectors` option in the Zabbix server configuration file to "1" or more.
        3. Create a new host.
        4. If you want to use a separate user for monitoring, make sure that the user is a member of the `SystemConfiguration.ReadOnly` and `vStatsGroup` groups.
        Set the host wizard configuration fields required for VMware authentication: `VMware URL`, `VMware username` and `VMware password`.
        5. Link the template to the host created earlier.
        
        Note: To enable discovery of hardware sensors of VMware hypervisors, set the host wizard configuration field `Monitoring of hardware sensors` to the selected state.
        
        Additional resources:
        - How to [create a custom performance counter](https://www.zabbix.com/documentation/8.0/manual/vm_monitoring/vmware_keys#footnotes).
        - How to get all supported counters and [generate a path for the custom performance counter](https://www.zabbix.com/documentation/8.0/manual/appendix/items/perf_counters).
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: Templates/Applications
      items:
        - uuid: b9e3684632314721aed3119df6a06976
          name: 'Get alarms'
          type: SIMPLE
          key: 'vmware.alarms.get[{$VMWARE.URL}]'
          history: '0'
          value_type: TEXT
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Get alarm status.'
          tags:
            - tag: component
              value: raw
        - uuid: 64b8a28c1a904540930ebfec5af04872
          name: 'Event log'
          type: SIMPLE
          key: 'vmware.eventlog[{$VMWARE.URL},skip]'
          value_type: LOG
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Collect VMware event log. See also: https://www.zabbix.com/documentation/8.0/manual/config/items/preprocessing/examples#filtering_vmware_event_log_records'
          tags:
            - tag: component
              value: log
        - uuid: ebb8417eceb541b1b51909c745642f05
          name: 'Full name'
          type: SIMPLE
          key: 'vmware.fullname[{$VMWARE.URL}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware service full name.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
        - uuid: 7d326d9241ae4d2ebd768b56d3826c4f
          name: 'Overall Health VC State error check'
          type: DEPENDENT
          key: vmware.health.check
          value_type: CHAR
          description: 'Data collection error check.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: vmware.health.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 7fe1b44b0e7549d8af9030a1c58b2aa3
              expression: 'length(last(/VMware FQDN/vmware.health.check))>0'
              name: 'VMware FQDN: Failed to get Overall Health VC State'
              opdata: 'Current error: {ITEM.LASTVALUE}'
              priority: WARNING
              description: 'Failed to get data. Check debug log for more information.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 7445c01436234092ad5d093d872b0682
          name: 'Get Overall Health VC State'
          type: SCRIPT
          key: vmware.health.get
          history: '0'
          value_type: TEXT
          params: |
            var Vcenter = {
            	 params: {},
            	 vmware_api_session_id: '',
            	 health_status: '',
            	 error_msg: '',
            
            	 setParams: function (params) {
            		  ['url', 'username', 'password'].forEach(function (field) {
            			  if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				  throw 'Required param is not set: ' + field + '.';
            			  }
            		  });
            
            		  if (params['url'].endsWith('/')) {
            			   params['url'] = params['url'].slice(0,-1);
            		  }
            		  params['url'] = params['url'].replace('/sdk','');
            
            		  Vcenter.params = params;
            	 },
            
            	 isGtOrEqVersion: function (first_version, second_version) {
            		  var first = first_version.split('.').map(Number),
            			  second = second_version.split('.').map(Number);
            
            		  if (first.length > second.length) {
            			  const max_componens_length = first.length
            		  }
            		  else {
            			  const max_componens_length = second.length
            		  }
            
            		  var num_components = first.length;
            		  while (num_components < max_componens_length) {
            			  first.push(0);
            			  num_components = num_components +1;
            		  }
            
            		  var num_components = second.length;
            		  while (num_components < max_componens_length) {
            			  second.push(0);
            			  num_components = num_components +1;
            		  }
            
            		  if (first[0] > second[0] ||
            			  (first[0] === second[0] && first[1] > second[1]) ||
            			  (first[0] === second[0] && first[1] === second[1] && first[2] >= second[2])) {
            			  return true;
            		  }
            
            		  return false;
            	  },
            
            	 login: function () {
            		  var response, request = new HttpRequest();
            		  request.setHttpAuth(HTTPAUTH_BASIC, Vcenter.params.username, Vcenter.params.password);
            		  request.addHeader('Accept: application/json');
            		  request.addHeader('Content-Type: application/json');
            
            		  response = request.post(Vcenter.params.url + '/api/session', '');
            		  if (request.getStatus() >= 200 && request.getStatus() < 300 && (!JSON.parse(response).error)) {
            			   Vcenter.vmware_api_session_id = Vcenter.removeQuotes(response);
            			   return true;
            		  }
            
            		  response = request.post(Vcenter.params.url + '/rest/com/vmware/cis/session', '');
            		  if (request.getStatus() >= 200 && request.getStatus() < 300) {
            			   Vcenter.vmware_api_session_id = JSON.parse(response).value;
            			   return true;
            		  }
            
            		  return false;
            	 },
            
            	 logout: function () {
            		  path = '/rest/com/vmware/cis/session';
            		  if (Vcenter.vmware_api_version && Vcenter.isGtOrEqVersion(Vcenter.vmware_api_version, '7.0.2')) {
            			   path = '/api/session';
            		  }
            
            		  Vcenter.request(Vcenter.params.url + path, 'delete');
            	 },
            
            	 get_version: function () {
            		  path = '/rest/appliance/system/version';
            
            		  try {
            			   Vcenter.vmware_api_version = Vcenter.request(Vcenter.params.url + path, 'get').version;
            			   return true;
            		  }
            		  catch (error) {
            			   return false;
            		  }
            	 },
            
            	 removeQuotes: function (str){
            		  if (str.startsWith('"') && str.endsWith('"')) {
            			  return str.slice(1, -1);
            		  }
            
            		  return str;
            	 },
            
            	 getHealthStatus: function () {
            		  path = '/api/appliance/health/system';
            		  if (!Vcenter.isGtOrEqVersion(Vcenter.vmware_api_version, '7.0.2')) {
            			   path = '/rest/appliance/health/system';
            		  }
            
            		  result = Vcenter.removeQuotes(Vcenter.request(Vcenter.params.url + path, 'get'));
            
            		  const idx = [
            			   'green',
            			   'yellow',
            			   'orange',
            			   'red',
            			   'gray'
            			   ].indexOf(result.toLowerCase());
            		  Vcenter.health_status = idx !== -1 ? idx : 5;
            	 },
            
            	 request: function (url, method) {
            		  var response, request = new HttpRequest();
            
            		  if (typeof Vcenter.params.proxy !== 'undefined' && Vcenter.params.proxy !== '') {
            			   request.setProxy(Vcenter.params.proxy);
            		  }
            
            		  request.setHttpAuth(HTTPAUTH_NONE);
            		  request.addHeader("Cookie: vmware-api-session-id=" + Vcenter.vmware_api_session_id);
            
            		  Zabbix.log(4, '[ VMware vCenter ] Sending request: ' + url);
            
            		  switch (method) {
            			   case 'get':
            				   response = request.get(url);
            				   break;
            
            			   case 'post':
            				   response = request.post(url);
            				   break;
            
            			   case 'delete':
            					response = request.delete(url);
            					break;
            
            			   default:
            				   throw 'Unsupported HTTP request method: ' + method;
            		  }
            
            		  Zabbix.log(4, '[ VMware vCenter ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		  if (request.getStatus() < 200 || request.getStatus() >= 300) {
            			   throw 'Cannot connect to VMware vCenter. Check debug log for more information.';
            		  }
            
            		  if (method !== 'delete' && JSON.parse(response).value) {
            			   return JSON.parse(response).value;
            		  }
            		  else {
            			   return response;
            		  }
            	 }
            };
            
            try {
            	 Vcenter.setParams(JSON.parse(value));
            	 
            	 if (Vcenter.login() && Vcenter.get_version() && Vcenter.isGtOrEqVersion(Vcenter.vmware_api_version, '6.5.0')) {
            		  Vcenter.getHealthStatus();
            	 }
            	 else {
            		  Vcenter.health_status = 6;
            	 }
            
            	 if (Vcenter.vmware_api_session_id) {
            		  Vcenter.logout();
            	 }
            }
            catch (error) {
            	 Zabbix.log(3, '[ VMware vCenter ] ERROR: ' + error);
            	 Vcenter.error_msg = 'Failed to get data from API:' + error;
            }
            
            return JSON.stringify({'health': Vcenter.health_status, 'error': Vcenter.error_msg});
          description: 'Gets overall health of the system. This item works only with VMware vCenter versions above 6.5.'
          timeout: '10'
          parameters:
            - name: password
              value: '{$VMWARE.PASSWORD}'
            - name: proxy
              value: '{$VMWARE.PROXY}'
            - name: url
              value: '{$VMWARE.URL}'
            - name: username
              value: '{$VMWARE.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: 5007e23b563f4d9fb47de91d349a563a
          name: 'Overall Health VC State'
          type: DEPENDENT
          key: vmware.health.state
          description: |
            VMware Overall health of system. One of the following:
            - Gray: No health data is available for this service.
            - Green: Service is healthy.
            - Yellow: The service is in a healthy state, but experiencing some level of problems.
            - Orange: The service health is degraded. The service might have serious problems.
            - Red: The service is unavailable, not functioning properly, or will stop functioning soon.
            - Not available: The health status is unavailable (not supported on the vCenter or ESXi side).
          valuemap:
            name: 'VMware Overall Health VC State'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.health
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: vmware.health.get
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: 426ea642132848b8b77d42d2235c244c
              expression: 'last(/VMware FQDN/vmware.health.state)>0 and last(/VMware FQDN/vmware.health.state)<>6'
              name: 'VMware FQDN: Overall Health VC State is not Green'
              opdata: 'Current Overall Health VC State: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'One or more components in the appliance might be in an unusable status and the appliance might soon become unresponsive.'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: edfdedd78e9c4c299a1555bd13b2f677
          name: Version
          type: SIMPLE
          key: 'vmware.version[{$VMWARE.URL}]'
          delay: 1h
          value_type: CHAR
          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: e108f082ec8a4283a5650fdcff4cacad
          name: 'VMware alarm discovery'
          type: DEPENDENT
          key: vmware.alarms.discovery
          lifetime: '0'
          description: 'Discovery of alarms.'
          item_prototypes:
            - uuid: 8e08a252b7344e10850bd177045e9a55
              name: '{#VMWARE.ALARMS.NAME}'
              type: DEPENDENT
              key: 'vmware.alarms.status["{#VMWARE.ALARMS.KEY}"]'
              value_type: CHAR
              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:
                    - 1h
              master_item:
                key: 'vmware.alarms.get[{$VMWARE.URL}]'
              tags:
                - tag: component
                  value: alarms
              trigger_prototypes:
                - uuid: 156400a8c7c04b25b99c540824168a36
                  expression: 'last(/VMware FQDN/vmware.alarms.status["{#VMWARE.ALARMS.KEY}"])<>-1'
                  name: 'VMware FQDN: {#VMWARE.ALARMS.NAME}'
                  description: '{#VMWARE.ALARMS.DESC}'
                  tags:
                    - tag: scope
                      value: notice
          master_item:
            key: 'vmware.alarms.get[{$VMWARE.URL}]'
          lld_macro_paths:
            - 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
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Trigger priority red'
              step: '1'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: red
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: HIGH
            - name: 'Trigger priority yellow'
              step: '2'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: yellow
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: WARNING
            - name: 'Trigger priority green'
              step: '3'
              filter:
                conditions:
                  - macro: '{#VMWARE.ALARMS.STATUS}'
                    value: green
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: 'VMware: *'
                  severity: INFO
        - uuid: dc0a844c06f7456b8643f9f9672e6b8e
          name: 'VMware cluster discovery'
          type: SIMPLE
          key: 'vmware.cluster.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of clusters.'
          item_prototypes:
            - uuid: 41fbb29592f9495e92d88240ce2ba7a5
              name: 'Status of [{#CLUSTER.NAME}] cluster'
              type: SIMPLE
              key: 'vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}]'
              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}'
                - tag: component
                  value: cluster
              trigger_prototypes:
                - uuid: 962adf853de24f589e34df7ddd560885
                  expression: 'last(/VMware FQDN/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=3'
                  name: 'VMware FQDN: The [{#CLUSTER.NAME}] status is Red'
                  priority: HIGH
                  description: 'A cluster enabled for DRS becomes invalid (red) when the tree is no longer internally consistent, that is, when resource constraints are not observed. See also: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-C7417CAA-BD38-41D0-9529-9E7A5898BB12.html'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 44d12ca67931452194d1e1071136015d
                  expression: 'last(/VMware FQDN/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=2'
                  name: 'VMware FQDN: The [{#CLUSTER.NAME}] status is Yellow'
                  priority: AVERAGE
                  description: '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. See also: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-ED8240A0-FB54-4A31-BD3D-F23FE740F10C.html'
                  dependencies:
                    - name: 'VMware FQDN: The [{#CLUSTER.NAME}] status is Red'
                      expression: 'last(/VMware FQDN/vmware.cluster.status[{$VMWARE.URL},{#CLUSTER.NAME}])=3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: 3cd02594ee644dbe88bdfc4f4257ae05
          name: 'VMware datastore discovery'
          type: SIMPLE
          key: 'vmware.datastore.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of VMware datastores.'
          item_prototypes:
            - uuid: 0ed09f26cbad4d96bea297da4215d73b
              name: 'Average read latency of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
              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: c2687322c7914ec3b5519b73f1723aeb
              name: 'Average read IOPS of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
              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: a2b1785fc773404e9ce69bcd868c5b88
              name: 'Free space on datastore [{#DATASTORE}] (percentage)'
              type: SIMPLE
              key: 'vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree]'
              delay: 5m
              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: 8eaaf5e25c464162acf2c93c2fab4606
                  expression: 'last(/VMware FQDN/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree])<{$VMWARE.DATASTORE.SPACE.CRIT}'
                  name: 'VMware FQDN: [{#DATASTORE}]: Free space is critically low'
                  event_name: 'VMware FQDN: Datastore free space is critically low ([{#DATASTORE}] free space < {$VMWARE.DATASTORE.SPACE.CRIT}%)'
                  priority: HIGH
                  description: 'Datastore free space has fallen below the critical threshold.'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 574963524fda419baae5d07c32f2fb89
                  expression: 'last(/VMware FQDN/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree])<{$VMWARE.DATASTORE.SPACE.WARN}'
                  name: 'VMware FQDN: [{#DATASTORE}]: Free space is low'
                  event_name: 'VMware FQDN: Datastore free space is low ([{#DATASTORE}] free space < {$VMWARE.DATASTORE.SPACE.WARN}%)'
                  priority: WARNING
                  description: 'Datastore free space has fallen below the warning threshold.'
                  dependencies:
                    - name: 'VMware FQDN: [{#DATASTORE}]: Free space is critically low'
                      expression: 'last(/VMware FQDN/vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID},pfree])<{$VMWARE.DATASTORE.SPACE.CRIT}'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: 78fb4b4b0eec44a99207f8354773269d
              name: 'Total size of datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.size[{$VMWARE.URL},{#DATASTORE.UUID}]'
              delay: 5m
              units: B
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware datastore space in bytes.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
            - uuid: d9570c0822cc4996a7dda1ddb9426404
              name: 'Average write latency of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
              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: a72c4a6247be4f968c1740de556732bd
              name: 'Average write IOPS of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
              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
              operations:
                - operator: LIKE
                  value: Average
                  discover: NO_DISCOVER
        - uuid: 988bb85b325449b29780eeda15c73620
          name: 'VMware hypervisor discovery'
          type: SIMPLE
          key: 'vmware.hv.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of hypervisors.'
          host_prototypes:
            - uuid: 51cf7ea3e6a74f7e8dde628dbc5347a3
              host: '{#HV.UUID}'
              name: '{#HV.NAME}'
              group_links:
                - group:
                    name: Applications
              group_prototypes:
                - name: '{#CLUSTER.NAME} (hypervisor)'
                - name: '{#DATACENTER.NAME}'
              templates:
                - name: 'VMware Hypervisor'
              macros:
                - macro: '{$VMWARE.HV.UUID}'
                  value: '{#HV.UUID}'
                  description: 'UUID of hypervisor.'
              custom_interfaces: 'YES'
              interfaces:
                - ip: '{#HV.IP}'
        - uuid: a7e2f6830442433cbe515e8bd72ee0b8
          name: 'VMware VM FQDN discovery'
          type: SIMPLE
          key: 'vmware.vm.discovery[{$VMWARE.URL}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#VM.DNS}'
                value: ^$
                operator: NOT_MATCHES_REGEX
              - macro: '{#VM.POWERSTATE}'
                value: '{$VMWARE.VM.POWERSTATE}'
          description: 'Discovery of guest virtual machines.'
          host_prototypes:
            - uuid: a12e25c500a14fcf99295c207371ca1b
              host: '{#VM.DNS}'
              name: '{#VM.NAME}'
              group_links:
                - group:
                    name: Applications
              group_prototypes:
                - name: '{#CLUSTER.NAME} (vm)'
                - name: '{#DATACENTER.NAME}/{#VM.FOLDER} (vm)'
                - name: '{#HV.NAME}'
              templates:
                - name: 'VMware Guest'
              macros:
                - macro: '{$VMWARE.VM.UUID}'
                  value: '{#VM.UUID}'
                  description: 'UUID of guest virtual machine.'
              custom_interfaces: 'YES'
              interfaces:
                - ip: '{#VM.IP}'
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: virtualization
        - tag: target
          value: vmware
        - tag: target
          value: vmware-fqdn
      macros:
        - macro: '{$VMWARE.DATASTORE.SPACE.CRIT}'
          value: '10'
          description: 'The critical threshold of the datastore free space.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Critical datastore free space threshold'
            description: 'Critical threshold of the datastore free space. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VMWARE.DATASTORE.SPACE.WARN}'
          value: '20'
          description: 'The warning threshold of the datastore free space.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Warning datastore free space threshold'
            description: 'Warning threshold of the datastore free space. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VMWARE.HV.SENSOR.DISCOVERY}'
          value: 'FALSE'
          description: 'Set "true"/"false" to enable or disable monitoring of hardware sensors.'
          config:
            type: CHECKBOX
            priority: '7'
            section_name: Filters
            label: 'Monitoring of hardware sensors'
            description: 'Whether it is necessary to monitor of hardware sensors.'
            options:
              - checked: 'true'
                unchecked: 'false'
        - macro: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of hardware sensor names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Include hardware sensors filter'
            description: 'Regex string to include hardware sensors by sensors name.'
        - 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.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Exclude hardware sensors filter'
            description: 'Regex string to exclude hardware sensors by sensors name.'
        - macro: '{$VMWARE.PASSWORD}'
          type: SECRET_TEXT
          description: 'VMware service `{$USERNAME}` user password.'
          config:
            type: TEXT
            priority: '3'
            label: 'VMware password'
            required: 'YES'
        - macro: '{$VMWARE.PROXY}'
          description: 'Sets the HTTP proxy for script items. If this parameter is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'HTTP proxy'
            description: 'HTTP proxy to use for requests.'
        - macro: '{$VMWARE.URL}'
          description: 'VMware service (vCenter or ESX hypervisor) SDK URL (https://servername/sdk).'
          config:
            type: TEXT
            priority: '1'
            label: 'VMware URL'
            description: 'URL for vCenter or ESX hypervisor (https://servername/sdk).'
            required: 'YES'
        - macro: '{$VMWARE.USERNAME}'
          description: 'VMware service user name.'
          config:
            type: TEXT
            priority: '2'
            label: 'VMware username'
            required: 'YES'
        - macro: '{$VMWARE.VM.POWERSTATE}'
          value: poweredOn|poweredOff|suspended
          description: 'Possibility to filter out VMs by power state.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'VMs power state filter'
            description: 'Regex string with desired power state of VMs for discovering.'
      dashboards:
        - uuid: 90bc032e4b384e4891f6067267343abc
          name: Overview
          pages:
            - name: 'VMware: Overview'
              widgets:
                - type: honeycomb
                  name: 'Overall status'
                  width: '15'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Overall Health VC State'
                    - type: STRING
                      name: primary_label
                      value: 'Overall status'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: STRING
                      name: thresholds.0.color
                      value: 80FF00
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFFF00
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: FFBF00
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.3.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '3'
                    - type: STRING
                      name: thresholds.4.color
                      value: D2D2D2
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '4'
                    - type: STRING
                      name: thresholds.5.color
                      value: D2D2D2
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '5'
                    - type: STRING
                      name: thresholds.6.color
                      value: 90A4AE
                    - type: STRING
                      name: thresholds.6.threshold
                      value: '6'
                - type: honeycomb
                  name: 'Total size of datastore'
                  'y': '4'
                  width: '36'
                  height: '8'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 81D4FA
                    - type: STRING
                      name: items.0
                      value: 'Total size of datastore*'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("datastore.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: item
                  name: 'Full name'
                  x: '15'
                  width: '57'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware FQDN'
                        key: 'vmware.fullname[{$VMWARE.URL}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: Version
                  x: '15'
                  'y': '2'
                  width: '57'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware FQDN'
                        key: 'vmware.version[{$VMWARE.URL}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: honeycomb
                  name: 'Free space on datastore'
                  x: '36'
                  'y': '4'
                  width: '36'
                  height: '8'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Free space on datastore*'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("datastore.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAC
                    - type: STRING
                      name: thresholds.0.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '10'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '20'
                    - type: STRING
                      name: thresholds.2.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '30'
            - name: 'VMware: Datastore'
              widgets:
                - type: graphprototype
                  name: 'Average read IOps of the datastore'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware FQDN'
                        key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average read latency of the datastore'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware FQDN'
                        key: 'vmware.datastore.read[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
                    - type: STRING
                      name: reference
                      value: AAAAE
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average write IOps of the datastore'
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware FQDN'
                        key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},rps]'
                    - type: STRING
                      name: reference
                      value: AAAAF
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average write latency of the datastore'
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware FQDN'
                        key: 'vmware.datastore.write[{$VMWARE.URL},{#DATASTORE.UUID},latency]'
                    - type: STRING
                      name: reference
                      value: AAAAG
                    - type: INTEGER
                      name: source_type
                      value: '3'
      valuemaps:
        - uuid: 30aec8e3198e4b91b1182514be8a8f6b
          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: 5e5e3b01ef334bd39441568ebd0c31c0
          name: 'VMware status'
          mappings:
            - value: '0'
              newvalue: Gray
            - value: '1'
              newvalue: Green
            - value: '2'
              newvalue: Yellow
            - value: '3'
              newvalue: Red
    - uuid: 7942fb93ae3b47cf9ca0ea4beb0675ce
      template: 'VMware Guest'
      name: 'VMware Guest'
      description: |
        Note: To enable trigger for free space for guest VM, set macro '{$VMWARE.VM.FS.TRIGGER.USED}' to the value '1' on the discovered host level.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        This template is used in low-level discovery and will be auto-assigned to host prototypes. Additional configuration is not required.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: Templates/Applications
      items:
        - uuid: 061eed2d40d5427092b50172ea0a9c41
          name: 'Cluster name'
          type: SIMPLE
          key: 'vmware.vm.cluster.name[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Cluster name of the guest VM.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: cluster
        - uuid: 20332e3c1ea54266a02ad500bc9ec1ca
          name: 'Snapshot consolidation needed'
          type: SIMPLE
          key: 'vmware.vm.consolidationneeded[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: |
            Displays whether snapshot consolidation is needed or not. One of the following:
            - True;
            - False.
          valuemap:
            name: 'VMware Consolidation'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = [
                  	'true',
                  	'false'
                  ].indexOf(value);
                  return idx !== -1 ? idx : 2;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: storage
          triggers:
            - uuid: 28627af63fe64e79b08ad752dee5205e
              expression: 'last(/VMware Guest/vmware.vm.consolidationneeded[{$VMWARE.URL},{$VMWARE.VM.UUID}])=0'
              name: 'VMware Guest: Snapshot consolidation needed'
              priority: AVERAGE
              description: 'Snapshot consolidation needed.'
              manual_close: 'YES'
              dependencies:
                - name: 'VMware Guest: Hypervisor is in the maintenance mode'
                  expression: 'last(/VMware Guest/vmware.vm.hv.maintenance[{$VMWARE.URL},{$VMWARE.VM.UUID}])=1 and {$VMWARE.HYPERVISOR.MAINTENANCE}=1'
              tags:
                - tag: scope
                  value: availability
        - uuid: 31389342688f4b0696a49431923a528f
          name: 'CPU latency in percent'
          type: SIMPLE
          key: 'vmware.vm.cpu.latency[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          value_type: FLOAT
          units: '%'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Percentage of time the VM is unable to run because it is contending for access to the physical CPU(s).'
          tags:
            - tag: component
              value: cpu
        - uuid: bbfb146e74144160b2e47c0f2cdc6c20
          name: 'Number of virtual CPUs'
          type: SIMPLE
          key: 'vmware.vm.cpu.num[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Number of virtual CPUs assigned to the guest.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: cpu
        - uuid: f4d72109b7ee4e0bb65aab1de85b6b05
          name: 'CPU readiness latency in percent'
          type: SIMPLE
          key: 'vmware.vm.cpu.readiness[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          value_type: FLOAT
          units: '%'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Percentage of time that the virtual machine was ready, but was unable to get scheduled to run on the physical CPU.'
          tags:
            - tag: component
              value: cpu
        - uuid: ff0a31df94784cfbbf10deca55f76145
          name: 'CPU ready'
          type: SIMPLE
          key: 'vmware.vm.cpu.ready[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: ms
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Time that the VM was ready, but unable to get scheduled to run on the physical CPU during the last measurement interval (VMware vCenter/ESXi Server performance counter sampling interval - 20 seconds).'
          tags:
            - tag: component
              value: cpu
        - uuid: 50de05f27f33425cb207a3fdece7ecb1
          name: 'CPU swap-in latency in percent'
          type: SIMPLE
          key: 'vmware.vm.cpu.swapwait[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: '%'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Percentage of CPU time spent waiting for a swap-in.'
          tags:
            - tag: component
              value: cpu
        - uuid: 50606be978814b51b4bae54340965cdc
          name: 'CPU usage in percent'
          type: SIMPLE
          key: 'vmware.vm.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          value_type: FLOAT
          units: '%'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'CPU usage as a percentage during the interval.'
          tags:
            - tag: component
              value: cpu
        - uuid: ea416ff054cc4031ac6b5cf446156540
          name: 'CPU usage'
          type: SIMPLE
          key: 'vmware.vm.cpu.usage[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: Hz
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Current upper-bound on CPU usage. The upper-bound is based on the host the VM is current running on, as well as limits configured on the VM itself or any parent resource pool. Valid while the VM is running.'
          tags:
            - tag: component
              value: cpu
        - uuid: 3e70b5d443b942db974b5f92a7acce19
          name: 'Datacenter name'
          type: SIMPLE
          key: 'vmware.vm.datacenter.name[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Datacenter name of the guest VM.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: datacenter
        - uuid: e645130999db470fbbf14a8055c95b23
          name: 'Guest memory swapped'
          type: SIMPLE
          key: 'vmware.vm.guest.memory.size.swapped[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Amount of guest physical memory that is swapped out to the swap space.'
          tags:
            - tag: component
              value: memory
        - uuid: 521a0396514845e3bc5d3dc54ec3d940
          name: 'Uptime of guest OS'
          type: SIMPLE
          key: 'vmware.vm.guest.osuptime[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: uptime
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Total time elapsed since the last operating system boot-up (in seconds). Data is collected if Guest OS Add-ons (VMware Tools) are installed.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '0'
                - 'Performance counter data is not available.'
          tags:
            - tag: component
              value: system
        - uuid: b794d9df3e764df8b04239d5779269cd
          name: 'Hypervisor maintenance mode'
          type: SIMPLE
          key: 'vmware.vm.hv.maintenance[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: |
            Hypervisor maintenance mode. One of the following:
            - Normal mode;
            - Maintenance mode.
          valuemap:
            name: 'VMware Hypervisor maintenance mode'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 05c2982de3f94647808a523a91af554c
              expression: 'last(/VMware Guest/vmware.vm.hv.maintenance[{$VMWARE.URL},{$VMWARE.VM.UUID}])=1 and {$VMWARE.HYPERVISOR.MAINTENANCE}=1'
              name: 'VMware Guest: Hypervisor is in the maintenance mode'
              event_name: 'VMware Guest: Hypervisor is in the maintenance mode'
              priority: INFO
              description: 'Hypervisor is in the maintenance mode. All other problem on the host will be suppressed.'
              tags:
                - tag: scope
                  value: notice
        - uuid: fedec469a1d040ae971e0013102e1e7c
          name: 'Hypervisor name'
          type: SIMPLE
          key: 'vmware.vm.hv.name[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Hypervisor name of the guest VM.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: hypervisor
        - uuid: fbe7477fd85a4ee39a9226b2c6995446
          name: 'Ballooned memory'
          type: SIMPLE
          key: 'vmware.vm.memory.size.ballooned[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The amount of guest physical memory that is currently reclaimed through the balloon driver.'
          tags:
            - tag: component
              value: memory
        - uuid: 9e7b9360e4d84e9397b5f0a7ab074726
          name: 'Compressed memory'
          type: SIMPLE
          key: 'vmware.vm.memory.size.compressed[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The amount of memory currently in the compression cache for this VM.'
          tags:
            - tag: component
              value: memory
        - uuid: 04a40f805fed4ddfa1590274a996a019
          name: 'Host memory consumed'
          type: SIMPLE
          key: 'vmware.vm.memory.size.consumed[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Amount of host physical memory consumed for backing up guest physical memory pages.'
          tags:
            - tag: component
              value: memory
        - uuid: 6563409185804ed89b49dfde92edfa10
          name: 'Private memory'
          type: SIMPLE
          key: 'vmware.vm.memory.size.private[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Amount of memory backed by host memory and not being shared.'
          tags:
            - tag: component
              value: memory
        - uuid: c6a539ee57bf48f78342358c391c65ea
          name: 'Shared memory'
          type: SIMPLE
          key: 'vmware.vm.memory.size.shared[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The amount of guest physical memory shared through transparent page sharing.'
          tags:
            - tag: component
              value: memory
        - uuid: b064f0e0a53f4f6588827100becb4335
          name: 'Swapped memory'
          type: SIMPLE
          key: 'vmware.vm.memory.size.swapped[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The amount of guest physical memory swapped out to the VM''s swap device by ESX.'
          tags:
            - tag: component
              value: memory
        - uuid: e960399726a240de9ecc12eff65415ae
          name: 'Guest memory usage'
          type: SIMPLE
          key: 'vmware.vm.memory.size.usage.guest[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The amount of guest physical memory that is being used by the VM.'
          tags:
            - tag: component
              value: memory
        - uuid: 6fcbe4e95fce445aa417b9738004391f
          name: 'Host memory usage'
          type: SIMPLE
          key: 'vmware.vm.memory.size.usage.host[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The amount of host physical memory allocated to the VM, accounting for the amount saved from memory sharing with other VMs.'
          tags:
            - tag: component
              value: memory
        - uuid: 9533bc39366443fe8a3808190801441a
          name: 'Memory size'
          type: SIMPLE
          key: 'vmware.vm.memory.size[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          delay: 1h
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Total size of configured memory.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: memory
        - uuid: e82daa73e03e43b9838d9e414d710e38
          name: 'Host memory usage in percent'
          type: SIMPLE
          key: 'vmware.vm.memory.usage[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          value_type: FLOAT
          units: '%'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Percentage of host physical memory that has been consumed.'
          tags:
            - tag: component
              value: memory
        - uuid: 0943ff346c9d4cc69fc773843066c473
          name: 'Power state'
          type: SIMPLE
          key: 'vmware.vm.powerstate[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: |
            The current power state of the VM. One of the following:
            - Powered off;
            - Powered on;
            - Suspended.
          valuemap:
            name: 'VMware VirtualMachinePowerState'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: power
        - uuid: deb129a3dcb04008a8fbdc64c6f11c7f
          name: 'Boot time'
          type: SIMPLE
          key: 'vmware.vm.property[{$VMWARE.URL},{$VMWARE.VM.UUID},runtime.bootTime]'
          units: unixtime
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'System boot time.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - 'return Math.floor(Date.parse(value)/1000);'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: system
        - uuid: de013bcc700f4878ab80aa3fdd87cc8c
          name: 'Snapshot count'
          type: DEPENDENT
          key: vmware.vm.snapshot.count
          description: 'Snapshot count of the guest VM.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.count
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'vmware.vm.snapshot.get[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          tags:
            - tag: component
              value: storage
        - uuid: 550350d76aa346c49ef828418ebc53be
          name: 'Get snapshots'
          type: SIMPLE
          key: 'vmware.vm.snapshot.get[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          delay: 1h
          history: '0'
          value_type: TEXT
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Snapshots of the guest VM.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: raw
        - uuid: da2d382ba9554661ba476e1f3d5294b3
          name: 'Snapshot latest date'
          type: DEPENDENT
          key: vmware.vm.snapshot.latestdate
          value_type: CHAR
          description: 'Latest snapshot date of the guest VM.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.latestdate
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'vmware.vm.snapshot.get[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          tags:
            - tag: component
              value: storage
        - uuid: 2e68d5709d4f46b49b62d37a890e4193
          name: 'VM state'
          type: SIMPLE
          key: 'vmware.vm.state[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: |
            VMware virtual machine state. One of the following:
            - Not running;
            - Resetting;
            - Running;
            - Shutting down;
            - Standby;
            - Unknown.
          valuemap:
            name: 'VMware Virtual Machine state'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = [
                  	'notRunning',
                  	'resetting',
                  	'running',
                  	'shuttingDown',
                  	'standby',
                  	'unknown'
                  ].indexOf(value);
                  return idx !== -1 ? idx : 5;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: health
            - tag: component
              value: system
          triggers:
            - uuid: 6ebb2a2de81e4bacbb32d1b767c3cb04
              expression: 'last(/VMware Guest/vmware.vm.state[{$VMWARE.URL},{$VMWARE.VM.UUID}]) <> 2'
              name: 'VMware Guest: VM is not running'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'VMware virtual machine is not running.'
              dependencies:
                - name: 'VMware Guest: Hypervisor is in the maintenance mode'
                  expression: 'last(/VMware Guest/vmware.vm.hv.maintenance[{$VMWARE.URL},{$VMWARE.VM.UUID}])=1 and {$VMWARE.HYPERVISOR.MAINTENANCE}=1'
              tags:
                - tag: scope
                  value: notice
        - uuid: 13173517c99e4a87aa6750392d14b255
          name: 'Committed storage space'
          type: SIMPLE
          key: 'vmware.vm.storage.committed[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Total storage space, in bytes, committed to this VM across all datastores.'
          tags:
            - tag: component
              value: storage
        - uuid: 8183cf2c54774d7eb544f645d5c26b8c
          name: 'Uncommitted storage space'
          type: SIMPLE
          key: 'vmware.vm.storage.uncommitted[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Additional storage space, in bytes, potentially used by this VM on all datastores.'
          tags:
            - tag: component
              value: storage
        - uuid: 35aa9ee1743e4c1787c426da20f48097
          name: 'Unshared storage space'
          type: SIMPLE
          key: 'vmware.vm.storage.unshared[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Total storage space, in bytes, occupied by the VM across all datastores that is not shared with any other VM.'
          tags:
            - tag: component
              value: storage
        - uuid: 6089b7822620423aa2b2e66066d33217
          name: 'VMware Tools status'
          type: SIMPLE
          key: 'vmware.vm.tools[{$VMWARE.URL},{$VMWARE.VM.UUID},status]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: |
            Monitoring of VMware Tools. One of the following:
            - Guest tools executing scripts: VMware Tools is starting.
            - Guest tools not running: VMware Tools is not running.
            - Guest tools running: VMware Tools is running.
          valuemap:
            name: 'VMware Tools status'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = [
                  	'guestToolsExecutingScripts',
                  	'guestToolsNotRunning',
                  	'guestToolsRunning'
                  ].indexOf(value);
                  return idx !== -1 ? idx : 10;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 132d6e490fea42e390de64ce389ad538
              expression: 'last(/VMware Guest/vmware.vm.tools[{$VMWARE.URL},{$VMWARE.VM.UUID},status]) = 1'
              name: 'VMware Guest: VMware Tools is not running'
              priority: WARNING
              description: 'VMware Tools is not running on the VM.'
              dependencies:
                - name: 'VMware Guest: Hypervisor is in the maintenance mode'
                  expression: 'last(/VMware Guest/vmware.vm.hv.maintenance[{$VMWARE.URL},{$VMWARE.VM.UUID}])=1 and {$VMWARE.HYPERVISOR.MAINTENANCE}=1'
                - name: 'VMware Guest: VM is not running'
                  expression: 'last(/VMware Guest/vmware.vm.state[{$VMWARE.URL},{$VMWARE.VM.UUID}]) <> 2'
              tags:
                - tag: scope
                  value: notice
        - uuid: 3870a0d8bfd1474db6e096a1a9a246b3
          name: 'VMware Tools version'
          type: SIMPLE
          key: 'vmware.vm.tools[{$VMWARE.URL},{$VMWARE.VM.UUID},version]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Monitoring of the VMware Tools version.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: 4c3b010d7ea74da6b0dc1dd4e625bbb0
          name: Uptime
          type: SIMPLE
          key: 'vmware.vm.uptime[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          units: uptime
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'System uptime.'
          tags:
            - tag: component
              value: system
      discovery_rules:
        - uuid: 914634668bab4266bd641ee224dbc1e4
          name: 'Network device discovery'
          type: SIMPLE
          key: 'vmware.vm.net.if.discovery[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of all network devices.'
          item_prototypes:
            - uuid: 1a7452a0061b45b1b1904e3ff64cf49f
              name: 'Number of bytes received on interface [{#IFBACKINGDEVICE}]/[{#IFDESC}]'
              type: SIMPLE
              key: 'vmware.vm.net.if.in[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME},bps]'
              units: Bps
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine network interface input statistics (bytes per second).'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFDESC}'
            - uuid: 863c3aee5d9248d48adbf86832fa6c8e
              name: 'Number of packets received on interface [{#IFBACKINGDEVICE}]/[{#IFDESC}]'
              type: SIMPLE
              key: 'vmware.vm.net.if.in[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME},pps]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine network interface input statistics (packets per second).'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFDESC}'
            - uuid: 0993e42664a14cd7936351c55b1d64a4
              name: 'Number of bytes transmitted on interface [{#IFBACKINGDEVICE}]/[{#IFDESC}]'
              type: SIMPLE
              key: 'vmware.vm.net.if.out[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME},bps]'
              units: Bps
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine network interface output statistics (bytes per second).'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFDESC}'
            - uuid: 144a2ed3f76e49af92462e0fea275ede
              name: 'Number of packets transmitted on interface [{#IFBACKINGDEVICE}]/[{#IFDESC}]'
              type: SIMPLE
              key: 'vmware.vm.net.if.out[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME},pps]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine network interface output statistics (packets per second).'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFDESC}'
            - uuid: 9c3cd13576cc4c0a8972fa188f911e96
              name: 'Network utilization on interface [{#IFBACKINGDEVICE}]/[{#IFDESC}]'
              type: SIMPLE
              key: 'vmware.vm.net.if.usage[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME}]'
              units: Bps
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine network utilization (combined transmit and receive rates) during the interval.'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFDESC}'
        - uuid: b1543bdfb5a342d7ad694c87248fe173
          name: 'Disk device discovery'
          type: SIMPLE
          key: 'vmware.vm.vfs.dev.discovery[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of all disk devices.'
          item_prototypes:
            - uuid: a4886b1072314819aaf21183949c94bb
              name: 'Average number of outstanding read requests to the disk [{#DISKDESC}]'
              type: SIMPLE
              key: 'vmware.vm.storage.readoio[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME}]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'Average number of outstanding read requests to the virtual disk during the collection interval.'
              tags:
                - tag: component
                  value: disk
                - tag: disk
                  value: '{#DISKDESC}'
            - uuid: 172e4882d39f49d486ab5590163fdd4b
              name: 'Average read latency from the disk [{#DISKDESC}]'
              type: SIMPLE
              key: 'vmware.vm.storage.totalreadlatency[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME}]'
              units: '!ms'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'The average time a read from the virtual disk takes.'
              tags:
                - tag: component
                  value: disk
                - tag: disk
                  value: '{#DISKDESC}'
            - uuid: 4fe54828be084b15bb92507106756a5f
              name: 'Average write latency to the disk [{#DISKDESC}]'
              type: SIMPLE
              key: 'vmware.vm.storage.totalwritelatency[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME}]'
              units: '!ms'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'The average time a write to the virtual disk takes.'
              tags:
                - tag: component
                  value: disk
                - tag: disk
                  value: '{#DISKDESC}'
            - uuid: a74614af101c404eb7ebec10319dca05
              name: 'Average number of outstanding write requests to the disk [{#DISKDESC}]'
              type: SIMPLE
              key: 'vmware.vm.storage.writeoio[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME}]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'Average number of outstanding write requests to the virtual disk during the collection interval.'
              tags:
                - tag: component
                  value: disk
                - tag: disk
                  value: '{#DISKDESC}'
            - uuid: bd151efc8a0b41e9b64cbf21303fc659
              name: 'Average number of bytes read from the disk [{#DISKDESC}]'
              type: SIMPLE
              key: 'vmware.vm.vfs.dev.read[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME},bps]'
              units: Bps
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine disk device read statistics (bytes per second).'
              tags:
                - tag: component
                  value: disk
                - tag: disk
                  value: '{#DISKDESC}'
            - uuid: e6248013150d4f23a0774f6cc80e8df3
              name: 'Average number of reads from the disk [{#DISKDESC}]'
              type: SIMPLE
              key: 'vmware.vm.vfs.dev.read[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME},ops]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine disk device read statistics (operations per second).'
              tags:
                - tag: component
                  value: disk
                - tag: disk
                  value: '{#DISKDESC}'
            - uuid: 7ea68380b855460b8e51281223659661
              name: 'Average number of bytes written to the disk [{#DISKDESC}]'
              type: SIMPLE
              key: 'vmware.vm.vfs.dev.write[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME},bps]'
              units: Bps
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine disk device write statistics (bytes per second).'
              tags:
                - tag: component
                  value: disk
                - tag: disk
                  value: '{#DISKDESC}'
            - uuid: 8344a1066f5c4ef49894d2d18fac2339
              name: 'Average number of writes to the disk [{#DISKDESC}]'
              type: SIMPLE
              key: 'vmware.vm.vfs.dev.write[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME},ops]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine disk device write statistics (operations per second).'
              tags:
                - tag: component
                  value: disk
                - tag: disk
                  value: '{#DISKDESC}'
        - uuid: 44ff9ef164dc4d20acf06b3368d64456
          name: 'Mounted filesystem discovery'
          type: SIMPLE
          key: 'vmware.vm.vfs.fs.discovery[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of all guest file systems.'
          item_prototypes:
            - uuid: 622e96310f9d4f54b4ed82f655fa153b
              name: 'Free disk space on [{#FSNAME}]'
              type: SIMPLE
              key: 'vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},free]'
              units: B
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine file system statistics (bytes).'
              tags:
                - tag: component
                  value: filesystem
                - tag: filesystem
                  value: '{#FSNAME}'
            - uuid: 3103537bb1d24633a064d173b3b530f2
              name: 'Free disk space on [{#FSNAME}] (percentage)'
              type: SIMPLE
              key: 'vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},pfree]'
              value_type: FLOAT
              units: '%'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine file system statistics (percentage).'
              tags:
                - tag: component
                  value: filesystem
                - tag: filesystem
                  value: '{#FSNAME}'
              trigger_prototypes:
                - uuid: 19c60e68a55d4910a278b6242ead7686
                  expression: 'max(/VMware Guest/vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},pfree],5m)<{$VMWARE.VM.FS.PFREE.MIN.CRIT:"{#FSNAME}"} and {$VMWARE.VM.FS.TRIGGER.USED:"{#FSNAME}"}=1'
                  name: 'VMware Guest: [{#FSNAME}]: Disk space is critically low'
                  event_name: 'VMware Guest: [{#FSNAME}]: Disk space is critically low (below {$VMWARE.VM.FS.PFREE.MIN.CRIT:"{#FSNAME}"}% for 5m)'
                  opdata: 'Space free: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'The disk free space on [{#FSNAME}] has been less than `{$VMWARE.VM.FS.PFREE.MIN.CRIT:"{#FSNAME}"}`% for 5m.'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'VMware Guest: Hypervisor is in the maintenance mode'
                      expression: 'last(/VMware Guest/vmware.vm.hv.maintenance[{$VMWARE.URL},{$VMWARE.VM.UUID}])=1 and {$VMWARE.HYPERVISOR.MAINTENANCE}=1'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: cc995d4c595d46ee80954fd4bb3e0b1b
                  expression: 'max(/VMware Guest/vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},pfree],5m)<{$VMWARE.VM.FS.PFREE.MIN.WARN:"{#FSNAME}"} and {$VMWARE.VM.FS.TRIGGER.USED:"{#FSNAME}"}=1'
                  name: 'VMware Guest: [{#FSNAME}]: Disk space is low'
                  event_name: 'VMware Guest: [{#FSNAME}]: Disk space is low (below {$VMWARE.VM.FS.PFREE.MIN.WARN:"{#FSNAME}"}% for 5m)'
                  opdata: 'Space free: {ITEM.LASTVALUE}'
                  priority: WARNING
                  description: 'The disk free space on [{#FSNAME}] has been less than `{$VMWARE.VM.FS.PFREE.MIN.WARN:"{#FSNAME}"}`% for 5m.'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'VMware Guest: Hypervisor is in the maintenance mode'
                      expression: 'last(/VMware Guest/vmware.vm.hv.maintenance[{$VMWARE.URL},{$VMWARE.VM.UUID}])=1 and {$VMWARE.HYPERVISOR.MAINTENANCE}=1'
                    - name: 'VMware Guest: [{#FSNAME}]: Disk space is critically low'
                      expression: 'max(/VMware Guest/vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},pfree],5m)<{$VMWARE.VM.FS.PFREE.MIN.CRIT:"{#FSNAME}"} and {$VMWARE.VM.FS.TRIGGER.USED:"{#FSNAME}"}=1'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: 08d05eac03994b56867ec302a346735c
              name: 'Total disk space on [{#FSNAME}]'
              type: SIMPLE
              key: 'vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},total]'
              delay: 1h
              units: B
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine total disk space (bytes).'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: filesystem
                - tag: filesystem
                  value: '{#FSNAME}'
            - uuid: 09bb15da42464d8295d5e94b1d42cc87
              name: 'Used disk space on [{#FSNAME}]'
              type: SIMPLE
              key: 'vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},used]'
              units: B
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware virtual machine used disk space (bytes).'
              tags:
                - tag: component
                  value: filesystem
                - tag: filesystem
                  value: '{#FSNAME}'
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: virtualization
        - tag: target
          value: vmware
        - tag: target
          value: vmware-guest
      macros:
        - macro: '{$VMWARE.HYPERVISOR.MAINTENANCE}'
          value: '1'
          description: 'If the hypervisor is in maintenance mode, all other problems on the VM will be suppressed automatically. Set to "1"/"0" to enable or disable this feature.'
        - macro: '{$VMWARE.PASSWORD}'
          type: SECRET_TEXT
          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.VM.FS.PFREE.MIN.CRIT}'
          value: '10'
          description: 'VMware guest free space threshold for the critical trigger.'
        - macro: '{$VMWARE.VM.FS.PFREE.MIN.WARN}'
          value: '20'
          description: 'VMware guest free space threshold for the warning trigger.'
        - macro: '{$VMWARE.VM.FS.TRIGGER.USED}'
          value: '0'
          description: 'VMware guest used free space trigger. Set to "1"/"0" to enable or disable the trigger.'
      dashboards:
        - uuid: ea7f45fa45e4429abb2fd3a675765483
          name: 'Guest VM overview'
          pages:
            - name: 'VMware: Guest VM Overview'
              widgets:
                - type: gauge
                  name: 'CPU utilization'
                  width: '21'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'CPU usage'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: svggraph
                  name: 'CPU and memory usage in percents'
                  'y': '4'
                  width: '42'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 4FC3F7
                    - 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 Guest'
                        key: 'vmware.vm.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.0.width
                      value: '3'
                    - type: STRING
                      name: ds.1.color.0
                      value: FFAB91
                    - 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 Guest'
                        key: 'vmware.vm.memory.usage[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: lefty_max
                      value: '100'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - 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: AAAAB
                - type: item
                  name: 'Number of virtual CPUs'
                  'y': '8'
                  width: '15'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.num[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Committed storage space'
                  'y': '10'
                  width: '15'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.storage.committed[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Memory size'
                  x: '15'
                  'y': '8'
                  width: '15'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size[{$VMWARE.URL},{$VMWARE.VM.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: item
                  name: 'Uncommitted storage space'
                  x: '15'
                  'y': '10'
                  width: '15'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.storage.uncommitted[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: gauge
                  name: 'Host memory usage'
                  x: '21'
                  width: '21'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Host memory usage'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.usage[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: item
                  name: 'VMware Tools version'
                  x: '30'
                  'y': '8'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.tools[{$VMWARE.URL},{$VMWARE.VM.UUID},version]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: Uptime
                  x: '30'
                  'y': '10'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.uptime[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'VM state'
                  x: '42'
                  width: '30'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.state[{$VMWARE.URL},{$VMWARE.VM.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: FFBF00
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFBF00
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: 32CD32
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.3.color
                      value: FFECB3
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '3'
                    - type: STRING
                      name: thresholds.4.color
                      value: FFECB3
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '4'
                    - type: STRING
                      name: thresholds.5.color
                      value: D2D2D2
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '5'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'VM Tools status'
                  x: '42'
                  'y': '2'
                  width: '30'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.tools[{$VMWARE.URL},{$VMWARE.VM.UUID},status]'
                    - 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: FFBF00
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFBF00
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: 32CD32
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.3.color
                      value: D2D2D2
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '10'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Cluster name'
                  x: '42'
                  'y': '4'
                  width: '30'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cluster.name[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Datacenter name'
                  x: '42'
                  'y': '6'
                  width: '30'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.datacenter.name[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Hypervisor name'
                  x: '42'
                  'y': '8'
                  width: '30'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.hv.name[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Snapshot count'
                  x: '42'
                  'y': '10'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: vmware.vm.snapshot.count
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Snapshot latest date'
                  x: '54'
                  'y': '10'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: vmware.vm.snapshot.latestdate
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '30'
            - name: 'VMware: CPU'
              widgets:
                - type: svggraph
                  name: 'CPU usage'
                  width: '51'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 0288D1
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '4'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.0.transparency
                      value: '6'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: svggraph
                  name: 'CPU latency'
                  'y': '6'
                  width: '51'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00BFFF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.latency[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.0.transparency
                      value: '6'
                    - type: STRING
                      name: ds.1.color.0
                      value: CE93D8
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.readiness[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.1.transparency
                      value: '6'
                    - type: STRING
                      name: ds.2.color.0
                      value: FF4000
                    - type: INTEGER
                      name: ds.2.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.2.itemids.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.swapwait[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.2.transparency
                      value: '6'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: item
                  name: 'Number of virtual CPUs'
                  x: '51'
                  width: '21'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.num[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'CPU usage'
                  x: '51'
                  'y': '2'
                  width: '21'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.usage[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'CPU ready'
                  x: '51'
                  'y': '4'
                  width: '21'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.ready[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'CPU latency in percents'
                  x: '51'
                  'y': '6'
                  width: '21'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.latency[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'CPU readiness latency in percent'
                  x: '51'
                  'y': '8'
                  width: '21'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.readiness[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'CPU readiness latency in percent'
                  x: '51'
                  'y': '10'
                  width: '21'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.cpu.swapwait[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
            - name: 'VMware: Memory'
              widgets:
                - type: svggraph
                  name: 'Host memory usage in percent'
                  width: '51'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: EF9A9A
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '4'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.usage[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.0.transparency
                      value: '6'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAF
                - type: svggraph
                  name: 'Host memory usage'
                  'y': '4'
                  width: '51'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: F06292
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.usage.guest[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.0.transparency
                      value: '3'
                    - type: STRING
                      name: ds.1.color.0
                      value: BF00FF
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.consumed[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.1.transparency
                      value: '3'
                    - type: STRING
                      name: ds.2.color.0
                      value: 90CAF9
                    - type: INTEGER
                      name: ds.2.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.2.itemids.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.usage.host[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: ds.2.transparency
                      value: '3'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: item
                  name: 'Guest memory swapped'
                  'y': '10'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.guest.memory.size.swapped[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Swapped memory'
                  x: '12'
                  'y': '10'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.swapped[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Private memory'
                  x: '24'
                  'y': '10'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.private[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Shared memory'
                  x: '36'
                  'y': '10'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.shared[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Ballooned memory'
                  x: '48'
                  'y': '10'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.ballooned[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Memory size'
                  x: '51'
                  width: '21'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '25'
                    - type: INTEGER
                      name: desc_size
                      value: '7'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size[{$VMWARE.URL},{$VMWARE.VM.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: units_size
                      value: '20'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: item
                  name: 'Guest memory usage'
                  x: '51'
                  'y': '4'
                  width: '21'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.usage.guest[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Host memory consumed'
                  x: '51'
                  'y': '6'
                  width: '21'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.consumed[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Host memory usage'
                  x: '51'
                  'y': '8'
                  width: '21'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.usage.host[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Compressed memory'
                  x: '60'
                  'y': '10'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.memory.size.compressed[{$VMWARE.URL},{$VMWARE.VM.UUID}]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
            - name: 'VMware: Storage'
              widgets:
                - type: graphprototype
                  name: 'Average number of bytes read from the disk'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.vfs.dev.read[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME},bps]'
                    - type: STRING
                      name: reference
                      value: AAAAH
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average read latency to the disk'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.storage.totalreadlatency[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average number of bytes written to the disk'
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.vfs.dev.write[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME},bps]'
                    - type: STRING
                      name: reference
                      value: AAAAK
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average write latency to the disk'
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.storage.totalwritelatency[{$VMWARE.URL},{$VMWARE.VM.UUID},{#DISKNAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAL
                    - type: INTEGER
                      name: source_type
                      value: '3'
            - name: 'VMware: Filesystem'
              widgets:
                - type: honeycomb
                  name: 'Total disk space'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 81D4FA
                    - type: STRING
                      name: items.0
                      value: 'Total disk space on*'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("space on.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAM
                - type: graphprototype
                  name: 'Free disk space'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},free]'
                    - type: STRING
                      name: reference
                      value: AAAAN
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: honeycomb
                  name: 'Free disk space'
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Free disk space on*(percentage)'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("space on.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAO
                    - type: STRING
                      name: thresholds.0.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '10'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '20'
                    - type: STRING
                      name: thresholds.2.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '30'
                - type: graphprototype
                  name: 'Free disk space (percentage)'
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},pfree]'
                    - type: STRING
                      name: reference
                      value: AAAAP
                    - type: INTEGER
                      name: source_type
                      value: '3'
            - name: 'VMware: Network'
              widgets:
                - type: graphprototype
                  name: 'Network utilization on interface'
                  width: '72'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.net.if.usage[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAQ
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Number of bytes received on interface'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.net.if.in[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME},bps]'
                    - type: STRING
                      name: reference
                      value: AAAAR
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Number of packets received on interface'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.net.if.in[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME},pps]'
                    - type: STRING
                      name: reference
                      value: AAAAS
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Number of bytes transmitted on interface'
                  x: '36'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.net.if.out[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME},bps]'
                    - type: STRING
                      name: reference
                      value: AAAAT
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Number of packets transmitted on interface'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Guest'
                        key: 'vmware.vm.net.if.out[{$VMWARE.URL},{$VMWARE.VM.UUID},{#IFNAME},pps]'
                    - type: STRING
                      name: reference
                      value: AAAAU
                    - type: INTEGER
                      name: source_type
                      value: '3'
      valuemaps:
        - uuid: be14ef9303f040859e6edbb13d9b64c5
          name: 'VMware Consolidation'
          mappings:
            - value: '0'
              newvalue: 'True'
            - value: '1'
              newvalue: 'False'
            - value: '2'
              newvalue: Unknown
        - uuid: 815e082c2a804884bb25da4aaee18934
          name: 'VMware Hypervisor maintenance mode'
          mappings:
            - value: '0'
              newvalue: 'Normal mode'
            - value: '1'
              newvalue: 'Maintenance mode'
        - uuid: 64586743ecc74b5a8b7b849cd4521f48
          name: 'VMware Tools status'
          mappings:
            - value: '0'
              newvalue: 'Guest tools is executing scripts'
            - value: '1'
              newvalue: 'Guest tools is not running'
            - value: '2'
              newvalue: 'Guest tools is running'
            - value: '10'
              newvalue: Unknown
        - uuid: 78f08f5c5c0047b999a2e8daa96cf8b7
          name: 'VMware VirtualMachinePowerState'
          mappings:
            - value: '0'
              newvalue: 'Powered off'
            - value: '1'
              newvalue: 'Powered on'
            - value: '2'
              newvalue: Suspended
        - uuid: 68d712e1c43c4e2d84619c9fcb965919
          name: 'VMware Virtual Machine state'
          mappings:
            - value: '0'
              newvalue: 'Not running'
            - value: '1'
              newvalue: Resetting
            - value: '2'
              newvalue: Running
            - value: '3'
              newvalue: 'Shutting down'
            - value: '4'
              newvalue: Standby
            - value: '5'
              newvalue: Unknown
    - uuid: 5899b2f0aced4085b5ac25d0461b3425
      template: 'VMware Hypervisor'
      name: 'VMware Hypervisor'
      description: |
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/.
        
        This template can be used in discovery as well as manually linked to a host. To use this template as manually linked to a host, attach it to the host and set manually the value of '{$VMWARE.HV.UUID}' macro.
        
        Note: To create custom performance counter see documentation: https://www.zabbix.com/documentation/8.0/manual/vm_monitoring/vmware_keys#footnotes.
        
        Note: To get all supported counters and generate path for custom performance counter see documentation: https://www.zabbix.com/documentation/8.0/manual/appendix/items/perf_counters.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed for the effortless deployment of VMware ESX hypervisor monitoring and doesn't require any external scripts.
        
        This template can be used in discovery as well as manually linked to a host.
        
        For additional information, please see [Zabbix documentation on VM monitoring](https://www.zabbix.com/documentation/8.0/manual/vm_monitoring).
        
        To use this template as manually linked to a host, attach it to the host and manually set the `Hypervisor UUID` host wizard configuration field.
        
        ## Setup
        
        To use this template as manually linked to a host:
          1. Compile Zabbix server with the required options (`--with-libxml2` and `--with-libcurl`).
          2. Set the `StartVMwareCollectors` option in the Zabbix server configuration file to "1" or more.
          3. Set the host wizard configuration fields required for VMware authentication: `VMware URL`, `VMware username` and `VMware password`.
          4. To get the hypervisor UUID, enable access to the hypervisor via SSH and log in via SSH using a valid login and password.
          5. Run the following command and specify the UUID in the `Hypervisor UUID` host wizard configuration field:
          ```text
          vim-cmd hostsvc/hostsummary | grep uuid
          ```
        
        Note: To enable discovery of hardware sensors of VMware hypervisors, set the host wizard configuration field `Monitoring of hardware sensors` to the selected state.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: Templates/Applications
      items:
        - uuid: 3010cb082f23478b858912f944347530
          name: 'Hypervisor ping'
          type: SIMPLE
          key: 'icmpping[]'
          description: |
            Checks if the hypervisor is running and accepting ICMP pings. One of the following:
            - Down;
            - Up.
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
          triggers:
            - uuid: ab84a61566a5402db59efd40d20714a5
              expression: 'last(/VMware Hypervisor/icmpping[])=0'
              name: 'VMware Hypervisor: Hypervisor is down'
              priority: AVERAGE
              description: 'The service is unavailable or is not accepting ICMP pings.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: af4d0877fda84753816c817ad76162f1
          name: 'Cluster name'
          type: SIMPLE
          key: 'vmware.hv.cluster.name[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Cluster name of the guest VM.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: cluster
        - uuid: 0e9fd4e6d6e446f08afe7b4b9431bc62
          name: 'Connection state'
          type: SIMPLE
          key: 'vmware.hv.connectionstate[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          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;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: availability
        - uuid: c4ebd62118464e7a8d1945f80d70f8ae
          name: 'CPU usage in percent'
          type: SIMPLE
          key: 'vmware.hv.cpu.usage.perf[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          value_type: FLOAT
          units: '%'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'CPU usage as a percentage during the interval.'
          tags:
            - tag: component
              value: cpu
        - uuid: 1bff6fbd300d4455a787a273d957bba3
          name: 'CPU usage'
          type: SIMPLE
          key: 'vmware.hv.cpu.usage[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          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: aad168c33cd14f76aa14ab5ca26498ec
          name: 'CPU utilization'
          type: SIMPLE
          key: 'vmware.hv.cpu.utilization[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          value_type: FLOAT
          units: '%'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'CPU utilization as a percentage during the interval depends on power management or hyper-threading.'
          tags:
            - tag: component
              value: cpu
        - uuid: e4d27d7f9b9048d4ae6c60cbdd6c0091
          name: 'Datacenter name'
          type: SIMPLE
          key: 'vmware.hv.datacenter.name[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Datacenter name of the hypervisor.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: datacenter
        - uuid: 5c29837f75f04d7f9a5786691b3dd991
          name: 'Full name'
          type: SIMPLE
          key: 'vmware.hv.fullname[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The complete product name, including the version information.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
        - uuid: ad0053d57b834e6a9776c08e1c455d55
          name: 'CPU frequency'
          type: SIMPLE
          key: 'vmware.hv.hw.cpu.freq[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          units: Hz
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The speed of the CPU cores. This is an average value if there are multiple speeds. The product of CPU frequency and the number of cores is approximately equal to the sum of the MHz for all the individual cores on the host.'
          tags:
            - tag: component
              value: cpu
        - uuid: 3f0c35fcef9e4699ac5a1c51d80f8da4
          name: 'CPU model'
          type: SIMPLE
          key: 'vmware.hv.hw.cpu.model[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The CPU model.'
          tags:
            - tag: component
              value: cpu
        - uuid: c99a5bf2e3904f97b3d361ca20af7883
          name: 'CPU cores'
          type: SIMPLE
          key: 'vmware.hv.hw.cpu.num[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Number of physical CPU cores on the host. Physical CPU cores are the processors contained by a CPU package.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: cpu
        - uuid: 89cb0a4809e7454a862f398a0e9d6bed
          name: 'CPU threads'
          type: SIMPLE
          key: 'vmware.hv.hw.cpu.threads[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Number of physical CPU threads on the host.'
          tags:
            - tag: component
              value: cpu
        - uuid: ce89c38e6e5d4338a30ee150be1b2b67
          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: 7ed7ac26da384bcda976badf24ebbec1
          name: Model
          type: SIMPLE
          key: 'vmware.hv.hw.model[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The system model identification.'
          tags:
            - tag: component
              value: system
        - uuid: 6c4aab55b3e640779a25ac90b9ca2a43
          name: 'Bios UUID'
          type: SIMPLE
          key: 'vmware.hv.hw.uuid[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The hardware BIOS identification.'
          tags:
            - tag: component
              value: system
        - uuid: aec06090d16d4bdd8ed3494b448f19d8
          name: Vendor
          type: SIMPLE
          key: 'vmware.hv.hw.vendor[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The hardware vendor identification.'
          tags:
            - tag: component
              value: system
        - uuid: 21020a79436a49c38caf8941f6b68da3
          name: 'Ballooned memory'
          type: SIMPLE
          key: 'vmware.hv.memory.size.ballooned[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'The amount of guest physical memory that is currently reclaimed through the balloon driver. Sum of all guest VMs.'
          tags:
            - tag: component
              value: memory
        - uuid: 93d680d6886d446badbbe995ddd9ba9c
          name: 'Used memory'
          type: SIMPLE
          key: 'vmware.hv.memory.used[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          units: B
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Physical memory usage on the host.'
          tags:
            - tag: component
              value: memory
        - uuid: 33f78ab6ee6c4e7585a83a60cdecab6f
          name: 'Number of bytes received'
          type: SIMPLE
          key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},bps]'
          units: Bps
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network input statistics (bytes per second).'
          tags:
            - tag: component
              value: network
        - uuid: 8f935e9718294cd4a67d02f4723a1713
          name: 'Number of broadcasts received'
          type: SIMPLE
          key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},broadcast]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network input statistics (broadcasts).'
          tags:
            - tag: component
              value: network
        - uuid: 720c58685828440bacda845bfd848d6a
          name: 'Number of dropped received packets'
          type: SIMPLE
          key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},dropped]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network input statistics (packets dropped).'
          tags:
            - tag: component
              value: network
        - uuid: 0084eb8fd76241b8938bb1dad5a3f160
          name: 'Number of errors received'
          type: SIMPLE
          key: 'vmware.hv.network.in[{$VMWARE.URL},{$VMWARE.HV.UUID},errors]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network input statistics (errors).'
          tags:
            - tag: component
              value: network
        - uuid: b013afcba08b47f4a5b590a59f464a58
          name: 'Number of bytes transmitted'
          type: SIMPLE
          key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},bps]'
          units: Bps
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network output statistics (bytes per second).'
          tags:
            - tag: component
              value: network
        - uuid: 16496c407daa43b9863c05416b294992
          name: 'Number of broadcasts transmitted'
          type: SIMPLE
          key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},broadcast]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network output statistics (broadcasts).'
          tags:
            - tag: component
              value: network
        - uuid: f001256bbfc34cc0898c5eaef422973e
          name: 'Number of dropped transmitted packets'
          type: SIMPLE
          key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},dropped]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network output statistics (packets dropped).'
          tags:
            - tag: component
              value: network
        - uuid: 5f549d8708f24160b04a4a74db29042a
          name: 'Number of errors transmitted'
          type: SIMPLE
          key: 'vmware.hv.network.out[{$VMWARE.URL},{$VMWARE.HV.UUID},errors]'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'VMware hypervisor network output statistics (errors).'
          tags:
            - tag: component
              value: network
        - uuid: e4116d7c7e234c5ebd5784f42ade1f2e
          name: 'Power usage maximum allowed'
          type: SIMPLE
          key: 'vmware.hv.power[{$VMWARE.URL},{$VMWARE.HV.UUID},max]'
          units: '!W'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Maximum allowed power usage.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: power
        - uuid: 179a981cf30f4f77869e3b50dc2bc333
          name: 'Power usage'
          type: SIMPLE
          key: 'vmware.hv.power[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          units: '!W'
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Current power usage.'
          tags:
            - tag: component
              value: power
        - uuid: 3c9d6ffb53624758ad888bf70f69218c
          name: 'Get sensors'
          type: SIMPLE
          key: 'vmware.hv.sensors.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          history: '0'
          value_type: TEXT
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Master item for sensor data.'
          tags:
            - tag: component
              value: raw
        - uuid: 0cec294521314c5482233b5b96e90c8d
          name: 'Overall status'
          type: SIMPLE
          key: 'vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          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: 378511e0f1794874a68aef1b43561ee5
              expression: 'last(/VMware Hypervisor/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=3'
              name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health 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.'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
            - uuid: ef6ca4d7033c4c8cb963eb7d493b3c7b
              expression: 'last(/VMware Hypervisor/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=2'
              name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Yellow'
              priority: AVERAGE
              description: 'One or more components in the appliance might soon become overloaded.'
              dependencies:
                - name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Red'
                  expression: 'last(/VMware Hypervisor/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=3'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: ecad96137494476293b57a0440de3f65
          name: Uptime
          type: SIMPLE
          key: 'vmware.hv.uptime[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          units: uptime
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'System uptime.'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 01d316b0a8cf4998b344f0c4ef1daa32
              expression: 'last(/VMware Hypervisor/vmware.hv.uptime[{$VMWARE.URL},{$VMWARE.HV.UUID}])<10m'
              name: 'VMware Hypervisor: Hypervisor has been restarted'
              event_name: 'VMware Hypervisor: Hypervisor has been restarted (uptime < 10m)'
              priority: WARNING
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 222ad20887cf479b8e81a4c338078d17
          name: Version
          type: SIMPLE
          key: 'vmware.hv.version[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          value_type: CHAR
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Dot-separated version string.'
          tags:
            - tag: component
              value: system
        - uuid: 2045df572e864834bd4bd97046353f4e
          name: 'Number of guest VMs'
          type: SIMPLE
          key: 'vmware.hv.vm.num[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Number of guest virtual machines.'
          tags:
            - tag: component
              value: system
      discovery_rules:
        - uuid: fb7774df87994355baff7402d9fabcc2
          name: 'Datastore discovery'
          type: SIMPLE
          key: 'vmware.hv.datastore.discovery[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of VMware datastores.'
          item_prototypes:
            - uuid: 65e6c165c3674953b2845d4101a9a6bf
              name: 'Multipath count for datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.hv.datastore.multipath[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID}]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'Number of available datastore paths.'
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
              trigger_prototypes:
                - uuid: 8f1de4827ba446ef902ca5fa44109c6d
                  expression: 'last(/VMware Hypervisor/vmware.hv.datastore.multipath[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID}],#1)<>last(/VMware Hypervisor/vmware.hv.datastore.multipath[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID}],#2) and last(/VMware Hypervisor/vmware.hv.datastore.multipath[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID}])<{#MULTIPATH.COUNT}'
                  name: 'VMware Hypervisor: The multipath count has been changed'
                  event_name: 'VMware Hypervisor: The multipath count for datastore [{#DATASTORE}] has been changed'
                  opdata: 'Current: {ITEM.LASTVALUE}, Registered: {#MULTIPATH.COUNT}'
                  priority: AVERAGE
                  description: 'The number of available datastore paths is less than registered (`{#MULTIPATH.COUNT}`).'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 259d1ff4bde143248f7ee2f7f880cb62
              name: 'Average read latency of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.hv.datastore.read[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},latency]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'Average 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: 1d7761e9ad0c48c1a3f6b1b48290c16b
              name: 'Average read IOPS of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.hv.datastore.read[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},rps]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'Average IOPS for a read operation from the datastore.'
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
            - uuid: f36245398cc4460a9cb4ec741612693b
              name: 'Free space on datastore [{#DATASTORE}] (percentage)'
              type: SIMPLE
              key: 'vmware.hv.datastore.size[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},pfree]'
              delay: 5m
              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: 79c83ed72685487a9ef139c42eea1106
                  expression: 'last(/VMware Hypervisor/vmware.hv.datastore.size[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},pfree])<{$VMWARE.HV.DATASTORE.SPACE.CRIT}'
                  name: 'VMware Hypervisor: [{#DATASTORE}]: Free space is critically low'
                  event_name: 'VMware Hypervisor: Datastore free space is critically low ([{#DATASTORE}] free space < {$VMWARE.HV.DATASTORE.SPACE.CRIT}%)'
                  priority: HIGH
                  description: 'Datastore free space has fallen below the critical threshold.'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 5bc64ee899444a01a5bc315290256cdf
                  expression: 'last(/VMware Hypervisor/vmware.hv.datastore.size[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},pfree])<{$VMWARE.HV.DATASTORE.SPACE.WARN}'
                  name: 'VMware Hypervisor: [{#DATASTORE}]: Free space is low'
                  event_name: 'VMware Hypervisor: Datastore free space is low ([{#DATASTORE}] free space < {$VMWARE.HV.DATASTORE.SPACE.WARN}%)'
                  priority: WARNING
                  description: 'Datastore free space has fallen below the warning threshold.'
                  dependencies:
                    - name: 'VMware Hypervisor: [{#DATASTORE}]: Free space is critically low'
                      expression: 'last(/VMware Hypervisor/vmware.hv.datastore.size[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},pfree])<{$VMWARE.HV.DATASTORE.SPACE.CRIT}'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: cc83e8f5ec08483db75482706bf01aba
              name: 'Total size of datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.hv.datastore.size[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID}]'
              delay: 5m
              units: B
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware datastore space in bytes.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: datastore
                - tag: datastore
                  value: '{#DATASTORE}'
                - tag: type
                  value: '{#DATASTORE.TYPE}'
            - uuid: 9db980d8f5f44af5ad11a5949d80031d
              name: 'Average write latency of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.hv.datastore.write[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},latency]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'Average 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: 4514c4ccf00142e48b243f69dee0b533
              name: 'Average write IOPS of the datastore [{#DATASTORE}]'
              type: SIMPLE
              key: 'vmware.hv.datastore.write[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},rps]'
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'Average 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
              operations:
                - operator: LIKE
                  value: Average
                  discover: NO_DISCOVER
            - name: 'Disable Multipath perfCounter'
              step: '2'
              filter:
                conditions:
                  - macro: '{#DATASTORE.TYPE}'
                    value: vsan
              operations:
                - operator: LIKE
                  value: 'Multipath count for datastore'
                  discover: NO_DISCOVER
        - uuid: deb31adf69634837839e2d8f87167f28
          name: 'Healthcheck discovery'
          type: DEPENDENT
          key: vmware.hv.healthcheck.discovery
          description: 'VMware Rollup Health State sensor discovery.'
          item_prototypes:
            - uuid: fabb7524dd454daa942266e5565ce40e
              name: 'Health state rollup'
              type: DEPENDENT
              key: 'vmware.hv.sensor.health.state[{#SINGLETON}]'
              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;
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'vmware.hv.sensors.get[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
              tags:
                - tag: component
                  value: health
              trigger_prototypes:
                - uuid: 9f2a65161946436986aacf6c9a637673
                  expression: 'last(/VMware Hypervisor/vmware.hv.sensor.health.state[{#SINGLETON}])=3'
                  name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health 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.'
                  dependencies:
                    - name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Red'
                      expression: 'last(/VMware Hypervisor/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: dc4f84eb8d2143bb80999fbc58f38928
                  expression: 'last(/VMware Hypervisor/vmware.hv.sensor.health.state[{#SINGLETON}])=2'
                  name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Yellow'
                  priority: AVERAGE
                  description: 'One or more components in the appliance might soon become overloaded.'
                  dependencies:
                    - name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Red'
                      expression: 'last(/VMware Hypervisor/vmware.hv.sensor.health.state[{#SINGLETON}])=3'
                    - name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Red'
                      expression: 'last(/VMware Hypervisor/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=3'
                    - name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Yellow'
                      expression: 'last(/VMware Hypervisor/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=2'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
          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: cabe1fbdd4e04ef396afaa5dfd1a3423
          name: 'Network interface discovery'
          type: SIMPLE
          key: 'vmware.hv.net.if.discovery[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          delay: 1h
          username: '{$VMWARE.USERNAME}'
          password: '{$VMWARE.PASSWORD}'
          description: 'Discovery of VMware hypervisor network interfaces.'
          item_prototypes:
            - uuid: 706acba4535e4135b824d53763868a5f
              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}'
        - uuid: ace5c21254804024a6571a5d030383a0
          name: 'Sensor discovery'
          type: DEPENDENT
          key: vmware.hv.sensors.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: 'VMware Rollup Health State'
                operator: NOT_MATCHES_REGEX
              - macro: '{#NAME}'
                value: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          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: d9a7725ccb0647069b331c5e3e51aeaf
              name: 'Sensor [{#NAME}] health state'
              type: DEPENDENT
              key: 'vmware.hv.sensor.state["{#NAME}"]'
              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;
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              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: f591aa480fb94996be8225176bc9c95c
                  expression: 'last(/VMware Hypervisor/vmware.hv.sensor.state["{#NAME}"])=3'
                  name: 'VMware Hypervisor: Sensor [{#NAME}] health state 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.'
                  dependencies:
                    - name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Red'
                      expression: 'last(/VMware Hypervisor/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: c49e1b853f07417abb3812fd03da0bc3
                  expression: 'last(/VMware Hypervisor/vmware.hv.sensor.state["{#NAME}"])=2'
                  name: 'VMware Hypervisor: Sensor [{#NAME}] health state is Yellow'
                  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/vmware.hv.sensor.state["{#NAME}"])=3'
                    - name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Red'
                      expression: 'last(/VMware Hypervisor/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=3'
                    - name: 'VMware Hypervisor: The {$VMWARE.HV.UUID} health is Yellow'
                      expression: 'last(/VMware Hypervisor/vmware.hv.status[{$VMWARE.URL},{$VMWARE.HV.UUID}])=2'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
          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
        - uuid: 7f7ed06754fb4c59ac2d893b85169981
          name: 'Serial number discovery'
          type: DEPENDENT
          key: vmware.hv.serial.number.discovery
          description: 'VMware hypervisor serial number discovery. This item works only with VMware hypervisor versions above 6.7.'
          item_prototypes:
            - uuid: fcd12a13f97848b78b610e86a24417b2
              name: 'Serial number'
              type: SIMPLE
              key: 'vmware.hv.hw.serialnumber[{$VMWARE.URL},{#VMWARE.HV.UUID}]'
              delay: 1h
              value_type: CHAR
              username: '{$VMWARE.USERNAME}'
              password: '{$VMWARE.PASSWORD}'
              description: 'VMware hypervisor serial number.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: system
          master_item:
            key: 'vmware.hv.version[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  function isGtOrEqVersion(first_version, second_version) {
                  	var first = first_version.split('.').map(Number),
                  	second = second_version.split('.').map(Number);
                  
                  	if (first.length > second.length) {
                  		const max_componens_length = first.length
                  	}
                  	else {
                  		const max_componens_length = second.length
                  	}
                  
                  	var num_components = first.length;
                  	while (num_components < max_componens_length) {
                  		first.push(0);
                  		num_components = num_components +1;
                  	}
                  
                  	var num_components = second.length;
                  	while (num_components < max_componens_length) {
                  		second.push(0);
                  		num_components = num_components +1;
                  	}
                  
                  	if (first[0] > second[0] ||
                  		(first[0] === second[0] && first[1] > second[1]) ||
                  		(first[0] === second[0] && first[1] === second[1] && first[2] >= second[2])) {
                  		
                  		return true;
                  	}
                  
                  	return false;
                  }
                  
                  try {
                  	const vmware_version = value;
                  	const hypervisor_uuid = '{$VMWARE.HV.UUID}';
                  
                  	if (isGtOrEqVersion(vmware_version, '6.7.0')) {
                  		return JSON.stringify([{'{#VMWARE.HV.UUID}': hypervisor_uuid}]);
                  	}
                  
                  	return JSON.stringify([]);
                  }
                  catch (error) {
                  	Zabbix.log(3, '[ VMware Serial Number Discovery ] ERROR: ' + error);
                  	throw 'Failed to process data:' + error;
                  }
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: virtualization
        - tag: target
          value: vmware
        - tag: target
          value: vmware-hypervisor
      macros:
        - macro: '{$VMWARE.HV.DATASTORE.SPACE.CRIT}'
          value: '10'
          description: 'The critical threshold of the datastore free space.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Critical datastore free space threshold'
            description: 'Critical threshold of the datastore free space. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VMWARE.HV.DATASTORE.SPACE.WARN}'
          value: '20'
          description: 'The warning threshold of the datastore free space.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Warning datastore free space threshold'
            description: 'Warning threshold of the datastore free space. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VMWARE.HV.SENSOR.DISCOVERY}'
          value: 'FALSE'
          description: 'Set "true"/"false" to enable or disable the monitoring of hardware sensors.'
          config:
            type: CHECKBOX
            priority: '7'
            section_name: Filters
            label: 'Monitoring of hardware sensors'
            description: 'Whether it is necessary to monitor of hardware sensors.'
            options:
              - checked: 'true'
                unchecked: 'false'
        - macro: '{$VMWARE.HV.SENSOR.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of hardware sensor names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Include hardware sensors filter'
            description: 'Regex string to include hardware sensors by sensors name.'
        - 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.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Exclude hardware sensors filter'
            description: 'Regex string to exclude hardware sensors by sensors name.'
        - macro: '{$VMWARE.HV.UUID}'
          description: 'UUID of hypervisor.'
          config:
            type: TEXT
            priority: '4'
            label: 'Hypervisor UUID'
            description: 'UUID of hypervisor.'
            required: 'YES'
        - macro: '{$VMWARE.PASSWORD}'
          type: SECRET_TEXT
          description: 'VMware service `{$USERNAME}` user password.'
          config:
            type: TEXT
            priority: '3'
            label: 'VMware password'
            required: 'YES'
        - macro: '{$VMWARE.URL}'
          description: 'VMware service (vCenter or ESX hypervisor) SDK URL (https://servername/sdk).'
          config:
            type: TEXT
            priority: '1'
            label: 'VMware URL'
            description: 'URL for vCenter or ESX hypervisor (https://servername/sdk).'
            required: 'YES'
        - macro: '{$VMWARE.USERNAME}'
          description: 'VMware service user name.'
          config:
            type: TEXT
            priority: '2'
            label: 'VMware username'
            required: 'YES'
      dashboards:
        - uuid: 1d1da8e6d38a4ea5a99d39cc31a8c435
          name: 'Hypervisor overview'
          pages:
            - name: 'VMware: Hypervisor Overview'
              widgets:
                - type: gauge
                  name: 'CPU utilization'
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'CPU utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.cpu.utilization[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: item
                  name: 'Cluster name'
                  'y': '4'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.cluster.name[{$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: INTEGER
                      name: value_size
                      value: '35'
                - type: svggraph
                  name: 'Used memory'
                  'y': '6'
                  width: '51'
                  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'
                        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: item
                  name: 'Hypervisor ping'
                  x: '18'
                  width: '12'
                  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'
                        key: 'icmpping[]'
                    - 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: F44336
                    - 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: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: item
                  name: 'Datacenter name'
                  x: '18'
                  'y': '4'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.datacenter.name[{$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: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Overall status'
                  x: '30'
                  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'
                        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: item
                  name: 'Full name'
                  x: '36'
                  'y': '4'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.fullname[{$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: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Connection state'
                  x: '48'
                  width: '24'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        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: '48'
                  'y': '2'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        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: item
                  name: 'Total memory'
                  x: '51'
                  'y': '6'
                  width: '21'
                  height: '3'
                  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'
                        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: 'Used memory'
                  x: '51'
                  'y': '9'
                  width: '21'
                  height: '3'
                  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'
                        key: 'vmware.hv.memory.used[{$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: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: Version
                  x: '54'
                  'y': '4'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.version[{$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: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Number of guest VMs'
                  x: '60'
                  'y': '2'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        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: show.2
                      value: '4'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
            - name: 'VMware: CPU'
              widgets:
                - type: item
                  name: 'CPU cores'
                  width: '15'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.hw.cpu.num[{$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: INTEGER
                      name: value_bold
                      value: '0'
                - type: svggraph
                  name: 'CPU utilization'
                  'y': '2'
                  width: '72'
                  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'
                        key: 'vmware.hv.cpu.utilization[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: svggraph
                  name: 'CPU usage'
                  'y': '7'
                  width: '72'
                  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'
                        key: 'vmware.hv.cpu.usage[{$VMWARE.URL},{$VMWARE.HV.UUID}]'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAI
                - type: item
                  name: 'CPU threads'
                  x: '15'
                  width: '15'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.hw.cpu.threads[{$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: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'CPU frequency'
                  x: '30'
                  width: '15'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.hw.cpu.freq[{$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: INTEGER
                      name: units_bold
                      value: '0'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'CPU model'
                  x: '45'
                  width: '27'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.hw.cpu.model[{$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: 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'
                        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'
                        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'
                        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'
                        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'
                        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'
                        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'
                        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'
                        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'
                        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
            - name: 'VMware: Datastore'
              widgets:
                - type: honeycomb
                  name: 'Total size of datastore'
                  width: '24'
                  height: '4'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 81D4FA
                    - type: STRING
                      name: items.0
                      value: 'Total size of datastore*'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("datastore.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                - type: graphprototype
                  name: 'Average read IOps of the datastore'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.datastore.read[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},rps]'
                    - type: STRING
                      name: reference
                      value: AAAAK
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average read latency of the datastore'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.datastore.read[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},latency]'
                    - type: STRING
                      name: reference
                      value: AAAAP
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: honeycomb
                  name: 'Free space on datastore'
                  x: '24'
                  width: '24'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Free space on datastore*'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("datastore.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAL
                    - type: STRING
                      name: thresholds.0.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '10'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '20'
                    - type: STRING
                      name: thresholds.2.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '30'
                - type: graphprototype
                  name: 'Average write IOps of the datastore'
                  x: '36'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.datastore.write[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},rps]'
                    - type: STRING
                      name: reference
                      value: AAAAM
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Average write latency of the datastore'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.datastore.write[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},latency]'
                    - type: STRING
                      name: reference
                      value: AAAAN
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  name: 'Free space on datastore'
                  x: '48'
                  width: '24'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'VMware Hypervisor'
                        key: 'vmware.hv.datastore.size[{$VMWARE.URL},{$VMWARE.HV.UUID},{#DATASTORE.UUID},pfree]'
                    - type: STRING
                      name: reference
                      value: AAAAO
                    - type: INTEGER
                      name: source_type
                      value: '3'
      valuemaps:
        - uuid: 25d04e2838af4fcca9ddd21df6781497
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
        - uuid: 66bedf62dffd4402a037a6ef0f93f228
          name: 'VMware Connection state'
          mappings:
            - value: '0'
              newvalue: Connected
            - value: '1'
              newvalue: Disconnected
            - value: '2'
              newvalue: 'Not responding'
            - value: '3'
              newvalue: Unknown
        - uuid: 2b324fd8d7624874a3a81449b62c2cd6
          name: 'VMware status'
          mappings:
            - value: '0'
              newvalue: Gray
            - value: '1'
              newvalue: Green
            - value: '2'
              newvalue: Yellow
            - value: '3'
              newvalue: Red
  triggers:
    - uuid: d41ae1c102d84eab9629565bcc9b51df
      expression: '(min(/HashiCorp Nomad Client by HTTP/nomad.client.memory.available, 10m) / last(/HashiCorp Nomad Client by HTTP/nomad.client.memory.total))*100 <= {$NOMAD.RAM.AVAIL.MIN}'
      name: 'HashiCorp Nomad Client: High memory utilization'
      event_name: 'HashiCorp Nomad Client: High memory utilization: (available < {$NOMAD.RAM.AVAIL.MIN}% over last 10m)'
      opdata: 'RAM available: {ITEM.LASTVALUE1}, RAM total: {ITEM.LASTVALUE2}'
      priority: AVERAGE
      description: 'RAM utilization is too high. The system might be slow to respond.'
      tags:
        - tag: scope
          value: performance
    - uuid: 9b6d779864144e4e9e5e9924658d763e
      expression: 'min(/HashiCorp Nomad Server by HTTP/nomad.server.process_open_fds,5m)/last(/HashiCorp Nomad Server by HTTP/nomad.server.process_max_fds)*100>{$NOMAD.OPEN.FDS.MAX}'
      name: 'HashiCorp Nomad Server: Current number of open files is too high'
      event_name: 'HashiCorp Nomad Server: Current number of open files is too high (over {$NOMAD.OPEN.FDS.MAX}% for 5m)'
      priority: WARNING
      description: 'Heavy file descriptor usage (i.e., near the process file descriptor limit) indicates a potential file descriptor exhaustion issue.'
      tags:
        - tag: scope
          value: capacity
    - uuid: da703e83e2e146569c173fd9bc6988dd
      expression: '(now() - last(/VMware Guest/vmware.vm.property[{$VMWARE.URL},{$VMWARE.VM.UUID},runtime.bootTime]) < 10m) and last(/VMware Guest/vmware.vm.powerstate[{$VMWARE.URL},{$VMWARE.VM.UUID}]) = 1'
      name: 'VMware Guest: VM has been restarted'
      event_name: 'VMware Guest: VM has been restarted (uptime < 10m)'
      priority: WARNING
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      dependencies:
        - name: 'VMware Guest: Hypervisor is in the maintenance mode'
          expression: 'last(/VMware Guest/vmware.vm.hv.maintenance[{$VMWARE.URL},{$VMWARE.VM.UUID}])=1 and {$VMWARE.HYPERVISOR.MAINTENANCE}=1'
      tags:
        - tag: scope
          value: notice
  graphs:
    - uuid: a221474b1f494f8e85edfefd3a86b2ad
      name: 'HashiCorp Nomad Client: CPU utilization'
      type: STACKED
      graph_items:
        - color: 199C0D
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.cpu.idle
        - sortorder: '1'
          color: F63100
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.cpu.system
        - sortorder: '2'
          color: 00611C
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.cpu.total
        - sortorder: '3'
          color: F7941D
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.cpu.user
    - uuid: b36e33cf629444d096a222d4b806f10d
      name: 'HashiCorp Nomad Client: Memory allocation'
      type: STACKED
      graph_items:
        - color: 199C0D
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.allocated.memory
        - sortorder: '1'
          color: F63100
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.unallocated.memory
    - uuid: a5658f2456f745ca9de427ce3bc4fc98
      name: 'HashiCorp Nomad Client: Memory utilization'
      type: STACKED
      graph_items:
        - color: 199C0D
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.memory.available
        - sortorder: '1'
          color: F63100
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.memory.free
        - sortorder: '2'
          color: 00611C
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.memory.total
        - sortorder: '3'
          color: F7941D
          item:
            host: 'HashiCorp Nomad Client by HTTP'
            key: nomad.client.memory.used
    - uuid: 5028c6df64d3442f8fda2bb1fbc5f6e9
      name: 'HashiCorp Nomad Server: BoltDB operations'
      graph_items:
        - color: 199C0D
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.txstats.rebalance
        - sortorder: '1'
          color: F63100
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.txstats.spill
        - sortorder: '2'
          color: 00611C
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.txstats.split
        - sortorder: '3'
          color: F7941D
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.txstats.write
    - uuid: 71832cf8ab4c4607985719e19646fcc7
      name: 'HashiCorp Nomad Server: BoltDB pages'
      graph_items:
        - color: 199C0D
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.num_free_pages
        - sortorder: '1'
          color: F63100
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.txstats.page_count
        - sortorder: '2'
          color: 00611C
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.num_pending_pages
        - sortorder: '3'
          color: F7941D
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.txstats.page_alloc
    - uuid: cc4f2fccc25840f0ba2049554c360080
      name: 'HashiCorp Nomad Server: BoltDB timers'
      graph_items:
        - color: 199C0D
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.txstats.rebalance_time
        - sortorder: '1'
          color: F63100
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.txstats.spill_time
        - sortorder: '2'
          color: 00611C
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.boltdb.txstats.write_time
    - uuid: fb8cbf7d131445f6ade454b7b7e2e748
      name: 'HashiCorp Nomad Server: Raft timers'
      graph_items:
        - color: 199C0D
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.leader.dispatch_log
        - sortorder: '1'
          color: F63100
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.commit_time
        - sortorder: '2'
          color: 00611C
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.replication.appendEntries
        - sortorder: '3'
          color: F7941D
          item:
            host: 'HashiCorp Nomad Server by HTTP'
            key: nomad.server.raft.fsm.apply
    - uuid: aab06155f8aa4bc991603a3c8c335d6e
      name: 'Intel SR1630 IPMI: Fan speed and temperature'
      graph_items:
        - color: 199C0D
          item:
            host: 'Intel SR1630 IPMI'
            key: front_panel_temp
        - sortorder: '1'
          color: F63100
          item:
            host: 'Intel SR1630 IPMI'
            key: baseboard_temp
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Intel SR1630 IPMI'
            key: system_fan_2
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Intel SR1630 IPMI'
            key: system_fan_3
    - uuid: d4e77359d3fe4a75b0bbf9d7919834da
      name: 'Intel SR1630 IPMI: Voltage'
      graph_items:
        - color: 199C0D
          item:
            host: 'Intel SR1630 IPMI'
            key: power
        - sortorder: '1'
          color: F63100
          item:
            host: 'Intel SR1630 IPMI'
            key: bb_1.05v_pch
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Intel SR1630 IPMI'
            key: bb_3.3v
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Intel SR1630 IPMI'
            key: bb_3.3v_stby
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Intel SR1630 IPMI'
            key: bb_5.0v
