zabbix_export:
  version: '8.0'
  template_groups:
    - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
    - uuid: 36bff6c29af64692839d077febfc7079
      name: 'Templates/Network devices'
    - uuid: 1d12408342854fd5a4436dd6d5d1bd4a
      name: Templates/Telephony
    - uuid: d37f71c7e3f7469bab645852a69a2018
      name: 'Templates/Video surveillance'
  templates:
    - uuid: af21edc47557400583e537904ea632aa
      template: 'Aranet Cloud'
      name: 'Aranet Cloud'
      description: 'Generated by official Zabbix template tool "Templator"'
      wizard_ready: 'YES'
      readme: |
        ## Overview
        This Zabbix template enables monitoring of Aranet Cloud sensors via the Aranet Cloud API. It collects temperature, humidity, CO₂, and other environmental metrics from linked devices, providing real-time data visualization, alerting, and historical trends within Zabbix. Easy to configure and ideal for smart building, greenhouse, or industrial monitoring setups.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 56f89fce2b1541b7898ad56362d4b28a
          name: 'Get data'
          type: SCRIPT
          key: aranet.get_data
          history: '0'
          value_type: TEXT
          params: |
            var Aranet = {
            	params: {},
            	auth_token: null,
            	refresh_token: null,
            	space_id: null,
            
            	setParams: function (params) {
            		['api_endpoint', 'username', 'password', 'space_name'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined'
            					|| params[field] === '') {
            				throw 'Required param is not set: "' + field + '".';
            			}
            		});
            
            		Aranet.params = params;
            		if (typeof Aranet.params.api_endpoint === 'string') {
            			if (!Aranet.params.api_endpoint.endsWith('/')) {
            				Aranet.params.api_endpoint += '/';
            			}
            		}
            	},
            
            	request: function (method, query, data) {
            		var response,
            			request = new HttpRequest(),
            			url = Aranet.params.api_endpoint + query;
            
            		request.addHeader('Content-Type: application/json');
            
            		if (Aranet.auth_token !== null) {
            			request.addHeader('Authorization: Bearer ' + Aranet.auth_token);
            		}
            
            		if (typeof data !== 'undefined') {
            			data = JSON.stringify(data);
            		}
            
            		switch (method) {
            			case 'get':
            				response = request.get(url, data);
            				break;
            
            			case 'post':
            				response = request.post(url, data);
            				break;
            
            			default:
            				throw 'Unsupported HTTP request method: ' + method;
            		}
            
            		Zabbix.log(4, '[ Aranet scraper ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() < 200 || request.getStatus() >= 300) {
            			var message = 'Request failed with status code ' + request.getStatus();
            
            			message += ': ' + response;
            			throw message;
            		}
            
            		if (response !== null) {
            			try {
            				response = JSON.parse(response);
            			}
            			catch (error) {
            				throw 'Failed to parse response received from Aranet Cloud. Check debug log for more information.';
            			}
            		}
            
            		return {
            			status: request.getStatus(),
            			response: response
            		};
            	},
            
            	login: function () {
            		var result,
            			data = {
            				login: Aranet.params.username,
            				passw: Aranet.params.password
            			};
            
            		result = Aranet.request('post', 'user/login', data);
            		if (typeof result.response !== 'object'
            				|| typeof result.response.auth === 'undefined'
            				|| result.status != 200) {
            			throw 'Cannot login to Aranet Cloud. Check debug log for more information.';
            		}
            
            		Aranet.auth_token = result.response.auth;
            		Aranet.refresh_token = result.response.refresh;
            
            		var spaces = result.response.spaces;
            		for (var key in spaces) {
            			if (spaces[key] == Aranet.params.space_name) {
            				Aranet.space_id = key;
            				break;
            			}
            		}
            
            		return result.response;
            	},
            
            	logout: function () {
            		var result,
            			data = {
            				refresh: Aranet.refresh_token
            			};
            
            		try {
            			result = Aranet.request('post', 'user/logout', data);
            			if (result.status != 204) {
            				throw 'Cannot logout from Aranet Cloud ' + request.getStatus() + ': ' + result.response;
            			}
            		}
            		catch (error) {
            			Zabbix.log(4, '[ Aranet scraper ] ' + error)
            		}
            	},
            
            	getMetrics: function () {
            		var result = Aranet.request('get', 'metrics/' + Aranet.space_id);
            
            		if (typeof result.response !== 'object'
            				|| typeof result.response.data === 'undefined'
            				|| result.status != 200) {
            			throw 'Cannot get metrics data from Aranet Cloud. Check debug log for more information.';
            		};
            
            		return result.response;
            	},
            
            	getSensors: function () {
            		var result = Aranet.request('get', 'sensors/' + Aranet.space_id + '?fields=devices,metrics,telemetry,name');
            
            		if (typeof result.response !== 'object'
            				|| typeof result.response.data === 'undefined'
            				|| result.status != 200) {
            			throw 'Cannot get sensors data from Aranet Cloud. Check debug log for more information.';
            		};
            
            		return result.response;
            	},
            
            	getGateways: function () {
            		var result = Aranet.request('get', 'gateways/' + Aranet.space_id);
            
            		if (typeof result.response !== 'object'
            			|| typeof result.response.devices === 'undefined'
            			|| result.status != 200) {
            			throw 'Cannot get gateways data from Aranet Cloud. Check debug log for more information.';
            		};
            
            		return result.response;
            	}
            }
            
            var processed_metrics = {},
            	processed_sensors = [];
            
            try {
            	Aranet.setParams(JSON.parse(value));
            
            	Aranet.login();
            
            	var raw_metrics = Aranet.getMetrics(),
            		raw_sensors = Aranet.getSensors(),
            		raw_gateways = Aranet.getGateways();
            
            	Aranet.logout();
            
            	var items = raw_metrics.data.items;
            	for (item_idx in items) {
            		var unit_name,
            			units = items[item_idx].units;
            
            		units.some(function (unit) {
            			unit_name = unit.name;
            			if (unit.selected) {
            				return true;
            			}
            		});
            
            		processed_metrics[items[item_idx].id] = {
            			name: items[item_idx].name,
            			unit: unit_name
            		}
            
            		delete items[item_idx];
            	}
            
            	var items = raw_sensors.data.items;
            	for (item_idx in items) {
            		var upd_ts = 0,
            			gateway = {},
            			sensor_metrics = [],
            			metrics = items[item_idx].metrics,
            			telemetry = items[item_idx].telemetry;
            
            		for (m_idx in metrics) {
            			var unit = processed_metrics[metrics[m_idx].id];
            
            			if (upd_ts < metrics[m_idx].t) {
            				upd_ts = metrics[m_idx].t;
            			}
            
            			sensor_metrics.push({
            				name: unit.name,
            				unit: unit.unit,
            				value: metrics[m_idx].v
            			});
            		}
            
            		for (var t_idx in telemetry) {
            			var unit = processed_metrics[telemetry[t_idx].id];
            
            			if (upd_ts < telemetry[t_idx].t) {
            				upd_ts = telemetry[t_idx].t;
            			}
            
            			sensor_metrics.push({
            				name: unit.name,
            				unit: unit.unit,
            				value: telemetry[t_idx].v
            			});
            		}
            
            		raw_gateways.devices.some(function (dev) {
            			if (items[item_idx].devices[0].id === dev.id) {
            				gateway = {
            					id: dev.id,
            					name: dev.device
            				}
            				return true;
            			}
            		})
            
            		if (upd_ts) {
            			sensor_metrics.push({
            				name: 'Last update',
            				unit: 's',
            				value: upd_ts
            			});
            		}
            
            		var sensor_id = parseInt(items[item_idx].id).toString(16).slice(-5);
            
            		processed_sensors.push({
            			id: sensor_id,
            			name: items[item_idx].name.trim() === '' ? sensor_id : items[item_idx].name,
            			gateway: gateway,
            			metrics: sensor_metrics
            		});
            
            		delete items[item_idx];
            	}
            
            	return JSON.stringify(processed_sensors);
            }
            catch (error) {
            	Zabbix.log(3, '[ Aranet scraper ] ERROR: ' + error);
            	throw 'Scraping failed: ' + error;
            }
          timeout: 10s
          parameters:
            - name: api_endpoint
              value: '{$ARANET.API.ENDPOINT}'
            - name: password
              value: '{$ARANET.API.PASSWORD}'
            - name: space_name
              value: '{$ARANET.API.SPACE_NAME}'
            - name: username
              value: '{$ARANET.API.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: 92fb73948fa74de8a6a219397b77b570
          name: 'Sensors discovery'
          type: DEPENDENT
          key: aranet.sensor.discovery
          history: '0'
          value_type: TEXT
          description: 'Discovery for Aranet Cloud sensors'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var input = JSON.parse(value),
                  	output = [];
                  
                  input.forEach(function (sensor) {
                  	sensor.metrics.forEach(function (metric) {
                  		output.push(
                  			{
                  				'{#SENSOR_ID}': sensor.id,
                  				'{#SENSOR_NAME}': sensor.name,
                  				'{#GATEWAY_ID}': sensor.gateway.id,
                  				'{#GATEWAY_NAME}': sensor.gateway.name,
                  				'{#METRIC}': metric.name,
                  				'{#UNIT}': metric.unit
                  			}
                  		);
                  	})
                  });
                  
                  return JSON.stringify(output);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 15m
          master_item:
            key: aranet.get_data
          tags:
            - tag: component
              value: discovery
            - tag: component
              value: raw
      discovery_rules:
        - uuid: c4d177c29cb34e87b6bec0d22bd3ae23
          name: 'Battery voltage discovery'
          type: DEPENDENT
          key: aranet.battery.voltage.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: 'Battery voltage'
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Battery voltage sensors'
          item_prototypes:
            - uuid: b5fca30b1433461f82ea7fe5c72687ef
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.battery.voltage["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
              trigger_prototypes:
                - uuid: 6a931421d804418085e586dfc0e11311
                  expression: 'max(/Aranet Cloud/aranet.battery.voltage["{#GATEWAY_ID}", "{#SENSOR_ID}"],5m) < {$ARANET.BATT.VOLTAGE.MIN.CRIT:"{#SENSOR_NAME}"}'
                  name: 'Aranet: {#METRIC}: Critically low battery voltage on "[{#GATEWAY_NAME}] {#SENSOR_NAME}"'
                  event_name: 'Aranet: {#METRIC}: Critically low battery voltage on "[{#GATEWAY_NAME}] {#SENSOR_NAME}" (below {$ARANET.BATT.VOLTAGE.MIN.CRIT:"{#SENSOR_NAME}"}{#UNIT} for 5m)'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: d729130760f9418baa40fb9eeb8a3ca4
                  expression: 'max(/Aranet Cloud/aranet.battery.voltage["{#GATEWAY_ID}", "{#SENSOR_ID}"],5m) < {$ARANET.BATT.VOLTAGE.MIN.WARN:"{#SENSOR_NAME}"}'
                  name: 'Aranet: {#METRIC}: Low battery voltage on "[{#GATEWAY_NAME}] {#SENSOR_NAME}"'
                  event_name: 'Aranet: {#METRIC}: Low battery voltage on "[{#GATEWAY_NAME}] {#SENSOR_NAME}" (below {$ARANET.BATT.VOLTAGE.MIN.WARN:"{#SENSOR_NAME}"}{#UNIT} for 5m)'
                  priority: WARNING
                  dependencies:
                    - name: 'Aranet: {#METRIC}: Critically low battery voltage on "[{#GATEWAY_NAME}] {#SENSOR_NAME}"'
                      expression: 'max(/Aranet Cloud/aranet.battery.voltage["{#GATEWAY_ID}", "{#SENSOR_ID}"],5m) < {$ARANET.BATT.VOLTAGE.MIN.CRIT:"{#SENSOR_NAME}"}'
                  tags:
                    - tag: scope
                      value: capacity
          master_item:
            key: aranet.sensor.discovery
        - uuid: f10b45e1e1024cb19ea8a705281e61fc
          name: 'CO2 discovery'
          type: DEPENDENT
          key: aranet.co2.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: CO₂
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud CO2 sensors'
          item_prototypes:
            - uuid: 5057bec2a8d0446cb3515f1771e30d41
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.co2["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
              trigger_prototypes:
                - uuid: 9d88ae8357b444728c63844462d25f83
                  expression: 'min(/Aranet Cloud/aranet.co2["{#GATEWAY_ID}", "{#SENSOR_ID}"],5m) > {$ARANET.CO2.MAX.CRIT:"{#SENSOR_NAME}"}'
                  name: 'Aranet: {#METRIC}: Critically high CO2 level on "[{#GATEWAY_NAME}] {#SENSOR_NAME}"'
                  event_name: 'Aranet: {#METRIC}: Critically high CO2 level on "[{#GATEWAY_NAME}] {#SENSOR_NAME}" (over {$ARANET.CO2.MAX.CRIT:"{#SENSOR_NAME}"}{#UNIT} for 5m)'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: notice
                - uuid: cc54c75ee607485981388da0f7f99ea2
                  expression: 'min(/Aranet Cloud/aranet.co2["{#GATEWAY_ID}", "{#SENSOR_ID}"],5m) > {$ARANET.CO2.MAX.WARN:"{#SENSOR_NAME}"}'
                  name: 'Aranet: {#METRIC}: High CO2 level on "[{#GATEWAY_NAME}] {#SENSOR_NAME}"'
                  event_name: 'Aranet: {#METRIC}: High CO2 level on "[{#GATEWAY_NAME}] {#SENSOR_NAME}" (over {$ARANET.CO2.MAX.WARN:"{#SENSOR_NAME}"}{#UNIT} for 5m)'
                  priority: WARNING
                  dependencies:
                    - name: 'Aranet: {#METRIC}: Critically high CO2 level on "[{#GATEWAY_NAME}] {#SENSOR_NAME}"'
                      expression: 'min(/Aranet Cloud/aranet.co2["{#GATEWAY_ID}", "{#SENSOR_ID}"],5m) > {$ARANET.CO2.MAX.CRIT:"{#SENSOR_NAME}"}'
                  tags:
                    - tag: scope
                      value: notice
          master_item:
            key: aranet.sensor.discovery
        - uuid: c42c2ae80f0d40688031f0ef3adb4dfb
          name: 'Current discovery'
          type: DEPENDENT
          key: aranet.current.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: Current
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Current sensors'
          item_prototypes:
            - uuid: 68434a6b6881497b8f7892b00044e3e7
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.current["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 0d5eca62cf6e4db8abed33e7ad907925
          name: 'Differential Pressure discovery'
          type: DEPENDENT
          key: aranet.diff_pressure.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: 'Differential Pressure'
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Differential Pressure sensors'
          item_prototypes:
            - uuid: d02fa9c559af492d8f23503c6c0e6b67
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.diff_pressure["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: b9f0950111b6488098c79a60b2a444d6
          name: 'Distance discovery'
          type: DEPENDENT
          key: aranet.distance.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: Distance
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Distance sensors'
          item_prototypes:
            - uuid: 4a2dd84d9be34e39b4b8e0c03199ebec
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.distance["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 7cf9f5296e784045a86aa0fc7bb1ba69
          name: 'Humidity discovery'
          type: DEPENDENT
          key: aranet.humidity.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: Humidity
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud humidity sensors'
          item_prototypes:
            - uuid: b0b25cd929fe493e8db07b19f64e623a
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.humidity["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
              trigger_prototypes:
                - uuid: 9697528bedd64aca9da1e6343182fe0c
                  expression: 'min(/Aranet Cloud/aranet.humidity["{#GATEWAY_ID}", "{#SENSOR_ID}"],5m) > {$ARANET.HUMIDITY.MAX.WARN:"{#SENSOR_NAME}"}'
                  name: 'Aranet: {#METRIC}: High humidity on "[{#GATEWAY_NAME}] {#SENSOR_NAME}"'
                  event_name: 'Aranet: {#METRIC}: High humidity on "[{#GATEWAY_NAME}] {#SENSOR_NAME}" (over {$ARANET.HUMIDITY.MAX.WARN:"{#SENSOR_NAME}"}{#UNIT} for 5m)'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 85c1be625bc940588671bc43e6ed6a8a
                  expression: 'max(/Aranet Cloud/aranet.humidity["{#GATEWAY_ID}", "{#SENSOR_ID}"],5m) < {$ARANET.HUMIDITY.MIN.WARN:"{#SENSOR_NAME}"}'
                  name: 'Aranet: {#METRIC}: Low humidity on "[{#GATEWAY_NAME}] {#SENSOR_NAME}"'
                  event_name: 'Aranet: {#METRIC}: Low humidity on "[{#GATEWAY_NAME}] {#SENSOR_NAME}" (below {$ARANET.HUMIDITY.MIN.WARN:"{#SENSOR_NAME}"}{#UNIT} for 5m)'
                  priority: WARNING
                  dependencies:
                    - name: 'Aranet: {#METRIC}: High humidity on "[{#GATEWAY_NAME}] {#SENSOR_NAME}"'
                      expression: 'min(/Aranet Cloud/aranet.humidity["{#GATEWAY_ID}", "{#SENSOR_ID}"],5m) > {$ARANET.HUMIDITY.MAX.WARN:"{#SENSOR_NAME}"}'
                  tags:
                    - tag: scope
                      value: notice
          master_item:
            key: aranet.sensor.discovery
        - uuid: 144396930b4b4049acb4bfd7b183a6f7
          name: 'Illuminance discovery'
          type: DEPENDENT
          key: aranet.illuminance.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: Illuminance
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Illuminance sensors'
          item_prototypes:
            - uuid: 0617cbdf99844d82a469bf600c94bcfa
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.illuminance["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 16b57e7a700c4041b787a8916442cd59
          name: 'Last update discovery'
          type: DEPENDENT
          key: aranet.last_update.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: 'Last update'
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Last update metric'
          item_prototypes:
            - uuid: 296198c168694dc0bd0af5d1cc07cc0e
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.last_update["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
                - type: JAVASCRIPT
                  parameters:
                    - 'return Math.floor(Date.now()/1000 - Number(value));'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
              trigger_prototypes:
                - uuid: b0aa8bb4e07e47b5824595b824081d75
                  expression: 'last(/Aranet Cloud/aranet.last_update["{#GATEWAY_ID}", "{#SENSOR_ID}"]) > {$ARANET.LAST_UPDATE.MAX.WARN:"{#SENSOR_NAME}"}'
                  name: 'Aranet: {#METRIC}: Sensor data "[{#GATEWAY_NAME}] {#SENSOR_NAME}" is not updated'
                  event_name: 'Aranet: {#METRIC}: Sensor data "[{#GATEWAY_NAME}] {#SENSOR_NAME}" is not updated (more than {$ARANET.LAST_UPDATE.MAX.WARN:"{#SENSOR_NAME}"})'
                  priority: WARNING
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: aranet.sensor.discovery
        - uuid: 9b33a2810e644c3c998d431a4a860993
          name: 'pH discovery'
          type: DEPENDENT
          key: aranet.ph.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: pH
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud pH sensors'
          item_prototypes:
            - uuid: ad6f3af944a04305a196ff60bdae078f
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.ph["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 1763029f67494745a2f52c980ae86b9c
          name: 'Pore Electrical Conductivity discovery'
          type: DEPENDENT
          key: aranet.pore_electric_cond.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: 'Pore Electrical Conductivity'
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Pore Electrical Conductivity sensors'
          item_prototypes:
            - uuid: 4610a3ef84e54ddeb778e4f1c9e7ab8a
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.pore_electric_cond["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: c1a3941026c24d178a494de66c7be2cc
          name: 'PPFD discovery'
          type: DEPENDENT
          key: aranet.ppfd.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: PPFD
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud PPFD sensors'
          item_prototypes:
            - uuid: 7f41b6f57a024e4fa632268bec66fdd3
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.ppfd["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 11a77f7018ca4b8f92f65888e3e2a237
          name: 'Atmospheric pressure discovery'
          type: DEPENDENT
          key: aranet.pressure.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: 'Atmospheric Pressure'
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud atmospheric pressure sensors'
          item_prototypes:
            - uuid: 3534343a6f78415e94b52f791a1a419a
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.pressure["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 6d5e1eebba704d5e88aa67ed029d95ca
          name: 'Pulses discovery'
          type: DEPENDENT
          key: aranet.pulses.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: Pulses
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Pulses sensors'
          item_prototypes:
            - uuid: 471e5f773216407e819c840161562d1e
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.pulses["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 92f27211f4dd4f61b7939cf8b07fc959
          name: 'Pulses Cumulative discovery'
          type: DEPENDENT
          key: aranet.pulses_cumulative.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: 'Pulses Cumulative'
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Pulses Cumulative sensors'
          item_prototypes:
            - uuid: da698f1bec144ab8aa8d960669c385d5
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.pulses_cumulative["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 2caab3aefe0b498588aa3ec0d8578e09
          name: 'RSSI discovery'
          type: DEPENDENT
          key: aranet.rssi.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: RSSI
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud RSSI sensors'
          item_prototypes:
            - uuid: eefb5804ec224d26a3050246907c35aa
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.rssi["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 4d6116d2bd3049b9bb550e1d77338b2e
          name: 'Soil Dielectric Permittivity discovery'
          type: DEPENDENT
          key: aranet.soil_dielectric_perm.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: 'Soil Dielectric Permittivity'
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Soil Dielectric Permittivity sensors'
          item_prototypes:
            - uuid: 53b7bb6bab76432f95599917e61a3ea7
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.soil_dielectric_perm["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: e44cc900de3b4353bbccc6f01388c103
          name: 'Soil Electrical Conductivity discovery'
          type: DEPENDENT
          key: aranet.soil_electric_cond.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: 'Soil Electrical Conductivity'
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Soil Electrical Conductivity sensors'
          item_prototypes:
            - uuid: 2f73f57b147c4d3498bd46a4048e2418
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.soil_electric_cond["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 215affa3d0d34aa2b27be4ec75ba3349
          name: 'Temperature discovery'
          type: DEPENDENT
          key: aranet.temp.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: Temperature
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud temperature sensors'
          item_prototypes:
            - uuid: 86a562af26184359ac7d2287c6bd87c6
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.temp["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 9e9bf9e27be743368c50036f02fab572
          name: 'Voltage discovery'
          type: DEPENDENT
          key: aranet.voltage.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: Voltage
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Voltage sensors'
          item_prototypes:
            - uuid: 461f54e7c7ce4658b8acc83be8d6906c
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.voltage["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: c059e164b01242b78ab8505d12c2d291
          name: 'Volumetric Water Content discovery'
          type: DEPENDENT
          key: aranet.volum_water_content.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: 'Volumetric Water Content'
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Volumetric Water Content sensors'
          item_prototypes:
            - uuid: 8a03e78d9f4145b58c55d04189b90423
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.volumetric.water.content["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
        - uuid: 414889299c224d748c857fcf028d9e96
          name: 'Weight discovery'
          type: DEPENDENT
          key: aranet.weight.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GATEWAY_ID}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
              - macro: '{#GATEWAY_NAME}'
                value: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#METRIC}'
                value: Weight
              - macro: '{#SENSOR_ID}'
                value: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
              - macro: '{#SENSOR_NAME}'
                value: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for Aranet Cloud Weight sensors'
          item_prototypes:
            - uuid: 6eb5e840b089469ca644a20bcb7739d4
              name: '{#METRIC}: [{#GATEWAY_NAME}] {#SENSOR_NAME}'
              type: DEPENDENT
              key: 'aranet.weight["{#GATEWAY_ID}", "{#SENSOR_ID}"]'
              value_type: FLOAT
              units: '{#UNIT}'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.id == "{#SENSOR_ID}" && @.name == "{#SENSOR_NAME}")].metrics[?(@.name == "{#METRIC}")].value.first()'
              master_item:
                key: aranet.get_data
              tags:
                - tag: component
                  value: '{#METRIC}'
          master_item:
            key: aranet.sensor.discovery
      tags:
        - tag: class
          value: iot
        - tag: class
          value: software
        - tag: subclass
          value: monitoring
        - tag: target
          value: aranet
      macros:
        - macro: '{$ARANET.API.ENDPOINT}'
          value: 'https://aranet.cloud/api'
          description: 'Aranet Cloud API endpoint.'
          config:
            type: TEXT
            priority: '1'
            label: 'API URL'
            description: 'Aranet Cloud API endpoint.'
            required: 'YES'
        - macro: '{$ARANET.API.PASSWORD}'
          description: 'Aranet Cloud password.'
          config:
            type: TEXT
            priority: '3'
            label: Password
            description: 'Aranet Cloud password.'
            required: 'YES'
        - macro: '{$ARANET.API.SPACE_NAME}'
          description: 'Aranet Cloud organization name.'
          config:
            type: TEXT
            priority: '4'
            label: Organization
            description: 'Aranet Cloud organization name.'
            required: 'YES'
        - macro: '{$ARANET.API.USERNAME}'
          description: 'Aranet Cloud username.'
          config:
            type: TEXT
            priority: '2'
            label: Username
            description: 'Aranet Cloud username.'
            required: 'YES'
        - macro: '{$ARANET.BATT.VOLTAGE.MIN.CRIT}'
          value: '2'
          description: 'Battery voltage critical threshold.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'Battery critical'
            description: 'Battery voltage critical threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ARANET.BATT.VOLTAGE.MIN.WARN}'
          value: '1'
          description: 'Battery voltage warning threshold.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Battery warning'
            description: 'Battery voltage warning threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ARANET.CO2.MAX.CRIT}'
          value: '1000'
          description: 'CO2 critical threshold.'
          config:
            type: TEXT
            priority: '16'
            section_name: Thresholds
            label: 'CO2 critical'
            description: 'CO2 critical threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ARANET.CO2.MAX.WARN}'
          value: '600'
          description: 'CO2 warning threshold.'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'CO2 warning'
            description: 'CO2 warning threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ARANET.HUMIDITY.MAX.WARN}'
          value: '70'
          description: 'Maximum humidity threshold.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'Max humidity'
            description: 'Maximum humidity threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ARANET.HUMIDITY.MIN.WARN}'
          value: '20'
          description: 'Minimum humidity threshold.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Min humidity'
            description: 'Minimum humidity threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ARANET.LAST_UPDATE.MAX.WARN}'
          value: 1h
          description: 'Data update delay threshold.'
          config:
            type: TEXT
            priority: '17'
            section_name: Thresholds
            label: 'Update delay'
            description: 'Data update delay threshold.'
        - macro: '{$ARANET.LLD.FILTER.GATEWAY_ID.MATCHES}'
          value: .+
          description: 'Filter of discoverable sensors by gateway id.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Sensors filter (by gateway ID)'
            description: 'Filter of discoverable sensors by gateway id.'
        - macro: '{$ARANET.LLD.FILTER.GATEWAY_NAME.MATCHES}'
          value: .+
          description: 'Filter of discoverable sensors by gateway name.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Sensors filter (by gateway name)'
            description: 'Filter of discoverable sensors by gateway name.'
        - macro: '{$ARANET.LLD.FILTER.GATEWAY_NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable sensors by gateway name.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Sensors filter (exclude gateway)'
            description: 'Filter to exclude discoverable sensors by gateway name.'
        - macro: '{$ARANET.LLD.FILTER.SENSOR_ID.MATCHES}'
          value: .+
          description: 'Filter of discoverable sensors by id.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Sensors filter (by ID)'
            description: 'Filter of discoverable sensors by id.'
        - macro: '{$ARANET.LLD.FILTER.SENSOR_NAME.MATCHES}'
          value: .+
          description: 'Filter of discoverable sensors by name.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Sensors filter (include)'
            description: 'Filter of discoverable sensors by name.'
        - macro: '{$ARANET.LLD.FILTER.SENSOR_NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable sensors by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Sensors filter (exclude)'
            description: 'Filter to exclude discoverable sensors by name.'
    - uuid: 30cc187a4e994c39b07f53d86b5cc6bc
      template: 'Asterisk by HTTP'
      name: 'Asterisk by HTTP'
      description: |
        The template gets Asterisk metrics from AMI by HTTP agent.
        You should enable the mini-HTTP Server, add the option webenabled=yes in the general section of the manager.conf file and create Asterisk Manager user with system and command write permissions within your Asterisk instance.
        Disable the PJSIP driver if you do not use PJSIP or do not have PJSIP endpoints.
        Please, define AMI address in the {$AMI.URL} macro. Also, set the hostname or IP address of the AMI host in the {$AMI.HOST} macro for Zabbix to check Asterisk service status.
        Then you can define {$AMI.USERNAME} and {$AMI.SECRET} macros in the template for using on the host level.
        If there are errors, increase the logging to debug level and see the Zabbix server log.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/410060-discussion-thread-for-official-zabbix-template-asterisk
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        The template for monitoring Asterisk over HTTP that works without any external scripts.
        It collects metrics by polling the Asterisk Manager API remotely using an HTTP agent and JS preprocessing.
        All metrics are collected at once, thanks to Zabbix's bulk data collection.
        
        ## Setup
        
        You should enable the mini-HTTP Server, add the option webenabled=yes in the general section of the manager.conf file and create Asterisk Manager user with system and command write permissions within your Asterisk instance. 
        Disable the PJSIP driver if you do not use PJSIP or do not have PJSIP endpoints.
        Please, define AMI address in the `AMI API URL` host wizard configuration field. Also, set the hostname or IP address of the AMI host in the `AMI host` host wizard configuration field for Zabbix to check Asterisk service status.
        Then you can define `AMI manager name` and `AMI manager secret` host wizard configuration fields in the template for using on the host level.
        If there are errors, increase the logging to debug level and see the Zabbix server log.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Telephony
      items:
        - uuid: 72d074f6bb214ef9884d8cc4b1530ad3
          name: 'Active calls'
          type: DEPENDENT
          key: asterisk.active_calls
          description: 'The number of active calls at the moment.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.active_calls
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: calls
        - uuid: bb9ac1ac188b43239456477e13ae555f
          name: 'Active channels'
          type: DEPENDENT
          key: asterisk.active_channels
          description: 'The number of active channels at the moment.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.active_channels
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: channels
        - uuid: ccfc2a8a5880430196e2c874b66370ca
          name: 'Calls processed'
          type: DEPENDENT
          key: asterisk.calls_processed
          description: 'The number of calls processed after the last service restart.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.calls_processed
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: calls
        - uuid: 196af875a190438abd8de5a6803a550f
          name: 'Calls processed per second'
          type: DEPENDENT
          key: asterisk.calls_processed.rate
          value_type: FLOAT
          description: 'The number of calls processed per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.calls_processed
            - type: CHANGE_PER_SECOND
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: calls
        - uuid: 7db3e9cdae3d4bffa7429617e351fce1
          name: 'Get stats'
          type: HTTP_AGENT
          key: asterisk.get_stats
          history: '0'
          value_type: TEXT
          description: 'Asterisk system information in JSON format.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var Ami = {
                  	params: {
                  		url: '{$AMI.URL}',
                  		trunk: '{$AMI.TRUNK_REGEXP}'
                  	},
                  	api_request: new HttpRequest(),
                  
                  	request: function (url, action) {
                  		url += action;
                  		Zabbix.log(4, '[ Asterisk ] Sending request: ' + url);
                  		try {
                  			response = Ami.api_request.get(url);
                  		} catch (error) {
                  			Zabbix.log(4, '[ Asterisk ] Get request returned error ' + error);
                  			throw 'Get request returned error ' + error + '. Check debug log for more information.';
                  		}
                  		Zabbix.log(4, '[ Asterisk ] Received response with status code ' +
                  			Ami.api_request.getStatus() + '\n' + response);
                  
                  		if (Ami.api_request.getStatus() !== 200) {
                  			var message = 'Request failed with status code ' + Ami.api_request.getStatus();
                  			if (response !== null) {
                  				if (typeof response.message === 'string') {
                  					message += ': ' + response.message;
                  				}
                  			}
                  
                  			throw message + ' Check debug log for more information.';
                  		}
                  
                  		var match = response.match('Response: (.+)');
                  		if (match !== null && match[1] !== 'Success' && match[1] !== 'Goodbye' && match[1] !== 'Follows') {
                  			var responseText = match[1],
                  				message = 'Request failed with message ' + match[1];
                  
                  			match = response.match('Message: (.+)');
                  			if (match !== null && match[1]) {
                  				var responseMessage = match[1];
                  				message += ': ' + match[1];
                  			}
                  			if (responseText !== 'Error' || responseMessage !== 'No endpoints found') {
                  				throw message + '. Check debug log for more information.';
                  			}
                  		}
                  
                  		return {
                  			status: Ami.api_request.getStatus(),
                  			body: response
                  		};
                  	}
                  };
                  
                  var asterisk = {
                  	version: '',
                  	uptime: 0,
                  	uptime_reload: 0,
                  	active_channels: 0,
                  	active_calls: 0,
                  	calls_processed: 0,
                  	sip: {
                  		trunks: [],
                  		monitored_online: 0,
                  		monitored_offline: 0,
                  		unmonitored_online: 0,
                  		unmonitored_offline: 0,
                  		active_channels: 0,
                  		total: 0
                  	},
                  	iax: {
                  		trunks: [],
                  		online: 0,
                  		offline: 0,
                  		unmonitored: 0,
                  		active_channels: 0,
                  		total: 0
                  	},
                  	pjsip: {
                  		trunks: [],
                  		available: 0,
                  		unavailable: 0,
                  		active_channels: 0,
                  		total: 0
                  	},
                  	queue: {
                  		queues: [],
                  		total: 0
                  	}
                  };
                  
                  function block2Object(text) {
                  	var parts = [],
                  		dict = {};
                  
                  	text = text.replace(/^Output: /gm, '');
                  
                  	text.split('\n').forEach(function (line) {
                  		parts = line.split(':');
                  		if (parts.length > 1) {
                  			dict[parts.shift().trim()] = parts.join(':').trim();
                  		}
                  	})
                  
                  	return dict;
                  }
                  
                  function text2Object(text) {
                  	var blocks = text.split('\r\n\r\n'),
                  		arr = [],
                  		i = 1,
                  		j = blocks.length - 2;
                  
                  	for (i; i < j; i++) {
                  		arr.push(block2Object(blocks[i]));
                  	}
                  
                  	return arr;
                  }
                  
                  function getSipPeers() {
                  	var response = Ami.request(url, 'SIPpeers'),
                  		elements = text2Object(response.body);
                  	asterisk.sip.total = elements.length;
                  	asterisk.sip.trunks = elements.filter(function (element) {
                  		return element.ObjectName.search(Ami.params.trunk) != -1;
                  	});
                  	elements.forEach(function (element) {
                  		if (element.IPaddress === '-none-') {
                  			switch (element.Status) {
                  				case 'Unmonitored':
                  					asterisk.sip.unmonitored_offline++;
                  					break;
                  
                  				case 'UNKNOWN':
                  					asterisk.sip.monitored_offline++;
                  					break;
                  			}
                  		}
                  		else {
                  			if (element.Status === 'Unmonitored') {
                  				asterisk.sip.unmonitored_online++;
                  			}
                  			else {
                  				asterisk.sip.monitored_online++;
                  				if (element.Status.search('^OK') != -1) {
                  					element.Status = element.Status.split(' ')[0];
                  				}
                  			}
                  		}
                  	});
                  	asterisk.sip.trunks.forEach(function (trunk) {
                  		var active_channels = channels.match(new RegExp('[^!J]SIP/' + escapeChars(trunk.ObjectName), 'g'));
                  		trunk.active_channels = (active_channels === null) ? 0 : active_channels.length;
                  		asterisk.sip.active_channels += trunk.active_channels;
                  	});
                  }
                  
                  function getIaxPeerList() {
                  	response = Ami.request(url, 'IAXpeerlist');
                  	elements = text2Object(response.body);
                  	asterisk.iax.total = elements.length;
                  	asterisk.iax.trunks = elements.filter(function (element) {
                  		return element.ObjectName.search(Ami.params.trunk) != -1;
                  	});
                  	elements.forEach(function (element) {
                  		if (element.Status.search('^OK') != -1) {
                  			element.Status = element.Status.split(' ')[0];
                  		}
                  		switch (element.Status) {
                  			case 'Unmonitored':
                  				asterisk.iax.unmonitored++;
                  				break;
                  
                  			case 'UNKNOWN':
                  				asterisk.iax.offline++;
                  				break;
                  		}
                  	});
                  	asterisk.iax.online = asterisk.iax.total - asterisk.iax.offline;
                  	asterisk.iax.trunks.forEach(function (trunk) {
                  		var active_channels = channels.match(new RegExp('[^!](IAX2/' + escapeChars(trunk.ObjectName) +
                  			'|IAX2/' + escapeChars(trunk.ObjectUsername) + ')', 'g'));
                  		trunk.active_channels = (active_channels === null) ? 0 : active_channels.length;
                  		asterisk.iax.active_channels += trunk.active_channels;
                  	});
                  }
                  
                  function getPjsipShowEndpoints() {
                  	response = Ami.request(url, 'PJSIPShowEndpoints');
                  	elements = text2Object(response.body);
                  	asterisk.pjsip.total = elements.length;
                  	asterisk.pjsip.trunks = elements.filter(function (element) {
                  		return element.ObjectName.search(Ami.params.trunk) != -1;
                  	});
                  
                  	elements.forEach(function (element) {
                  		if (element.DeviceState === 'Unavailable') {
                  			asterisk.pjsip.unavailable++;
                  		}
                  	});
                  	asterisk.pjsip.available = asterisk.pjsip.total - asterisk.pjsip.unavailable;
                  	asterisk.pjsip.trunks.forEach(function (trunk) {
                  		var active_channels = channels.match(new RegExp('[^!]PJSIP/' + escapeChars(trunk.ObjectName), 'g'));
                  		trunk.active_channels = (active_channels === null) ? 0 : active_channels.length;
                  		asterisk.pjsip.active_channels += trunk.active_channels;
                  	});
                  }
                  
                  function getQueueSummary() {
                  	response = Ami.request(url, 'QueueSummary');
                  	asterisk.queue.queues = text2Object(response.body);
                  	asterisk.queue.total = asterisk.queue.queues.length;
                  }
                  
                  function escapeChars(str) {
                  	return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
                  }
                  
                  function getUptimeSeconds(text) {
                  	var date = {
                  		years: 0,
                  		weeks: 0,
                  		days: 0,
                  		hours: 0,
                  		minutes: 0,
                  		seconds: 0
                  	};
                  
                  	var fields = {
                  		years: 'years?',
                  		weeks: 'weeks?',
                  		days: 'days?',
                  		hours: 'hours?',
                  		minutes: 'minutes?',
                  		seconds: 'seconds?'
                  	};
                  
                  	Object.keys(fields).forEach(function (field) {
                  		var match = text.match('(\\d+) ' + fields[field]);
                  		if (match !== null && typeof match[1] !== 'undefined') {
                  			date[field] = parseInt(match[1]);
                  		}
                  	});
                  	return date.years * 220752000 + date.weeks * 604800 + date.days * 86400 +
                  		date.hours * 3600 + date.minutes * 60 + date.seconds;
                  }
                  
                  var cookie = value.match(/mansession_id="([0-9A-z]+)"/);
                  if (cookie == null) {
                  	throw 'Cannot find mansession_id with cookie in response.';
                  }
                  
                  var url = Ami.params.url.split('?')[0] + '?action=';
                  
                  Ami.api_request.addHeader('Cookie: mansession_id="' + cookie[1] + '"');
                  
                  var response = Ami.request(url, 'CoreSettings');
                  var coreSettings = block2Object(response.body);
                  if (typeof coreSettings.AsteriskVersion !== 'undefined') {
                  	asterisk.version = coreSettings.AsteriskVersion;
                  }
                  
                  response = Ami.request(url, 'command&command=core%20show%20uptime');
                  var uptime = block2Object(response.body);
                  if (typeof uptime["System uptime"] !== 'undefined') {
                  	asterisk.uptime = getUptimeSeconds(uptime["System uptime"]);
                  }
                  if (typeof uptime["Last reload"] !== 'undefined') {
                  	asterisk.uptime_reload = getUptimeSeconds(uptime["Last reload"]);
                  }
                  
                  response = Ami.request(url, 'command&command=core%20show%20channels%20count');
                  channels = response.body;
                  var fields = {
                  	active_channels: 'active channels?',
                  	active_calls: 'active calls?',
                  	calls_processed: 'calls? processed'
                  };
                  
                  Object.keys(fields).forEach(function (field) {
                  	var match = channels.match('(\\d+)\\s+(?:of\\s+\\d+\\s+max\\s+)?' + fields[field]);
                  	if (match !== null && typeof match[1] !== 'undefined') {
                  		asterisk[field] = parseInt(match[1]);
                  	}
                  });
                  
                  response = Ami.request(url, 'command&command=core%20show%20channels%20concise');
                  channels = response.body;
                  
                  response = Ami.request(url, 'ListCommands');
                  var list = response.body;
                  if (list.includes('SIPpeers')) {
                  	getSipPeers();
                  }
                  if (list.includes('IAXpeerlist')) {
                  	getIaxPeerList();
                  }
                  if (list.includes('PJSIPShowEndpoints')) {
                  	getPjsipShowEndpoints();
                  }
                  if (list.includes('QueueSummary')) {
                  	getQueueSummary();
                  }
                  
                  try {
                  	response = Ami.request(url, 'Logoff');
                  }
                  catch (e) {}
                  
                  return JSON.stringify(asterisk);
          url: '{$AMI.URL}'
          query_fields:
            - name: action
              value: login
            - name: username
              value: '{$AMI.USERNAME}'
            - name: secret
              value: '{$AMI.SECRET}'
          retrieve_mode: HEADERS
          tags:
            - tag: component
              value: raw
        - uuid: d9900a1f096a4b89a2aa4af89f30b2cc
          name: 'IAX trunks active channels'
          type: DEPENDENT
          key: asterisk.iax.active_channels
          description: 'The total number of IAX trunks active channels.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.iax.active_channels
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: channels
          triggers:
            - uuid: 0ae0a5b6123a42dd9722219e5e5839df
              expression: 'min(/Asterisk by HTTP/asterisk.iax.active_channels,10m)>={$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"IAX"}'
              name: 'Asterisk: Total number of active channels of IAX trunks is too high'
              event_name: 'Asterisk: Total number of active channels of IAX trunks is too high (over {$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"IAX"} for 10m)'
              priority: WARNING
              description: 'The IAX trunks may not be able to process new calls.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 0798cf46d82041e6a7091698c7693ec5
          name: 'IAX offline peers'
          type: DEPENDENT
          key: asterisk.iax.offline
          description: 'The number of offline IAX peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.iax.offline
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: bf741f5560734530be352341071c5984
          name: 'IAX online peers'
          type: DEPENDENT
          key: asterisk.iax.online
          description: 'The number of online IAX peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.iax.online
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: ccb62e9b41da4f20b4ab19e4eecd598b
          name: 'IAX peers'
          type: DEPENDENT
          key: asterisk.iax.total
          description: 'The total number of IAX peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.iax.total
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: cf5c07c1a09b4a10af21292b876fcb20
          name: 'IAX unmonitored peers'
          type: DEPENDENT
          key: asterisk.iax.unmonitored
          description: 'The number of unmonitored IAX peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.iax.unmonitored
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: 5ae6135a49764db7b496f5d2378ddd77
          name: 'PJSIP trunks active channels'
          type: DEPENDENT
          key: asterisk.pjsip.active_channels
          description: 'The total number of PJSIP trunks active channels.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pjsip.active_channels
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: channels
          triggers:
            - uuid: 9b158fe0efb4416cb6ad5d53b38c3e38
              expression: 'min(/Asterisk by HTTP/asterisk.pjsip.active_channels,10m)>={$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"PJSIP"}'
              name: 'Asterisk: Total number of active channels of PJSIP trunks is too high'
              event_name: 'Asterisk: Total number of active channels of PJSIP trunks is too high (over {$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"PJSIP"} for 10m)'
              priority: WARNING
              description: 'The PJSIP trunks may not be able to process new calls.'
              tags:
                - tag: scope
                  value: performance
        - uuid: cc07f186104842aabec3d26dcd4322d2
          name: 'PJSIP available endpoints'
          type: DEPENDENT
          key: asterisk.pjsip.available
          description: 'The number of available PJSIP peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pjsip.available
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: fdc888cb355a4b738be8a77354a7ce76
          name: 'PJSIP endpoints'
          type: DEPENDENT
          key: asterisk.pjsip.total
          description: 'The total number of PJSIP peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pjsip.total
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: 5c10fe1a4bfb4628be20137d0f1ec725
          name: 'PJSIP unavailable endpoints'
          type: DEPENDENT
          key: asterisk.pjsip.unavailable
          description: 'The number of unavailable PJSIP peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pjsip.unavailable
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: 2df0dca89a744e86b4f5a2cec673d427
          name: 'SIP trunks active channels'
          type: DEPENDENT
          key: asterisk.sip.active_channels
          description: 'The total number of SIP trunks active channels.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.sip.active_channels
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: channels
          triggers:
            - uuid: d2fde5d26d284a129346a12ba0949b60
              expression: 'min(/Asterisk by HTTP/asterisk.sip.active_channels,10m)>={$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"SIP"}'
              name: 'Asterisk: Total number of active channels of SIP trunks is too high'
              event_name: 'Asterisk: Total number of active channels of SIP trunks is too high (over {$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"SIP"} for 10m)'
              priority: WARNING
              description: 'The SIP trunks may not be able to process new calls.'
              tags:
                - tag: scope
                  value: performance
        - uuid: fb08ec8d143a41a097f8652c8261bad8
          name: 'SIP monitored offline'
          type: DEPENDENT
          key: asterisk.sip.monitored_offline
          description: 'The number of monitored offline SIP peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.sip.monitored_offline
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: 23744b0a04b54637a7dbe1c7f8f5200f
          name: 'SIP monitored online'
          type: DEPENDENT
          key: asterisk.sip.monitored_online
          description: 'The number of monitored online SIP peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.sip.monitored_online
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: fb78998a342942ac942a7e1632b98208
          name: 'SIP peers'
          type: DEPENDENT
          key: asterisk.sip.total
          description: 'The total number of SIP peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.sip.total
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: ae21f8c13063402d9eece400a18c6167
          name: 'SIP unmonitored offline'
          type: DEPENDENT
          key: asterisk.sip.unmonitored_offline
          description: 'The number of unmonitored offline SIP peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.sip.unmonitored_offline
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: 1cd5fb5232ca4f4398f85d959ac11b2c
          name: 'SIP unmonitored online'
          type: DEPENDENT
          key: asterisk.sip.unmonitored_online
          description: 'The number of unmonitored online SIP peers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.sip.unmonitored_online
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: peers
        - uuid: 9c64cb54c2c541c1862558dcf8c6e3a3
          name: 'Total queues'
          type: DEPENDENT
          key: asterisk.total_queues
          description: 'The number of configured queues.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.queue.total
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: queues
        - uuid: 8395ab5b70a7433eb508c513995988bb
          name: Uptime
          type: DEPENDENT
          key: asterisk.uptime
          value_type: FLOAT
          units: uptime
          description: 'The system uptime expressed in the following format: "N days, hh:mm:ss".'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.uptime
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 35ca01e504a548db9d4db8be1390d6b9
              expression: 'nodata(/Asterisk by HTTP/asterisk.uptime,30m)=1'
              name: 'Asterisk: Failed to fetch AMI page'
              event_name: 'Asterisk: Failed to fetch AMI page (or no data for 30m)'
              priority: WARNING
              description: 'Zabbix has not received any data for items for the last 30 minutes.'
              manual_close: 'YES'
              dependencies:
                - name: 'Asterisk: Service is down'
                  expression: 'last(/Asterisk by HTTP/net.tcp.service["tcp","{$AMI.HOST}","{$AMI.PORT}"])=0'
              tags:
                - tag: scope
                  value: availability
            - uuid: 100d38b62c1d4ce298a9fadfbab19e4c
              expression: 'last(/Asterisk by HTTP/asterisk.uptime)<10m'
              name: 'Asterisk: Service has been restarted'
              event_name: 'Asterisk: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 86e23b5b9fd64e6e840588d25921fcbf
          name: 'Uptime after reload'
          type: DEPENDENT
          key: asterisk.uptime_reload
          value_type: FLOAT
          units: uptime
          description: 'System uptime after a config reload in ''N days, hh:mm:ss'' format.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.uptime_reload
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 4e99b65188264ba1aa80e24662f9b3cd
              expression: 'last(/Asterisk by HTTP/asterisk.uptime_reload)<10m'
              name: 'Asterisk: Configuration has been reloaded'
              event_name: 'Asterisk: Configuration has been reloaded (last reload < 10m ago)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 8ed124c5d61541c0ab1dcc3491fb05c6
          name: Version
          type: DEPENDENT
          key: asterisk.version
          value_type: CHAR
          description: 'Service version'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.version
          master_item:
            key: asterisk.get_stats
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: f1a260626ae6446d89e1e725e14c1098
              expression: 'last(/Asterisk by HTTP/asterisk.version,#1)<>last(/Asterisk by HTTP/asterisk.version,#2) and length(last(/Asterisk by HTTP/asterisk.version))>0'
              name: 'Asterisk: Version has changed'
              event_name: 'Asterisk: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'The Asterisk version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 09102393dc6a4ac598f02d95801c6ca0
          name: 'Service response time'
          type: SIMPLE
          key: 'net.tcp.service.perf["tcp","{$AMI.HOST}","{$AMI.PORT}"]'
          value_type: FLOAT
          units: s
          description: 'Asterisk Manager API performance.'
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: dbc74502be01498194003dc1a3d90014
              expression: 'min(/Asterisk by HTTP/net.tcp.service.perf["tcp","{$AMI.HOST}","{$AMI.PORT}"],5m)>{$AMI.RESPONSE_TIME.MAX.WARN}'
              name: 'Asterisk: Service response time is too high'
              event_name: 'Asterisk: Service response time is too high (over {$AMI.RESPONSE_TIME.MAX.WARN} for 5m)'
              priority: WARNING
              manual_close: 'YES'
              dependencies:
                - name: 'Asterisk: Service is down'
                  expression: 'last(/Asterisk by HTTP/net.tcp.service["tcp","{$AMI.HOST}","{$AMI.PORT}"])=0'
              tags:
                - tag: scope
                  value: performance
        - uuid: 58e18df6a5534395bf74d3babdb73170
          name: 'Service status'
          type: SIMPLE
          key: 'net.tcp.service["tcp","{$AMI.HOST}","{$AMI.PORT}"]'
          description: 'Asterisk Manager API port availability.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 1fa3370fa93f4d07a2c470f993096554
              expression: 'last(/Asterisk by HTTP/net.tcp.service["tcp","{$AMI.HOST}","{$AMI.PORT}"])=0'
              name: 'Asterisk: Service is down'
              priority: AVERAGE
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 3e7facc25a344cec8e384e8a9f8b372a
          name: 'IAX peers discovery'
          type: DEPENDENT
          key: asterisk.iax_peers.discovery
          item_prototypes:
            - uuid: 72d71ec4fa2b4e88a03d25e3bbe8771a
              name: 'IAX trunk "{#OBJECTNAME}": Active channels'
              type: DEPENDENT
              key: 'asterisk.iax.trunk.active_channels[{#OBJECTNAME}]'
              description: 'The total number of active IAX trunk channels.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.active_channels
              master_item:
                key: 'asterisk.iax.trunk.get[{#OBJECTNAME}]'
              tags:
                - tag: component
                  value: channels
                - tag: trunk
                  value: '{#OBJECTNAME}'
              trigger_prototypes:
                - uuid: e2a6c7a9b6234e2aae20c9aa480f9ef1
                  expression: 'min(/Asterisk by HTTP/asterisk.iax.trunk.active_channels[{#OBJECTNAME}],10m)>={$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN:"{#OBJECTNAME}"}'
                  name: 'Asterisk: IAX trunk "{#OBJECTNAME}": Number of the IAX trunk "{#OBJECTNAME}" active channels is too high'
                  event_name: 'Asterisk: IAX trunk "{#OBJECTNAME}": Number of the IAX trunk "{#OBJECTNAME}" active channels is too high (over {$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN:"{#OBJECTNAME}"} for 10m)'
                  priority: WARNING
                  description: 'The IAX trunk may not be able to process new calls.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 9c6554be77234ed98cee4a49e23506b7
              name: 'IAX trunk "{#OBJECTNAME}": Get IAX trunk'
              type: DEPENDENT
              key: 'asterisk.iax.trunk.get[{#OBJECTNAME}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for an IAX trunk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.iax.trunks[?(@.ObjectName==''{#OBJECTNAME}'')].first()'
              master_item:
                key: asterisk.get_stats
              tags:
                - tag: component
                  value: raw
                - tag: trunk
                  value: '{#OBJECTNAME}'
            - uuid: bbde7e898b4b4d34b27308d6ddaf86fc
              name: 'IAX trunk "{#OBJECTNAME}": Status'
              type: DEPENDENT
              key: 'asterisk.iax.trunk.status[{#OBJECTNAME}]'
              value_type: CHAR
              description: |
                IAX trunk status. Here are the possible states that a device state may have:
                Unmonitored
                UNKNOWN
                UNREACHABLE
                OK
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Status
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'asterisk.iax.trunk.get[{#OBJECTNAME}]'
              tags:
                - tag: component
                  value: health
                - tag: trunk
                  value: '{#OBJECTNAME}'
              trigger_prototypes:
                - uuid: db595245acef4ec9b771c266c14100d2
                  expression: 'last(/Asterisk by HTTP/asterisk.iax.trunk.status[{#OBJECTNAME}])="UNKNOWN" or last(/Asterisk by HTTP/asterisk.iax.trunk.status[{#OBJECTNAME}])="UNREACHABLE"'
                  name: 'Asterisk: IAX trunk "{#OBJECTNAME}": IAX trunk {#OBJECTNAME} has a state {ITEM.VALUE}'
                  priority: AVERAGE
                  description: 'The IAX trunk is unable to establish a connection with a neighbor due to network issues or incorrect configuration.'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: asterisk.get_stats
          lld_macro_paths:
            - lld_macro: '{#OBJECTNAME}'
              path: $.ObjectName
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.iax.trunks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 1a123ca04c7544bfa823a39b8a9fe84c
          name: 'PJSIP endpoints discovery'
          type: DEPENDENT
          key: asterisk.pjsip_endpoints.discovery
          item_prototypes:
            - uuid: ec8220a1aa814112908337a009f6fcac
              name: 'PJSIP trunk "{#OBJECTNAME}": Active channels'
              type: DEPENDENT
              key: 'asterisk.pjsip.trunk.active_channels[{#OBJECTNAME}]'
              description: 'The total number of active PJSIP trunk channels.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.active_channels
              master_item:
                key: 'asterisk.pjsip.trunk.get[{#OBJECTNAME}]'
              tags:
                - tag: component
                  value: channels
                - tag: trunk
                  value: '{#OBJECTNAME}'
              trigger_prototypes:
                - uuid: f192d555011c42c28c6a8f52c0388fe1
                  expression: 'min(/Asterisk by HTTP/asterisk.pjsip.trunk.active_channels[{#OBJECTNAME}],10m)>={$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN:"{#OBJECTNAME}"}'
                  name: 'Asterisk: PJSIP trunk "{#OBJECTNAME}": Number of the PJSIP trunk "{#OBJECTNAME}" active channels is too high'
                  event_name: 'Asterisk: PJSIP trunk "{#OBJECTNAME}": Number of the PJSIP trunk "{#OBJECTNAME}" active channels is too high (over {$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN:"{#OBJECTNAME}"} for 10m)'
                  priority: WARNING
                  description: 'The PJSIP trunk may not be able to process new calls.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: c364b2ac50344372b155cbb98d9a7afe
              name: 'PJSIP trunk "{#OBJECTNAME}": Device state'
              type: DEPENDENT
              key: 'asterisk.pjsip.trunk.devicestate[{#OBJECTNAME}]'
              value_type: CHAR
              description: |
                PJSIP trunk status. Here are the possible states that a device state may have:
                Unavailable
                Not in use
                In use
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.DeviceState
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'asterisk.pjsip.trunk.get[{#OBJECTNAME}]'
              tags:
                - tag: component
                  value: health
                - tag: trunk
                  value: '{#OBJECTNAME}'
              trigger_prototypes:
                - uuid: 6f31d886d6954b82874d38646b233689
                  expression: 'last(/Asterisk by HTTP/asterisk.pjsip.trunk.devicestate[{#OBJECTNAME}])="Unavailable"'
                  name: 'Asterisk: PJSIP trunk "{#OBJECTNAME}": PJSIP trunk {#OBJECTNAME} has a state Unavailable'
                  priority: AVERAGE
                  description: 'The PJSIP trunk is unable to establish a connection with a neighbor due to network issues or incorrect configuration.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 0919612d88744ec7ad47b11ccfad1f4e
              name: 'PJSIP trunk "{#OBJECTNAME}": Get PJSIP trunk'
              type: DEPENDENT
              key: 'asterisk.pjsip.trunk.get[{#OBJECTNAME}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for a PJSIP trunk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.pjsip.trunks[?(@.ObjectName==''{#OBJECTNAME}'')].first()'
              master_item:
                key: asterisk.get_stats
              tags:
                - tag: component
                  value: raw
                - tag: trunk
                  value: '{#OBJECTNAME}'
          master_item:
            key: asterisk.get_stats
          lld_macro_paths:
            - lld_macro: '{#OBJECTNAME}'
              path: $.ObjectName
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pjsip.trunks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 5a936a95d62f4b50a4f3db112a3e041f
          name: 'Queues discovery'
          type: DEPENDENT
          key: asterisk.queues.discovery
          item_prototypes:
            - uuid: c16d9df72ba749369726d4cfcc8b4f40
              name: '"{#QUEUE}": Available'
              type: DEPENDENT
              key: 'asterisk.queue.available[{#QUEUE}]'
              description: 'The number of available queue members.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Available
              master_item:
                key: 'asterisk.queue.get[{#QUEUE}]'
              tags:
                - tag: component
                  value: members
                - tag: queue
                  value: '{#QUEUE}'
            - uuid: c271c7d76b2e49dea386bb08d60307d0
              name: '"{#QUEUE}": Callers'
              type: DEPENDENT
              key: 'asterisk.queue.callers[{#QUEUE}]'
              description: 'The number incoming calls in queue.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Callers
              master_item:
                key: 'asterisk.queue.get[{#QUEUE}]'
              tags:
                - tag: component
                  value: calls
                - tag: queue
                  value: '{#QUEUE}'
              trigger_prototypes:
                - uuid: 4f72c6a755be465287f36b8b12d3175b
                  expression: 'min(/Asterisk by HTTP/asterisk.queue.callers[{#QUEUE}],10m)>{$AMI.QUEUE_CALLERS.MAX.WARN:"{#QUEUE}"}'
                  name: 'Asterisk: "{#QUEUE}": Number of callers in the queue "{#QUEUE}" is too high'
                  event_name: 'Asterisk: "{#QUEUE}": Number of callers in the queue "{#QUEUE}" is too high (over {$AMI.QUEUE_CALLERS.MAX.WARN:"{#QUEUE}"} for 10m)'
                  priority: WARNING
                  description: 'There is a large number of calls in the queue.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 49bc8af136204b8bae9d7527d04b15bc
              name: '"{#QUEUE}": Get queue'
              type: DEPENDENT
              key: 'asterisk.queue.get[{#QUEUE}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for a queue.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.queue.queues[?(@.Queue==''{#QUEUE}'')].first()'
              master_item:
                key: asterisk.get_stats
              tags:
                - tag: component
                  value: raw
                - tag: queue
                  value: '{#QUEUE}'
            - uuid: 8319ec55cf6f4e8590f180f1a81f37ed
              name: '"{#QUEUE}": Logged in'
              type: DEPENDENT
              key: 'asterisk.queue.loggedin[{#QUEUE}]'
              description: 'The number of queue members.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.LoggedIn
              master_item:
                key: 'asterisk.queue.get[{#QUEUE}]'
              tags:
                - tag: component
                  value: members
                - tag: queue
                  value: '{#QUEUE}'
          master_item:
            key: asterisk.get_stats
          lld_macro_paths:
            - lld_macro: '{#QUEUE}'
              path: $.Queue
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.queue.queues
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 675fc5b11cb1482db0c539dfb9100e75
          name: 'SIP peers discovery'
          type: DEPENDENT
          key: asterisk.sip_peers.discovery
          item_prototypes:
            - uuid: 9043578864494b13b249ee7bdf13820d
              name: 'SIP trunk "{#OBJECTNAME}": Active channels'
              type: DEPENDENT
              key: 'asterisk.sip.trunk.active_channels[{#OBJECTNAME}]'
              description: 'The total number of active SIP trunk channels.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.active_channels
              master_item:
                key: 'asterisk.sip.trunk.get[{#OBJECTNAME}]'
              tags:
                - tag: component
                  value: channels
                - tag: trunk
                  value: '{#OBJECTNAME}'
              trigger_prototypes:
                - uuid: 51820b1326f84f51ba0e561946275133
                  expression: 'min(/Asterisk by HTTP/asterisk.sip.trunk.active_channels[{#OBJECTNAME}],10m)>={$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN:"{#OBJECTNAME}"}'
                  name: 'Asterisk: SIP trunk "{#OBJECTNAME}": Number of the SIP trunk "{#OBJECTNAME}" active channels is too high'
                  event_name: 'Asterisk: SIP trunk "{#OBJECTNAME}": Number of the SIP trunk "{#OBJECTNAME}" active channels is too high (over {$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN:"{#OBJECTNAME}"} for 10m)'
                  priority: WARNING
                  description: 'The SIP trunk may not be able to process new calls.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: a9532680f08445dd9a1bb37e2e2c44c5
              name: 'SIP trunk "{#OBJECTNAME}": Get SIP trunk'
              type: DEPENDENT
              key: 'asterisk.sip.trunk.get[{#OBJECTNAME}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for a SIP trunk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.sip.trunks[?(@.ObjectName==''{#OBJECTNAME}'')].first()'
              master_item:
                key: asterisk.get_stats
              tags:
                - tag: component
                  value: raw
                - tag: trunk
                  value: '{#OBJECTNAME}'
            - uuid: df33da749e874f55be5f0c33cd201f62
              name: 'SIP trunk "{#OBJECTNAME}": Status'
              type: DEPENDENT
              key: 'asterisk.sip.trunk.status[{#OBJECTNAME}]'
              value_type: CHAR
              description: |
                SIP trunk status. Here are the possible states that a device state may have:
                Unmonitored
                UNKNOWN
                UNREACHABLE
                OK
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Status
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'asterisk.sip.trunk.get[{#OBJECTNAME}]'
              tags:
                - tag: component
                  value: health
                - tag: trunk
                  value: '{#OBJECTNAME}'
              trigger_prototypes:
                - uuid: 39cac88e9263470da6e4b1a08f806c58
                  expression: 'last(/Asterisk by HTTP/asterisk.sip.trunk.status[{#OBJECTNAME}])="UNKNOWN" or last(/Asterisk by HTTP/asterisk.sip.trunk.status[{#OBJECTNAME}])="UNREACHABLE"'
                  name: 'Asterisk: SIP trunk "{#OBJECTNAME}": SIP trunk {#OBJECTNAME} has a state {ITEM.VALUE}'
                  priority: AVERAGE
                  description: 'The SIP trunk is unable to establish a connection with a neighbor due to network issues or incorrect configuration.'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: asterisk.get_stats
          lld_macro_paths:
            - lld_macro: '{#OBJECTNAME}'
              path: $.ObjectName
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.sip.trunks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: voip
        - tag: subclass
          value: communication
        - tag: target
          value: asterisk
      macros:
        - macro: '{$AMI.HOST}'
          description: 'The hostname or IP address of the Asterisk Manager API host.'
          config:
            type: TEXT
            priority: '2'
            label: 'AMI host'
            description: 'The hostname or IP address of the Asterisk Manager API host.'
            required: 'YES'
        - macro: '{$AMI.PORT}'
          value: '5038'
          description: 'AMI port number for checking service availability.'
          config:
            type: TEXT
            priority: '3'
            label: 'AMI port'
            description: 'AMI port number for checking service availability.'
            required: 'YES'
        - macro: '{$AMI.QUEUE_CALLERS.MAX.WARN}'
          value: '10'
          description: 'The maximum number of callers in a queue for trigger expression.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Queue max callers'
            description: 'The maximum number of callers in a queue for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$AMI.RESPONSE_TIME.MAX.WARN}'
          value: 10s
          description: 'The Asterisk Manager API page maximum response time in seconds for trigger expression.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'API max response time (sec)'
            description: 'The Asterisk Manager API page maximum response time in seconds for trigger expression.'
        - macro: '{$AMI.SECRET}'
          value: zabbix
          description: 'The Asterisk Manager secret.'
          config:
            type: TEXT
            priority: '5'
            label: 'AMI manager secret'
            description: 'The Asterisk Manager secret.'
            required: 'YES'
        - macro: '{$AMI.TRUNK_ACTIVE_CHANNELS.MAX.WARN}'
          value: '28'
          description: 'The maximum number of busy channels of a trunk for trigger expression.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Trunk max busy channels'
            description: 'The maximum number of busy channels of a trunk for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"IAX"}'
          value: '28'
          description: 'The total maximum number of busy channels of IAX trunks for trigger expression.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'IAX trunks max busy channels'
            description: 'The total maximum number of busy channels of IAX trunks for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"PJSIP"}'
          value: '28'
          description: 'The total maximum number of busy channels of PJSIP trunks for trigger expression.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'PJSIP trunks max busy channels'
            description: 'The total maximum number of busy channels of PJSIP trunks for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$AMI.TRUNK_ACTIVE_CHANNELS_TOTAL.MAX.WARN:"SIP"}'
          value: '28'
          description: 'The total maximum number of busy channels of SIP trunks for trigger expression.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'SIP trunks max busy channels'
            description: 'The total maximum number of busy channels of SIP trunks for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$AMI.TRUNK_REGEXP}'
          value: trunk
          description: 'The regexp for the identification of trunk peers.'
          config:
            type: TEXT
            priority: '6'
            label: 'Trunk peers regex'
            description: 'The regexp for the identification of trunk peers.'
        - macro: '{$AMI.URL}'
          value: 'http://asterisk:8088/asterisk/rawman'
          description: 'The Asterisk Manager API URL in the format `<scheme>://<host>:<port>/<prefix>/rawman`.'
          config:
            type: TEXT
            priority: '1'
            label: 'AMI API URL'
            description: 'The Asterisk Manager API URL in the format `<scheme>://<host>:<port>/<prefix>/rawman`.'
            required: 'YES'
        - macro: '{$AMI.USERNAME}'
          value: zabbix
          description: 'The Asterisk Manager name.'
          config:
            type: TEXT
            priority: '4'
            label: 'AMI manager name'
            description: 'The Asterisk Manager name.'
            required: 'YES'
      valuemaps:
        - uuid: d6e38832f2d44ec0bf6761e36fd7668f
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 0368ca599bbb49729587b9c43ac83084
      template: 'Envoy Proxy by HTTP'
      name: 'Envoy Proxy by HTTP'
      description: |
        Get Envoy Proxy metrics by HTTP agent from metrics endpoint.
        https://www.envoyproxy.io/docs/envoy/v1.20.0/operations/stats_overview
        
        Don't forget to change macros {$ENVOY.URL}, {$ENVOY.METRICS.PATH}.
        Some metrics may not be collected depending on your Envoy Proxy instance version and configuration.
        
        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
        
        The template to monitor Envoy Proxy by Zabbix that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        Template `Envoy Proxy by HTTP` - collects metrics by HTTP agent from  metrics endpoint `Metrics scrape path` endpoint (default: /stats/prometheus).
        
        ## Setup
        
        Internal service metrics are collected from `Metrics scrape path` endpoint (default: /stats/prometheus).
        https://www.envoyproxy.io/docs/envoy/v1.20.0/operations/stats_overview
        
        Don't forget to change host wizard configuration fields `Instance URL`, `Metrics scrape path`.
        
        *NOTE.* Some metrics may not be collected depending on your Envoy Proxy instance version and configuration.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: c5c90eeb0c424cc8ade0b795f2c1bb45
          name: 'Clusters, active'
          type: DEPENDENT
          key: envoy.cluster_manager.active_clusters
          description: 'Number of currently active (warmed) clusters.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_cluster_manager_active_clusters
                - value
                - ''
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: cluster
        - uuid: f994b20217444723b6a1aad5b9a07cd0
          name: 'Clusters, added rate'
          type: DEPENDENT
          key: envoy.cluster_manager.cluster_added.rate
          value_type: FLOAT
          description: 'Total clusters added (either via static config or CDS) per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_cluster_manager_cluster_added
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: cluster
        - uuid: 0286c5deba924ce8b79e3b1f6c9e033c
          name: 'Clusters, modified rate'
          type: DEPENDENT
          key: envoy.cluster_manager.cluster_modified.rate
          value_type: FLOAT
          description: 'Total clusters modified (via CDS) per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_cluster_manager_cluster_modified
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: cluster
        - uuid: 5c3475b88a044d0bb779a3ee455d2618
          name: 'Clusters, removed rate'
          type: DEPENDENT
          key: envoy.cluster_manager.cluster_removed.rate
          value_type: FLOAT
          description: 'Total clusters removed (via CDS) per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_cluster_manager_cluster_removed
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: cluster
        - uuid: 9bb29e3b322e40c3aaa14f2e0911cc68
          name: 'Clusters, updates rate'
          type: DEPENDENT
          key: envoy.cluster_manager.cluster_updated.rate
          value_type: FLOAT
          description: 'Total cluster updates per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_cluster_manager_cluster_updated
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: cluster
        - uuid: 9c3503fc553a409ab897f287b882f055
          name: 'Clusters, warming'
          type: DEPENDENT
          key: envoy.cluster_manager.warming_clusters
          description: 'Number of currently warming (not active) clusters.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_cluster_manager_warming_clusters
                - value
                - ''
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: cluster
        - uuid: cc10052300624df3bf869279dd5e7b49
          name: 'Filesystem, flushed by timer rate'
          type: DEPENDENT
          key: envoy.filesystem.flushed_by_timer.rate
          value_type: FLOAT
          description: 'Total number of times internal flush buffers are written to a file due to flush timeout per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_filesystem_flushed_by_timer
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: filesystem
        - uuid: b3c050dd60d44c0599bc44c9a21621d9
          name: 'Filesystem, reopen failed rate'
          type: DEPENDENT
          key: envoy.filesystem.reopen_failed.rate
          value_type: FLOAT
          description: 'Total number of times a file was failed to be opened per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_filesystem_reopen_failed
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: filesystem
        - uuid: 2f400ee513c841f6b7a4fa48834f4a9c
          name: 'Filesystem, write completed rate'
          type: DEPENDENT
          key: envoy.filesystem.write_completed.rate
          value_type: FLOAT
          description: 'Total number of times a file was written per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_filesystem_write_completed
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: filesystem
        - uuid: ae48575f37494e0e9ccfa2c390f5bf68
          name: 'Filesystem, write failed rate'
          type: DEPENDENT
          key: envoy.filesystem.write_failed.rate
          value_type: FLOAT
          description: 'Total number of times an error occurred during a file write operation per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_filesystem_write_failed
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: filesystem
        - uuid: c6baf4c4e99f4516a23f87c089252a82
          name: 'Get node metrics'
          type: HTTP_AGENT
          key: envoy.get_metrics
          history: '0'
          value_type: TEXT
          description: 'Get server metrics.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
          url: '{$ENVOY.URL}{$ENVOY.METRICS.PATH}'
          tags:
            - tag: component
              value: raw
        - uuid: 579f47037749460e974433ef6cfe3202
          name: 'Listeners, added'
          type: DEPENDENT
          key: envoy.listener_manager.listener_added.rate
          value_type: FLOAT
          description: 'Total listeners added (either via static config or LDS) per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_listener_manager_listener_added
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: listener
        - uuid: a259d191fcce48458a9f671a1a2dd6aa
          name: 'Listeners, create failure'
          type: DEPENDENT
          key: envoy.listener_manager.listener_create_failure.rate
          value_type: FLOAT
          description: 'Total failed listener object additions to workers per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_listener_manager_listener_create_failure
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: listener
        - uuid: c036b55d5aea45f9b0e9c44ea279e2ed
          name: 'Listeners, create success'
          type: DEPENDENT
          key: envoy.listener_manager.listener_create_success.rate
          value_type: FLOAT
          description: 'Total listener objects successfully added to workers per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_listener_manager_listener_create_success
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: listener
        - uuid: b217c7aaa415495089d079a2f81ead2d
          name: 'Listeners, stopped'
          type: DEPENDENT
          key: envoy.listener_manager.listener_stopped.rate
          value_type: FLOAT
          description: 'Total listeners stopped per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_listener_manager_listener_stopped
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: listener
        - uuid: 7ba3e4be89514d53b8ebaad8e9ba58d0
          name: 'Listeners, active'
          type: DEPENDENT
          key: envoy.listener_manager.total_listeners_active
          description: 'Number of currently active listeners.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_listener_manager_total_listeners_active
                - function
                - sum
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: listener
        - uuid: f01f1236cd1a4661b67633836a61537e
          name: 'Listeners, draining'
          type: DEPENDENT
          key: envoy.listener_manager.total_listeners_draining
          description: 'Number of currently draining listeners.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_listener_manager_total_listeners_draining
                - function
                - sum
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: listener
        - uuid: a1a01a7df5364a098fdf96b9de20558d
          name: 'Listener, warming'
          type: DEPENDENT
          key: envoy.listener_manager.total_listeners_warming
          description: 'Number of currently warming listeners.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_listener_manager_total_listeners_warming
                - function
                - sum
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: listener
        - uuid: feeab802ed9a44559ded48ea67aba23e
          name: 'Listener manager, initialized'
          type: DEPENDENT
          key: envoy.listener_manager.workers_started
          description: 'A boolean (1 if started and 0 otherwise) that indicates whether listeners have been initialized on workers.'
          valuemap:
            name: 'Envoy listener manager'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_listener_manager_workers_started
                - value
                - ''
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: listener-manager
        - uuid: b8e3b2a5614e4460abe10be443641621
          name: 'Server concurrency'
          type: DEPENDENT
          key: envoy.server.concurrency
          description: 'Number of worker threads.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_concurrency
                - value
                - ''
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: application
        - uuid: 91cbea325a634d8a8fc256782a7e004d
          name: 'Certificate expiration, day before'
          type: DEPENDENT
          key: envoy.server.days_until_first_cert_expiring
          units: '!Days'
          description: 'Number of days until the next certificate being managed will expire.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_days_until_first_cert_expiring
                - value
                - ''
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: certificate
          triggers:
            - uuid: d025e1c521ee4f53acd896d96609beec
              expression: 'last(/Envoy Proxy by HTTP/envoy.server.days_until_first_cert_expiring)<{$ENVOY.CERT.MIN}'
              name: 'Envoy Proxy: SSL certificate expires soon'
              event_name: 'Envoy Proxy: SSL certificate expires soon (less than {$CERT.EXPIRY.MIN} days)'
              opdata: 'Expires: {ITEM.VALUE}'
              priority: WARNING
              description: 'Please check certificate. Less than {$ENVOY.CERT.MIN} days left until the next certificate being managed will expire.'
              tags:
                - tag: scope
                  value: security
        - uuid: d8fc1e89c2e14f5e86ea1378fee22a0b
          name: 'Server live'
          type: DEPENDENT
          key: envoy.server.live
          description: '1 if the server is not currently draining, 0 otherwise.'
          valuemap:
            name: 'Envoy server live'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_live
                - value
                - ''
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: health
        - uuid: 4b50974e6b7444c8a47da589239247a9
          name: 'Memory allocated'
          type: DEPENDENT
          key: envoy.server.memory_allocated
          value_type: FLOAT
          units: B
          description: 'Current amount of allocated memory in bytes. Total of both new and old Envoy processes on hot restart.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_memory_allocated
                - value
                - ''
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: memory
        - uuid: 05b2fe80bbc54b58b19166c921ba244a
          name: 'Memory heap size'
          type: DEPENDENT
          key: envoy.server.memory_heap_size
          value_type: FLOAT
          units: B
          description: 'Current reserved heap size in bytes. New Envoy process heap size on hot restart.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_memory_heap_size
                - value
                - ''
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: memory
        - uuid: a1842c747e5b44a39746037b3f844f4f
          name: 'Memory physical size'
          type: DEPENDENT
          key: envoy.server.memory_physical_size
          value_type: FLOAT
          units: B
          description: 'Current estimate of total bytes of the physical memory. New Envoy process physical memory size on hot restart.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_memory_physical_size
                - value
                - ''
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: memory
        - uuid: a13b35ef1e9f4697953a935239b146d9
          name: 'Connections, parent'
          type: DEPENDENT
          key: envoy.server.parent_connections
          value_type: FLOAT
          description: 'Total connections of the old Envoy process on hot restart.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_parent_connections
                - value
                - ''
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: connections
        - uuid: 701e69bdd408408c8b516e130ed31725
          name: 'Server state'
          type: DEPENDENT
          key: envoy.server.state
          description: |
            State of the server.
            Live - (default) Server is live and serving traffic.
            Draining - Server is draining listeners in response to external health checks failing.
            Pre initializing - Server has not yet completed cluster manager initialization.
            Initializing - Server is running the cluster manager initialization callbacks (e.g., RDS).
          valuemap:
            name: 'Envoy server state'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_state
                - value
                - ''
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: b90a6241e1294fdc8502426b7582c1c2
              expression: 'last(/Envoy Proxy by HTTP/envoy.server.state) > 0'
              name: 'Envoy Proxy: Server state is not live'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: availability
        - uuid: 8b2f3702af20404aa1c75498098aff02
          name: 'Connections, total'
          type: DEPENDENT
          key: envoy.server.total_connections
          value_type: FLOAT
          description: 'Total connections of both new and old Envoy processes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_total_connections
                - value
                - ''
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: connections
        - uuid: ee3c3a89aed34257999e6106fddbc8a4
          name: Uptime
          type: DEPENDENT
          key: envoy.server.uptime
          value_type: FLOAT
          units: s
          description: 'Current server uptime in seconds.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - envoy_server_uptime
                - value
                - ''
              error_handler: DISCARD_VALUE
          master_item:
            key: envoy.get_metrics
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 173c90200dd1451db10b8ea8b018bc54
              expression: 'nodata(/Envoy Proxy by HTTP/envoy.server.uptime,10m)=1'
              name: 'Envoy Proxy: Failed to fetch metrics data'
              event_name: 'Envoy Proxy: Failed to fetch metrics data (or no data for 10m)'
              priority: WARNING
              description: 'Zabbix has not received data for items for the last 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
            - uuid: 01e29535e00143c9a64fe844f637f17e
              expression: 'last(/Envoy Proxy by HTTP/envoy.server.uptime)<10m'
              name: 'Envoy Proxy: Service has been restarted'
              event_name: 'Envoy Proxy: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: e5e43b5959744fdd94f103df8d33f635
          name: 'Cluster metrics discovery'
          type: DEPENDENT
          key: envoy.lld.cluster
          item_prototypes:
            - uuid: 6040df76d67048aaa4217dc14a2db3ed
              name: 'Cluster ["{#CLUSTER_NAME}"]: Membership, degraded'
              type: DEPENDENT
              key: 'envoy.cluster.membership_degraded["{#CLUSTER_NAME}"]'
              description: 'Current cluster degraded total.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_membership_degraded{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
            - uuid: 0368ecc40bc54a70bae3c81509bad062
              name: 'Cluster ["{#CLUSTER_NAME}"]: Membership, healthy'
              type: DEPENDENT
              key: 'envoy.cluster.membership_healthy["{#CLUSTER_NAME}"]'
              description: 'Current cluster healthy total (inclusive of both health checking and outlier detection).'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_membership_healthy{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
            - uuid: a4cd74b439e3483499e30ffefdb36976
              name: 'Cluster ["{#CLUSTER_NAME}"]: Membership, total'
              type: DEPENDENT
              key: 'envoy.cluster.membership_total["{#CLUSTER_NAME}"]'
              description: 'Current cluster membership total.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_membership_total{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
            - uuid: d453ade473ae4beaab06afa117814a1b
              name: 'Cluster ["{#CLUSTER_NAME}"]: Membership, unhealthy'
              type: CALCULATED
              key: 'envoy.cluster.membership_unhealthy["{#CLUSTER_NAME}"]'
              params: 'last(//envoy.cluster.membership_total["{#CLUSTER_NAME}"]) - last(//envoy.cluster.membership_healthy["{#CLUSTER_NAME}"])'
              description: 'Current cluster unhealthy.'
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
              trigger_prototypes:
                - uuid: 7542707fd247445cb9eaa51d01e76d5e
                  expression: 'last(/Envoy Proxy by HTTP/envoy.cluster.membership_unhealthy["{#CLUSTER_NAME}"]) > 0'
                  name: 'Envoy Proxy: There are unhealthy clusters'
                  opdata: 'Current number: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  tags:
                    - tag: scope
                      value: availability
            - uuid: b5c802ae97a0449cbbb7f43a2510fd56
              name: 'Cluster ["{#CLUSTER_NAME}"]: Connections, active'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_cx_active["{#CLUSTER_NAME}"]'
              description: 'Current cluster total active connections.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_cx_active{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: connections
            - uuid: c7106f0670764bc297920a5e62768c55
              name: 'Cluster ["{#CLUSTER_NAME}"]: Upstream bytes in, rate'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_cx_rx_bytes_total.rate["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              units: Bps
              description: 'Total received connection bytes per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_cx_rx_bytes_total{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: network
            - uuid: d180e76ccb3a456b8100c4669173c0f7
              name: 'Cluster ["{#CLUSTER_NAME}"]: Connections, total'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_cx_total["{#CLUSTER_NAME}"]'
              description: 'Current cluster total connections.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_cx_total{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: connections
            - uuid: d024405b571946939fa20d495ef6c7d8
              name: 'Cluster ["{#CLUSTER_NAME}"]: Upstream bytes out, rate'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_cx_tx_bytes_total.rate["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              units: Bps
              description: 'Total sent connection bytes per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_cx_tx_bytes_total{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: network
            - uuid: f6724ac1954e4c71a95a01a441d46e5d
              name: 'Cluster ["{#CLUSTER_NAME}"]: Requests 2xx, rate'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_rq_2x.rate["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              description: 'Aggregate HTTP response codes per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_rq_xx{envoy_cluster_name = "{#CLUSTER_NAME}", envoy_response_code_class="2"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: requests
            - uuid: 248d268966ed4999916d77b340f82fa1
              name: 'Cluster ["{#CLUSTER_NAME}"]: Requests 3xx, rate'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_rq_3x.rate["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              description: 'Aggregate HTTP response codes per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_rq_xx{envoy_cluster_name = "{#CLUSTER_NAME}", envoy_response_code_class="3"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: requests
            - uuid: 65e956c129e2436896f1a3d46a1f9090
              name: 'Cluster ["{#CLUSTER_NAME}"]: Requests 4xx, rate'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_rq_4x.rate["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              description: 'Aggregate HTTP response codes per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_rq_xx{envoy_cluster_name = "{#CLUSTER_NAME}", envoy_response_code_class="4"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: requests
            - uuid: a85872e72792460e97d8fd322e0919a1
              name: 'Cluster ["{#CLUSTER_NAME}"]: Requests 5xx, rate'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_rq_5x.rate["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              description: 'Aggregate HTTP response codes per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_rq_xx{envoy_cluster_name = "{#CLUSTER_NAME}", envoy_response_code_class="5"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: requests
            - uuid: a06b43daf8e2493eb61d27cea8baba79
              name: 'Cluster ["{#CLUSTER_NAME}"]: Requests active'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_rq_active["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              description: 'Total active requests.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_rq_active{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: requests
            - uuid: bd1c6766c9e047f1a40f6b1f22f00623
              name: 'Cluster ["{#CLUSTER_NAME}"]: Requests completed, rate'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_rq_completed.rate["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              description: 'Total upstream requests completed per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_rq_completed{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: requests
            - uuid: 267c3d01aa614dbdb0f0dcbe3ab2e11b
              name: 'Cluster ["{#CLUSTER_NAME}"]: Requests pending'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_rq_pending_active["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              description: 'Total active requests pending a connection pool connection.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_rq_pending_active{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: requests
            - uuid: 2489b20b43044020a3ace164f6049af6
              name: 'Cluster ["{#CLUSTER_NAME}"]: Requests timeout, rate'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_rq_timeout.rate["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              description: 'Current cluster requests that timed out waiting for a response per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_rq_timeout{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: requests
            - uuid: b807e34a608042419d69eae46aa4338c
              name: 'Cluster ["{#CLUSTER_NAME}"]: Requests total, rate'
              type: DEPENDENT
              key: 'envoy.cluster.upstream_rq_total.rate["{#CLUSTER_NAME}"]'
              value_type: FLOAT
              description: 'Current cluster request total per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_cluster_upstream_rq_total{envoy_cluster_name = "{#CLUSTER_NAME}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: cluster
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: cluster
                - tag: component
                  value: requests
          graph_prototypes:
            - uuid: a1ecd91cb0a44c39923d4b806aae4039
              name: 'Envoy Proxy: [{#CLUSTER_NAME}] HTTP requests'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Envoy Proxy by HTTP'
                    key: 'envoy.cluster.upstream_rq_2x.rate["{#CLUSTER_NAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Envoy Proxy by HTTP'
                    key: 'envoy.cluster.upstream_rq_3x.rate["{#CLUSTER_NAME}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Envoy Proxy by HTTP'
                    key: 'envoy.cluster.upstream_rq_4x.rate["{#CLUSTER_NAME}"]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'Envoy Proxy by HTTP'
                    key: 'envoy.cluster.upstream_rq_5x.rate["{#CLUSTER_NAME}"]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'Envoy Proxy by HTTP'
                    key: 'envoy.cluster.upstream_rq_total.rate["{#CLUSTER_NAME}"]'
            - uuid: 46f4d9b835274a7dafdda64563f482a9
              name: 'Envoy Proxy: [{#CLUSTER_NAME}] Upstream traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Envoy Proxy by HTTP'
                    key: 'envoy.cluster.upstream_cx_rx_bytes_total.rate["{#CLUSTER_NAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Envoy Proxy by HTTP'
                    key: 'envoy.cluster.upstream_cx_tx_bytes_total.rate["{#CLUSTER_NAME}"]'
          master_item:
            key: envoy.get_metrics
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - envoy_cluster_membership_total
            - type: JAVASCRIPT
              parameters:
                - |
                  var lookup = {},
                  	result = [];
                  
                  JSON.parse(value).forEach(function (item) {
                  		var envoy_cluster_name = item.labels.envoy_cluster_name;
                  
                  		if (lookup[envoy_cluster_name]) {
                  			return;
                  		}
                  		lookup[envoy_cluster_name] = 1;
                  		result.push({
                  			'{#CLUSTER_NAME}': envoy_cluster_name
                  		});
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: ea40e02e3b4e40ea989612949a1a8bef
          name: 'HTTP metrics discovery'
          type: DEPENDENT
          key: envoy.lld.http
          item_prototypes:
            - uuid: f4106316b7a44555bd2fcb98ed291a23
              name: 'HTTP ["{#CONN_MANAGER}"]: Connections, active'
              type: DEPENDENT
              key: 'envoy.http.downstream_cx_active["{#CONN_MANAGER}"]'
              value_type: FLOAT
              description: 'Total active connections.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_http_downstream_cx_active{envoy_http_conn_manager_prefix = "{#CONN_MANAGER}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: http
                - tag: connection-manager
                  value: '{#CONN_MANAGER}'
            - uuid: d5f88107012a4a41a86cb9a76bf8ebc5
              name: 'HTTP ["{#CONN_MANAGER}"]: Bytes in, rate'
              type: DEPENDENT
              key: 'envoy.http.downstream_cx_rx_bytes_total.rate["{#CONN_MANAGER}"]'
              value_type: FLOAT
              description: 'Total bytes received per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_http_downstream_cx_rx_bytes_total{envoy_http_conn_manager_prefix = "{#CONN_MANAGER}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: http
                - tag: connection-manager
                  value: '{#CONN_MANAGER}'
            - uuid: cff73e6c597d4103bdf6445b0910a434
              name: 'HTTP ["{#CONN_MANAGER}"]: Connections, rate'
              type: DEPENDENT
              key: 'envoy.http.downstream_cx_total["{#CONN_MANAGER}"]'
              value_type: FLOAT
              units: Rps
              description: 'Total connections per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_http_downstream_cx_total{envoy_http_conn_manager_prefix = "{#CONN_MANAGER}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: http
                - tag: connection-manager
                  value: '{#CONN_MANAGER}'
            - uuid: a0bc5e6a55af4fa29869f05c1c0943f6
              name: 'HTTP ["{#CONN_MANAGER}"]: Bytes out, rate'
              type: DEPENDENT
              key: 'envoy.http.downstream_cx_tx_bytes_tota.rate["{#CONN_MANAGER}"]'
              value_type: FLOAT
              description: 'Total bytes sent per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_http_downstream_cx_tx_bytes_total{envoy_http_conn_manager_prefix = "{#CONN_MANAGER}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: http
                - tag: connection-manager
                  value: '{#CONN_MANAGER}'
            - uuid: 19ce2a7cc34c4b49ad0117c62241eabf
              name: 'HTTP ["{#CONN_MANAGER}"]: Requests, active'
              type: DEPENDENT
              key: 'envoy.http.downstream_rq_active["{#CONN_MANAGER}"]'
              value_type: FLOAT
              description: 'Total active requests.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_http_downstream_rq_active{envoy_http_conn_manager_prefix = "{#CONN_MANAGER}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: http
                - tag: connection-manager
                  value: '{#CONN_MANAGER}'
            - uuid: df31ba8ca0db4b2daade17a9a54273cf
              name: 'HTTP ["{#CONN_MANAGER}"]: Requests timeout, rate'
              type: DEPENDENT
              key: 'envoy.http.downstream_rq_timeout["{#CONN_MANAGER}"]'
              value_type: FLOAT
              description: 'Total requests closed due to a timeout on the request path per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_http_downstream_rq_timeout{envoy_http_conn_manager_prefix = "{#CONN_MANAGER}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: http
                - tag: connection-manager
                  value: '{#CONN_MANAGER}'
            - uuid: 87cc859a403348a2b7bcfa398b3150c8
              name: 'HTTP ["{#CONN_MANAGER}"]: Requests, rate'
              type: DEPENDENT
              key: 'envoy.http.downstream_rq_total.rate["{#CONN_MANAGER}"]'
              value_type: FLOAT
              units: Rps
              description: 'Total active connections per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_http_downstream_rq_total{envoy_http_conn_manager_prefix = "{#CONN_MANAGER}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: http
                - tag: connection-manager
                  value: '{#CONN_MANAGER}'
          graph_prototypes:
            - uuid: 71b114ee64d34d74a32b18e2f7d25d8c
              name: 'Envoy Proxy: [{#CLUSTER_NAME}] Downstream traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Envoy Proxy by HTTP'
                    key: 'envoy.http.downstream_cx_rx_bytes_total.rate["{#CONN_MANAGER}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Envoy Proxy by HTTP'
                    key: 'envoy.http.downstream_cx_tx_bytes_tota.rate["{#CONN_MANAGER}"]'
          master_item:
            key: envoy.get_metrics
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - envoy_http_downstream_rq_total
            - type: JAVASCRIPT
              parameters:
                - |
                  var lookup = {},
                  	result = [];
                  
                  JSON.parse(value).forEach(function (item) {
                  		var envoy_http_conn_manager_prefix = item.labels.envoy_http_conn_manager_prefix;
                  
                  		if (lookup[envoy_http_conn_manager_prefix]) {
                  			return;
                  		}
                  		lookup[envoy_http_conn_manager_prefix] = 1;
                  		result.push({
                  			'{#CONN_MANAGER}': envoy_http_conn_manager_prefix
                  		});
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 953541f62c8c461795c2ebed7f4f52cf
          name: 'Listeners metrics discovery'
          type: DEPENDENT
          key: envoy.lld.listeners
          item_prototypes:
            - uuid: 3ecae47c57984a6ab5ff854ce2e5415e
              name: 'Listener ["{#LISTENER_ADDRESS}"]: Connections, active'
              type: DEPENDENT
              key: 'envoy.listener.downstream_cx_active["{#LISTENER_ADDRESS}"]'
              description: 'Total active connections.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_listener_downstream_cx_active{envoy_listener_address = "{#LISTENER_ADDRESS}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: listener
                - tag: listener-address
                  value: '{#LISTENER_ADDRESS}'
            - uuid: 7cc50e3001ac4a8ca433529c52a56e83
              name: 'Listener ["{#LISTENER_ADDRESS}"]: Connections, rate'
              type: DEPENDENT
              key: 'envoy.listener.downstream_cx_total.rate["{#LISTENER_ADDRESS}"]'
              value_type: FLOAT
              description: 'Total connections per second.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_listener_downstream_cx_total{envoy_listener_address = "{#LISTENER_ADDRESS}"}'
                    - function
                    - sum
                - type: CHANGE_PER_SECOND
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: listener
                - tag: listener-address
                  value: '{#LISTENER_ADDRESS}'
            - uuid: 5c155a0d2fd14623ba51670e4083ecee
              name: 'Listener ["{#LISTENER_ADDRESS}"]: Sockets, undergoing'
              type: DEPENDENT
              key: 'envoy.listener.downstream_pre_cx_active["{#LISTENER_ADDRESS}"]'
              description: 'Sockets currently undergoing listener filter processing.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'envoy_listener_downstream_pre_cx_active{envoy_listener_address = "{#LISTENER_ADDRESS}"}'
                    - function
                    - sum
              master_item:
                key: envoy.get_metrics
              tags:
                - tag: component
                  value: listener
                - tag: listener-address
                  value: '{#LISTENER_ADDRESS}'
          master_item:
            key: envoy.get_metrics
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - envoy_listener_downstream_cx_active
            - type: JAVASCRIPT
              parameters:
                - |
                  var lookup = {},
                  	result = [];
                  
                  JSON.parse(value).forEach(function (item) {
                  		var envoy_listener_address = item.labels.envoy_listener_address;
                  
                  		if (lookup[envoy_listener_address]) {
                  			return;
                  		}
                  		lookup[envoy_listener_address] = 1;
                  		result.push({
                  			'{#LISTENER_ADDRESS}': envoy_listener_address
                  		});
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
      tags:
        - tag: class
          value: software
        - tag: target
          value: envoy-proxy
      macros:
        - macro: '{$ENVOY.CERT.MIN}'
          value: '7'
          description: 'Minimum number of days before certificate expiration used for trigger expression.'
          config:
            type: TEXT
            priority: '3'
            section_name: Other
            label: 'Certificate expiration threshold (days)'
            description: 'Minimum number of days before certificate expiration used for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ENVOY.METRICS.PATH}'
          value: /stats/prometheus
          description: 'The path Zabbix will scrape metrics in prometheus format from.'
          config:
            type: TEXT
            priority: '2'
            label: 'Metrics scrape path'
            description: 'The path Zabbix will scrape metrics in prometheus format from.'
            required: 'YES'
        - macro: '{$ENVOY.URL}'
          value: 'http://localhost:9901'
          description: 'Instance URL.'
          config:
            type: TEXT
            priority: '1'
            label: 'Instance URL'
            description: 'Instance URL.'
            required: 'YES'
      valuemaps:
        - uuid: 2152e7a114f3489eb6ea80b948c0db5c
          name: 'Envoy listener manager'
          mappings:
            - value: '0'
              newvalue: 'Not started'
            - value: '1'
              newvalue: Started
        - uuid: c05c038099d74d11b6fef057518a1fc9
          name: 'Envoy server live'
          mappings:
            - value: '0'
              newvalue: 'Not Live'
            - value: '1'
              newvalue: Live
        - uuid: f467d440b03e4dab8cc4b15f87185eb5
          name: 'Envoy server state'
          mappings:
            - value: '0'
              newvalue: Live
            - value: '1'
              newvalue: Draining
            - value: '2'
              newvalue: 'Pre initializing'
            - value: '3'
              newvalue: Initializing
    - uuid: b25b8b517a4743c48037bfa10af3dc3c
      template: 'Etcd by HTTP'
      name: 'Etcd by HTTP'
      description: |
        This template is designed to monitor 'etcd' by Zabbix that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        The template 'Etcd by HTTP' — collects metrics by help of the HTTP agent from '/metrics' endpoint.
        
        Refer to the vendor documentation:
        https://etcd.io/docs/v3.5/op-guide/monitoring/#metrics-endpoint
        
        For the users of 'etcd version <= 3.4':
        
        In 'etcd v3.5' some metrics have been deprecated. See more details on 'Upgrade etcd from 3.4 to 3.5':
        https://etcd.io/docs/v3.4/upgrades/upgrade_3_5/
        Please upgrade your 'etcd' instance, or use older 'Etcd by HTTP' template version.
        
        Setup:
        
        1. Make sure that 'etcd' allows the collection of metrics. You can test it by running:
        curl -L http://localhost:2379/metrics
        
        2. Check if 'etcd' is accessible from Zabbix proxy or Zabbix server depending on where you are planning to do the monitoring. To verify it, run:
        curl -L  http://<etcd_node_address>:2379/metrics
        
        3. Add the template to the 'etcd' node. Set the hostname or IP address of the 'etcd' host in the '{$ETCD.HOST}' macro. By default, the template uses a client's port.
        You can configure metrics endpoint location by adding '--listen-metrics-urls' flag.
        
        For more details, see the etcd documentation:
        https://etcd.io/docs/v3.5/op-guide/configuration/#profiling-and-monitoring
        
        Additional points to consider:
        
        - If you have specified a non-standard port for 'etcd', don't forget to change macros: '{$ETCD.SCHEME}' and '{$ETCD.PORT}'.
        - You can set '{$ETCD.USERNAME}' and '{$ETCD.PASSWORD}' macros in the template to use on a host level if necessary.
        - To test availability, run : 'zabbix_get -s etcd-host -k etcd.health'.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed to monitor `etcd` by Zabbix that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        The template `Etcd by HTTP` — collects metrics by help of the HTTP agent from `/metrics` endpoint.
        
        > Refer to the [`vendor documentation`](https://etcd.io/docs/v3.5/op-guide/monitoring/#metrics-endpoint).
        
        **For the users of `etcd version <= 3.4` !**
        
        > In `etcd v3.5` some metrics have been deprecated. See more details on [`Upgrade etcd from 3.4 to 3.5`](https://etcd.io/docs/v3.4/upgrades/upgrade_3_5/).
        Please upgrade your `etcd` instance, or use older `Etcd by HTTP` template version.
        
        ## Setup
        
        1. Make sure that `etcd` allows the collection of metrics. You can test it by running: `curl -L http://localhost:2379/metrics`.
        
        2. Check if `etcd` is accessible from Zabbix proxy or Zabbix server depending on where you are planning to do the monitoring. To verify it, run `curl -L  http://<etcd_node_address>:2379/metrics`.
        
        3. Add the template to the `etcd` node. Set the hostname or IP address of the `etcd` host in the `Etcd API host` host wizard configuration field. By default, the template uses a client's port.
        You can configure metrics endpoint location by adding `--listen-metrics-urls` flag.
        
        For more details, see the [`etcd documentation`](https://etcd.io/docs/v3.5/op-guide/configuration/#profiling-and-monitoring).
        
        Additional points to consider:
        
        - If you have specified a non-standard port for `etcd`, don't forget to change host wizard configuration fields: `Etcd request scheme` and `Etcd API port`.
        - To test availability, run: `zabbix_get -s etcd-host -k etcd.health`.
        - See the host wizard configuration fields section, as it will set the trigger values.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 32a59c8e93e141d6a471266df6dbfbd3
          name: 'Cluster version'
          type: DEPENDENT
          key: etcd.cluster.version
          value_type: CHAR
          description: 'The version of the `etcd cluster`.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.etcdcluster
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: etcd.get_version
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 7c87424c4fb34c56bc9b976755b4ec02
              expression: 'last(/Etcd by HTTP/etcd.cluster.version,#1)<>last(/Etcd by HTTP/etcd.cluster.version,#2) and length(last(/Etcd by HTTP/etcd.cluster.version))>0'
              name: 'Etcd: Cluster version has changed'
              event_name: 'Etcd: Cluster version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'Etcd version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 04b0fa552b7d4267b4c5b67ee82ef5f1
          name: CPU
          type: DEPENDENT
          key: etcd.cpu.util
          value_type: FLOAT
          units: s
          description: 'The total user and system CPU time spent in seconds.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_cpu_seconds_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: cpu
        - uuid: bfa5bd42637642808802f7b2485a0c4d
          name: 'DB size'
          type: DEPENDENT
          key: etcd.db.size
          value_type: FLOAT
          units: B
          description: 'The total size of the underlying database.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_mvcc_db_total_size_in_bytes
                - value
                - ''
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: database
        - uuid: a5bc7ffb090641ab92f537b38b6055e5
          name: 'Deletes per second'
          type: DEPENDENT
          key: etcd.delete.rate
          value_type: FLOAT
          units: rps
          description: 'The number of deletes seen by this member per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_mvcc_delete_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: operations
        - uuid: 183843bd93f84dc887a03fb638b2d323
          name: 'Pending events'
          type: DEPENDENT
          key: etcd.events.sent.rate
          description: 'The total number of pending events to be sent.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_debugging_mvcc_pending_events_total
                - value
                - ''
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: events
        - uuid: 34ffab33275a400ab88e5217dee5ef96
          name: 'Get node metrics'
          type: HTTP_AGENT
          key: etcd.get_metrics
          history: '0'
          value_type: TEXT
          authtype: BASIC
          username: '{$ETCD.USER}'
          password: '{$ETCD.PASSWORD}'
          url: '{$ETCD.SCHEME}://{$ETCD.HOST}:{$ETCD.PORT}/metrics'
          tags:
            - tag: component
              value: raw
        - uuid: fdf7593420ab42b2a5af8f8b8030b517
          name: 'Get version'
          type: HTTP_AGENT
          key: etcd.get_version
          history: '0'
          value_type: TEXT
          url: '{$ETCD.SCHEME}://{$ETCD.HOST}:{$ETCD.PORT}/version'
          tags:
            - tag: component
              value: application
        - uuid: d23baf75628043e193ba0a607e1b4215
          name: 'RPCs received per second'
          type: DEPENDENT
          key: etcd.grpc.received.rate
          value_type: FLOAT
          units: rps
          description: 'The number of RPC stream messages received on the server.'
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - grpc_server_msg_received_total
            - type: JAVASCRIPT
              parameters:
                - |
                  var valueArr = JSON.parse(value);
                  return valueArr.reduce(function (acc, obj) {
                  	return acc + parseFloat(obj['value']);
                  }, 0);
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: grpc
        - uuid: eda81182710e47e1b5f2f21bb05b4775
          name: 'RPCs sent per second'
          type: DEPENDENT
          key: etcd.grpc.sent.rate
          value_type: FLOAT
          units: rps
          description: 'The number of gRPC stream messages sent by the server.'
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - grpc_server_msg_sent_total
            - type: JAVASCRIPT
              parameters:
                - |
                  var valueArr = JSON.parse(value);
                  return valueArr.reduce(function (acc, obj) {
                  	return acc + parseFloat(obj['value']);
                  }, 0);
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: grpc
        - uuid: bf59a130b20d480d93eb9330750e8e28
          name: 'RPCs started per second'
          type: DEPENDENT
          key: etcd.grpc.started.rate
          value_type: FLOAT
          units: rps
          description: 'The number of RPCs started on the server.'
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - grpc_server_started_total
            - type: JAVASCRIPT
              parameters:
                - |
                  var valueArr = JSON.parse(value);
                  return valueArr.reduce(function (acc, obj) {
                  	return acc + parseFloat(obj['value']);
                  }, 0);
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: grpc
        - uuid: e03575f4c472410eb6fbcf731ac6aab2
          name: 'Server has a leader'
          type: DEPENDENT
          key: etcd.has.leader
          description: |
            It defines - whether or not a leader exists:
            1 - it exists;
            0 - it does not.
          valuemap:
            name: 'Etcd leader'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_server_has_leader
                - value
                - ''
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: leader
          triggers:
            - uuid: 20165719d521453bb239d818ac57805c
              expression: 'last(/Etcd by HTTP/etcd.has.leader)=0'
              name: 'Etcd: Member has no leader'
              priority: AVERAGE
              description: 'If a member does not have a leader, it is totally unavailable.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 3fde4db8b9684ba4b56ba915e48957b5
          name: 'Node health'
          type: HTTP_AGENT
          key: etcd.health
          authtype: BASIC
          username: '{$ETCD.USER}'
          password: '{$ETCD.PASSWORD}'
          valuemap:
            name: 'Etcd healthcheck'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.health
            - type: BOOL_TO_DECIMAL
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          url: '{$ETCD.SCHEME}://{$ETCD.HOST}:{$ETCD.PORT}/health'
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: 6acda7bdc9df4a4ab5b7cca76c6369f0
              expression: 'last(/Etcd by HTTP/etcd.health)=0'
              name: 'Etcd: Node healthcheck failed'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'See more details on https://etcd.io/docs/v3.5/op-guide/monitoring/#health-check.'
              dependencies:
                - name: 'Etcd: Service is unavailable'
                  expression: 'last(/Etcd by HTTP/net.tcp.service["{$ETCD.SCHEME}","{$ETCD.HOST}","{$ETCD.PORT}"])=0'
              tags:
                - tag: scope
                  value: availability
        - uuid: 923a408dd4514e808b6e2137a94f8140
          name: 'HTTP 4XX'
          type: DEPENDENT
          key: etcd.http.requests.4xx.rate
          value_type: FLOAT
          units: rps
          description: 'The number of handled failures of requests (non-watches), by the method (`GET/PUT` etc.), and the code `4XX`.'
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - 'etcd_http_failed_total{code=~"4.+"}'
            - type: JAVASCRIPT
              parameters:
                - |
                  var valueArr = JSON.parse(value);
                  return valueArr.reduce(function (acc, obj) {
                  	return acc + parseFloat(obj['value']);
                  }, 0);
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: http
            - tag: http-code
              value: 4xx
        - uuid: c0f27d4bfba344079a31ce8c10b22683
          name: 'HTTP 5XX'
          type: DEPENDENT
          key: etcd.http.requests.5xx.rate
          value_type: FLOAT
          units: rps
          description: 'The number of handled failures of requests (non-watches), by the method (`GET/PUT` etc.), and the code `5XX`.'
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - 'etcd_http_failed_total{code=~"5.+"}'
            - type: JAVASCRIPT
              parameters:
                - |
                  var valueArr = JSON.parse(value);
                  return valueArr.reduce(function (acc, obj) {
                  	return acc + parseFloat(obj['value']);
                  }, 0);
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: http
            - tag: http-code
              value: 5xx
          triggers:
            - uuid: 0302957e0f6b43389546e1cfb958ed9c
              expression: 'min(/Etcd by HTTP/etcd.http.requests.5xx.rate,5m)>{$ETCD.HTTP.FAIL.MAX.WARN}'
              name: 'Etcd: Too many HTTP requests failures'
              event_name: 'Etcd: Too many HTTP requests failures (over {$ETCD.HTTP.FAIL.MAX.WARN} for 5m)'
              priority: WARNING
              description: 'Too many requests failed on `etcd` instance with the `5xx HTTP code`.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 2a19db1c58ee4a509061fcb1b557c1a3
          name: 'HTTP requests received'
          type: DEPENDENT
          key: etcd.http.requests.rate
          value_type: FLOAT
          units: rps
          description: 'The number of requests received into the system (successfully parsed and `authd`).'
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - etcd_http_received_total
            - type: JAVASCRIPT
              parameters:
                - |
                  var valueArr = JSON.parse(value);
                  return valueArr.reduce(function (acc, obj) {
                  	return acc + parseFloat(obj['value']);
                  }, 0);
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: http
        - uuid: b3760811472440baad6a338f481ba13a
          name: 'Server is a leader'
          type: DEPENDENT
          key: etcd.is.leader
          description: |
            It defines - whether or not this member is a leader:
            1 - it is;
            0 - otherwise.
          valuemap:
            name: 'Etcd leader'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_server_is_leader
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: leader
          triggers:
            - uuid: 44d66eb1a332418daf4c3a1110db5458
              expression: 'nodata(/Etcd by HTTP/etcd.is.leader,30m)=1'
              name: 'Etcd: Failed to fetch info data'
              event_name: 'Etcd: Failed to fetch info data (or no data for 30m)'
              priority: WARNING
              description: 'Zabbix has not received any data for items for the last 30 minutes.'
              manual_close: 'YES'
              dependencies:
                - name: 'Etcd: Service is unavailable'
                  expression: 'last(/Etcd by HTTP/net.tcp.service["{$ETCD.SCHEME}","{$ETCD.HOST}","{$ETCD.PORT}"])=0'
              tags:
                - tag: scope
                  value: notice
        - uuid: ecd1ae9c038f4fc2b720ad562ced0191
          name: 'Keys compacted per second'
          type: DEPENDENT
          key: etcd.keys.compacted.rate
          value_type: FLOAT
          description: 'The number of DB keys compacted per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_debugging_mvcc_db_compaction_keys_total
                - value
                - ''
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: keys
        - uuid: a3f910efb0a04cc494c07b8703f9d2ec
          name: 'Keys expired per second'
          type: DEPENDENT
          key: etcd.keys.expired.rate
          value_type: FLOAT
          description: 'The number of expired keys per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_debugging_store_expires_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: keys
        - uuid: fbda737014544cf1bcf544a48aa6e48b
          name: 'Keys total'
          type: DEPENDENT
          key: etcd.keys.total
          description: 'The total number of keys.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_debugging_mvcc_keys_total
                - value
                - ''
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: keys
        - uuid: e45ba61d99b8432b86f5797a2cfdb416
          name: 'Leader changes'
          type: DEPENDENT
          key: etcd.leader.changes
          description: 'The number of leader changes the member has seen since its start.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_server_leader_changes_seen_total
                - value
                - ''
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: leader
          triggers:
            - uuid: 1ea623927179489890a5a73eeb8177f7
              expression: '(max(/Etcd by HTTP/etcd.leader.changes,15m)-min(/Etcd by HTTP/etcd.leader.changes,15m))>{$ETCD.LEADER.CHANGES.MAX.WARN}'
              name: 'Etcd: Instance has seen too many leader changes'
              event_name: 'Etcd: Instance has seen too many leader changes (over {$ETCD.LEADER.CHANGES.MAX.WARN} for 15m)'
              priority: WARNING
              description: 'Rapid leadership changes impact the performance of `etcd` significantly. It also signals that the leader is unstable, perhaps due to network connectivity issues or excessive load hitting the `etcd cluster`.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 348e15d2ec3a4bb88e2ca371f96c2f00
          name: 'Maximum open file descriptors'
          type: DEPENDENT
          key: etcd.max.fds
          value_type: FLOAT
          description: 'The Maximum number of open file descriptors.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_max_fds
                - value
                - ''
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: fds
        - uuid: d016b8674ebd4251943f2e94b22f5ff2
          name: 'Client gRPC received bytes per second'
          type: DEPENDENT
          key: etcd.network.grpc.received.rate
          value_type: FLOAT
          units: Bps
          description: 'The number of bytes received from gRPC clients per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_network_client_grpc_received_bytes_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: grpc
        - uuid: e50d2d088c6448dbb3ecaeebc3b2b8f1
          name: 'Client gRPC sent bytes per second'
          type: DEPENDENT
          key: etcd.network.grpc.sent.rate
          value_type: FLOAT
          units: Bps
          description: 'The number of bytes sent from gRPC clients per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_network_client_grpc_sent_bytes_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: grpc
        - uuid: d5099d4cdb3044ba95935c2aea2b6352
          name: 'Open file descriptors'
          type: DEPENDENT
          key: etcd.open.fds
          value_type: FLOAT
          description: 'The number of open file descriptors.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_open_fds
                - value
                - ''
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: fds
        - uuid: a2927b1e85af41cab9c28b1b79c229ea
          name: 'Proposals applied per second'
          type: DEPENDENT
          key: etcd.proposals.applied.rate
          value_type: FLOAT
          description: 'The number of consensus proposals applied.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_server_proposals_applied_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: proposals
        - uuid: e829f3df055e42dfbce5f27eb7ca487c
          name: 'Proposals committed per second'
          type: DEPENDENT
          key: etcd.proposals.committed.rate
          value_type: FLOAT
          description: 'The number of consensus proposals committed.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_server_proposals_committed_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: proposals
        - uuid: 6b45b99526394a219d31b5c22cb98c85
          name: 'Proposals failed per second'
          type: DEPENDENT
          key: etcd.proposals.failed.rate
          value_type: FLOAT
          description: 'The number of failed proposals seen.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_server_proposals_failed_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: proposals
          triggers:
            - uuid: 432cea8bddd742ca98528be2fbc7e35e
              expression: 'min(/Etcd by HTTP/etcd.proposals.failed.rate,5m)>{$ETCD.PROPOSAL.FAIL.MAX.WARN}'
              name: 'Etcd: Too many proposal failures'
              event_name: 'Etcd: Too many proposal failures (over {$ETCD.PROPOSAL.FAIL.MAX.WARN} for 5m)'
              priority: WARNING
              description: 'Normally related to two issues: temporary failures related to a leader election or longer downtime caused by a loss of quorum in the cluster.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 1c506ff69e7b4564a6d95fd35b1a11fd
          name: 'Proposals pending'
          type: DEPENDENT
          key: etcd.proposals.pending
          description: 'The current number of pending proposals to commit.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_server_proposals_pending
                - value
                - ''
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: proposals
          triggers:
            - uuid: 5feefc4dd5d14fe2b56dd63029b57026
              expression: 'min(/Etcd by HTTP/etcd.proposals.pending,5m)>{$ETCD.PROPOSAL.PENDING.MAX.WARN}'
              name: 'Etcd: Too many proposals are queued to commit'
              event_name: 'Etcd: Too many proposals are queued to commit (over {$ETCD.PROPOSAL.PENDING.MAX.WARN} for 5m)'
              priority: WARNING
              description: 'Rising pending proposals suggests there is a high client load, or the member cannot commit proposals.'
              tags:
                - tag: scope
                  value: performance
        - uuid: bd7398507c274bfab53339380df16761
          name: 'PUT per second'
          type: DEPENDENT
          key: etcd.put.rate
          value_type: FLOAT
          units: rps
          description: 'The number of puts seen by this member per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_mvcc_put_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: operations
        - uuid: b744c07f3290467b96b21ea38ad5d497
          name: 'Range per second'
          type: DEPENDENT
          key: etcd.range.rate
          value_type: FLOAT
          units: rps
          description: 'The number of ranges seen by this member per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_debugging_mvcc_range_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: operations
        - uuid: 88c91b36eca94fd2b357a67d171dc621
          name: 'Reads per second'
          type: DEPENDENT
          key: etcd.reads.rate
          value_type: FLOAT
          units: rps
          description: 'The number of read actions by `get/getRecursive`, local to this member.'
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - etcd_debugging_store_reads_total
            - type: JAVASCRIPT
              parameters:
                - |
                  var valueArr = JSON.parse(value);
                  return valueArr.reduce(function (acc, obj) {
                  	return acc + parseFloat(obj['value']);
                  }, 0);
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: store
        - uuid: 4b881e32094e4f478c5d0849cb5d07a7
          name: 'Resident memory'
          type: DEPENDENT
          key: etcd.res.bytes
          value_type: FLOAT
          units: B
          description: 'The size of resident memory expressed in bytes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_resident_memory_bytes
                - value
                - ''
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: memory
        - uuid: dee9ed8897cf4d3582957707ea09cdf8
          name: 'Server version'
          type: DEPENDENT
          key: etcd.server.version
          value_type: CHAR
          description: 'The version of the `etcd server`.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.etcdserver
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: etcd.get_version
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: cfb2fc467b224ef694d59b5c081ed965
              expression: 'last(/Etcd by HTTP/etcd.server.version,#1)<>last(/Etcd by HTTP/etcd.server.version,#2) and length(last(/Etcd by HTTP/etcd.server.version))>0'
              name: 'Etcd: Server version has changed'
              event_name: 'Etcd: Server version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'Etcd version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: b14c787c716146e990bc388d277a2803
          name: 'Transaction per second'
          type: DEPENDENT
          key: etcd.txn.rate
          value_type: FLOAT
          units: rps
          description: 'The number of transactions seen by this member per second.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - etcd_debugging_mvcc_range_total
                - value
                - ''
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: transactions
        - uuid: 98ec9085d621446aa462efc86cf93905
          name: Uptime
          type: DEPENDENT
          key: etcd.uptime
          value_type: FLOAT
          units: s
          description: '`Etcd` server uptime.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_start_time_seconds
                - value
                - ''
            - type: JAVASCRIPT
              parameters:
                - 'return (Math.floor(Date.now() / 1000) - Number(value));'
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 6843369969f5410a840494104d71fe1f
              expression: 'last(/Etcd by HTTP/etcd.uptime)<10m'
              name: 'Etcd: Host has been restarted'
              event_name: 'Etcd: {HOST.NAME} has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: c35810b8b7bc4a62970b5293fb2d8fb2
          name: 'Virtual memory'
          type: DEPENDENT
          key: etcd.virtual.bytes
          value_type: FLOAT
          units: B
          description: 'The size of virtual memory expressed in bytes.'
          preprocessing:
            - type: PROMETHEUS_PATTERN
              parameters:
                - process_virtual_memory_bytes
                - value
                - ''
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: memory
        - uuid: 16c041fc189248bfaaa5826ffaf38459
          name: 'Writes per second'
          type: DEPENDENT
          key: etcd.writes.rate
          value_type: FLOAT
          units: rps
          description: 'The number of writes (e.g., `set/compareAndDelete`) seen by this member.'
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - etcd_debugging_store_writes_total
            - type: JAVASCRIPT
              parameters:
                - |
                  var valueArr = JSON.parse(value);
                  return valueArr.reduce(function (acc, obj) {
                  	return acc + parseFloat(obj['value']);
                  }, 0);
            - type: CHANGE_PER_SECOND
          master_item:
            key: etcd.get_metrics
          tags:
            - tag: component
              value: store
        - uuid: a0f94f429b99432e86d15ffa74d6eada
          name: 'Service''s TCP port state'
          type: SIMPLE
          key: 'net.tcp.service["{$ETCD.SCHEME}","{$ETCD.HOST}","{$ETCD.PORT}"]'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 74164f0783ae4227ba44f3e865fee3bd
              expression: 'last(/Etcd by HTTP/net.tcp.service["{$ETCD.SCHEME}","{$ETCD.HOST}","{$ETCD.PORT}"])=0'
              name: 'Etcd: Service is unavailable'
              priority: AVERAGE
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 5e6121383e5d4f3eb1150a2068a4633b
          name: 'gRPC codes discovery'
          type: DEPENDENT
          key: etcd.grpc_code.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GRPC.CODE}'
                value: '{$ETCD.GRPC_CODE.MATCHES}'
              - macro: '{#GRPC.CODE}'
                value: '{$ETCD.GRPC_CODE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 7d316cbec2ce4718ac133d90b7a89585
              name: 'RPCs completed with code {#GRPC.CODE}'
              type: DEPENDENT
              key: 'etcd.grpc.handled.rate[{#GRPC.CODE}]'
              value_type: FLOAT
              units: rps
              description: 'The number of RPCs completed on the server with grpc_code {#GRPC.CODE}.'
              preprocessing:
                - type: PROMETHEUS_TO_JSON
                  parameters:
                    - 'grpc_server_handled_total{grpc_method="{#GRPC.CODE}"}'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      var valueArr = JSON.parse(value);
                      return valueArr.reduce(function (acc, obj) {
                      	return acc + parseFloat(obj['value']);
                      }, 0);
                - type: CHANGE_PER_SECOND
              master_item:
                key: etcd.get_metrics
              tags:
                - tag: component
                  value: grpc
                - tag: grpc-code
                  value: '{#GRPC.CODE}'
              trigger_prototypes:
                - uuid: 459b6ee5735047d597a6a4ab41b76e21
                  expression: 'min(/Etcd by HTTP/etcd.grpc.handled.rate[{#GRPC.CODE}],5m)>{$ETCD.GRPC.ERRORS.MAX.WARN}'
                  name: 'Etcd: Too many failed gRPC requests with code: {#GRPC.CODE}'
                  event_name: 'Etcd: Too many failed gRPC requests with code: {#GRPC.CODE} (over {$ETCD.GRPC.ERRORS.MAX.WARN} in 5m)'
                  priority: WARNING
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: etcd.get_metrics
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - grpc_server_handled_total
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value),
                  	lookup = {},
                  	result = [];
                  for (var item, i = 0; item = data[i++];) {
                  	var code = item.labels.grpc_code;
                  	if (!(code in lookup)) {
                  		lookup[code] = 1;
                  		result.push({ "{#GRPC.CODE}": code });
                  	}
                  }
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: trigger
              step: '1'
              filter:
                conditions:
                  - macro: '{#GRPC.CODE}'
                    value: '{$ETCD.GRPC_CODE.TRIGGER.MATCHES}'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: 'Too many failed gRPC requests'
                  discover: DISCOVER
                  status: ENABLED
        - uuid: b7b527ee30b84a569afcd1f85b705810
          name: 'Peers discovery'
          type: DEPENDENT
          key: etcd.peer.discovery
          item_prototypes:
            - uuid: 4129aa7b8acf4ca3b5476461fe5275c9
              name: 'Etcd peer {#ETCD.PEER}: Bytes received'
              type: DEPENDENT
              key: 'etcd.bytes.received.rate[{#ETCD.PEER}]'
              value_type: FLOAT
              units: Bps
              description: 'The number of bytes received from a peer with the ID `{#ETCD.PEER}`.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'etcd_network_peer_received_bytes_total{From="{#ETCD.PEER}"}'
                    - value
                    - ''
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: etcd.get_metrics
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: peers
                - tag: peer
                  value: '{#ETCD.PEER}'
            - uuid: 8f5fecbabe474baaab40df46879401af
              name: 'Etcd peer {#ETCD.PEER}: Bytes sent'
              type: DEPENDENT
              key: 'etcd.bytes.sent.rate[{#ETCD.PEER}]'
              value_type: FLOAT
              units: Bps
              description: 'The number of bytes sent to a peer with the ID `{#ETCD.PEER}`.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'etcd_network_peer_sent_bytes_total{To="{#ETCD.PEER}"}'
                    - value
                    - ''
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: etcd.get_metrics
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: peers
                - tag: peer
                  value: '{#ETCD.PEER}'
            - uuid: 2521ccfc16fc43069001883b85aa0243
              name: 'Etcd peer {#ETCD.PEER}: Receive failures'
              type: DEPENDENT
              key: 'etcd.received.fail.rate[{#ETCD.PEER}]'
              value_type: FLOAT
              units: rps
              description: 'The number of received failures from a peer with the ID `{#ETCD.PEER}`.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'etcd_network_peer_received_failures_total{To="{#ETCD.PEER}"}'
                    - value
                    - ''
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: etcd.get_metrics
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: peers
                - tag: peer
                  value: '{#ETCD.PEER}'
            - uuid: 5756f1a16e5c42b79f6d6225c5382599
              name: 'Etcd peer {#ETCD.PEER}: Send failures'
              type: DEPENDENT
              key: 'etcd.sent.fail.rate[{#ETCD.PEER}]'
              value_type: FLOAT
              units: rps
              description: 'The number of sent failures from a peer with the ID `{#ETCD.PEER}`.'
              preprocessing:
                - type: PROMETHEUS_PATTERN
                  parameters:
                    - 'etcd_network_peer_sent_failures_total{To="{#ETCD.PEER}"}'
                    - value
                    - ''
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: etcd.get_metrics
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: peers
                - tag: peer
                  value: '{#ETCD.PEER}'
          master_item:
            key: etcd.get_metrics
          lld_macro_paths:
            - lld_macro: '{#ETCD.PEER}'
              path: $.labels.To
          preprocessing:
            - type: PROMETHEUS_TO_JSON
              parameters:
                - etcd_network_peer_sent_bytes_total
      tags:
        - tag: class
          value: software
        - tag: target
          value: etcd
      macros:
        - macro: '{$ETCD.GRPC.ERRORS.MAX.WARN}'
          value: '1'
          description: 'The maximum number of gRPC request failures.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Max gRPC request failures'
            description: 'The maximum number of gRPC request failures.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ETCD.GRPC_CODE.MATCHES}'
          value: '.*'
          description: 'The filter of discoverable gRPC codes. See more details on https://github.com/grpc/grpc/blob/master/doc/statuscodes.md.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'gRPC codes filter (include)'
            description: 'The filter of discoverable gRPC codes. See more details on https://github.com/grpc/grpc/blob/master/doc/statuscodes.md.'
        - macro: '{$ETCD.GRPC_CODE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'The filter to exclude discovered gRPC codes. See more details on https://github.com/grpc/grpc/blob/master/doc/statuscodes.md.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'gRPC codes filter (exclude)'
            description: 'The filter to exclude discovered gRPC codes. See more details on https://github.com/grpc/grpc/blob/master/doc/statuscodes.md.'
        - macro: '{$ETCD.GRPC_CODE.TRIGGER.MATCHES}'
          value: Aborted|Unavailable
          description: 'The filter of discoverable gRPC codes, which will create triggers.'
          config:
            type: TEXT
            priority: '14'
            section_name: Filters
            label: 'gRPC codes trigger filter (include)'
            description: 'The filter of discoverable gRPC codes, which will create triggers.'
        - macro: '{$ETCD.HOST}'
          description: 'The hostname or IP address of the `etcd` API endpoint.'
          config:
            type: TEXT
            priority: '1'
            label: 'Etcd API host'
            description: 'The hostname or IP address of the `etcd` API endpoint.'
            required: 'YES'
        - macro: '{$ETCD.HTTP.FAIL.MAX.WARN}'
          value: '2'
          description: 'The maximum number of HTTP request failures.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Max HTTP request failures'
            description: 'The maximum number of HTTP request failures.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ETCD.LEADER.CHANGES.MAX.WARN}'
          value: '5'
          description: 'The maximum number of leader changes.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Max leader changes'
            description: 'The maximum number of leader changes.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ETCD.OPEN.FDS.MAX.WARN}'
          value: '90'
          description: 'The maximum percentage of used file descriptors.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Max file descriptors used (%)'
            description: 'The maximum percentage of used file descriptors. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ETCD.PASSWORD}'
          config:
            type: TEXT
            priority: '5'
            label: 'Etcd password'
            required: 'YES'
        - macro: '{$ETCD.PORT}'
          value: '2379'
          description: 'The port of the `etcd` API endpoint.'
          config:
            type: TEXT
            priority: '2'
            label: 'Etcd API port'
            description: 'The port of the `etcd` API endpoint. In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ETCD.PROPOSAL.FAIL.MAX.WARN}'
          value: '2'
          description: 'The maximum number of proposal failures.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Max proposal failures'
            description: 'The maximum number of proposal failures.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ETCD.PROPOSAL.PENDING.MAX.WARN}'
          value: '5'
          description: 'The maximum number of proposals in queue.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Max proposals in queue'
            description: 'The maximum number of proposals in queue.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ETCD.SCHEME}'
          value: http
          description: 'The request scheme which may be `http` or `https`.'
          config:
            type: LIST
            priority: '3'
            label: 'Etcd request scheme'
            description: 'The request scheme which may be `http` or `https`.'
            required: 'YES'
            options:
              - value: http
                text: http
              - value: https
                text: https
        - macro: '{$ETCD.USER}'
          config:
            type: TEXT
            priority: '4'
            label: 'Etcd username'
            required: 'YES'
      dashboards:
        - uuid: 5b0ffbb731cd4415a2edbc74978e0276
          name: 'Etcd Overview'
          pages:
            - widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Etcd by HTTP'
                        name: 'Etcd: Proposals rate'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Etcd by HTTP'
                        name: 'Etcd: gRPC client traffic'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Etcd by HTTP'
                        name: 'Etcd: gRPC requests rate'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graph
                  'y': '15'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Etcd by HTTP'
                        name: 'Etcd: File descriptors'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Etcd by HTTP'
                        name: 'Etcd: Read/Write rate'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Etcd by HTTP'
                        name: 'Etcd: HTTP requests rate'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Etcd by HTTP'
                        name: 'Etcd: Memory usage'
                    - type: STRING
                      name: reference
                      value: AAAAF
      valuemaps:
        - uuid: f25e21a70baa4e009bdbcb44acb1a22e
          name: 'Etcd healthcheck'
          mappings:
            - value: '0'
              newvalue: Failed
            - value: '1'
              newvalue: Ok
        - uuid: 7bcaf8a520e24613a96d49e63a91a55b
          name: 'Etcd leader'
          mappings:
            - value: '0'
              newvalue: 'No'
            - value: '1'
              newvalue: 'Yes'
        - uuid: 1735a8d251b24c3fbab32e766064536b
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 3fb4020df2984b0ab64dfd8355ff5c65
      template: 'Hikvision camera by HTTP'
      name: 'Hikvision camera by HTTP'
      description: |
        This template is designed for the effortless deployment of Hikvision cameras monitoring by Zabbix via HTTP and doesn't require any external scripts.
        
        Sample device overview page:
        https://www.hikvision.com/en/products/IP-Products/Network-Cameras/
        
        Setup:
        
        1. Set the hostname or IP address of the Hikvision ISAPI host in the '{$HIKVISION_ISAPI_HOST}' macro.
        
        2. Set the user name and password in the '{$PASSWORD}' and '{$USER}' macros.
        
        3. Change other macros according to your camera configuration if necessary.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed for the effortless deployment of Hikvision cameras monitoring by Zabbix via HTTP and doesn't require any external scripts.
        
        [`Sample device overview page`](https://www.hikvision.com/en/products/IP-Products/Network-Cameras/)
        
        ## Setup
        
        1. Set the hostname or IP address of the Hikvision ISAPI host in the `Address` host wizard configuration field.
        
        2. Set the user name and password in the `Password` and `Username` host wizard configuration fields.
        
        3. Change other host wizard configuration fields according to your camera configuration if necessary.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: 'Templates/Video surveillance'
      items:
        - uuid: e889b3a7e6044f0284081f9d6427b416
          name: 'Boot loader released date'
          type: DEPENDENT
          key: hikvision_cam.boot_released_date
          value_type: CHAR
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.bootReleasedDate
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 61c6f0073e604a449d8f724d762cfb7f
          name: 'Boot loader version'
          type: DEPENDENT
          key: hikvision_cam.boot_version
          value_type: CHAR
          inventory_link: SOFTWARE_APP_E
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.bootVersion
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 247a70ed0cc543d69183a6a793cd9978
          name: 'CPU utilization'
          type: DEPENDENT
          key: hikvision_cam.cpu.util
          value_type: FLOAT
          units: '%'
          description: 'CPU utilization in %'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceStatus.CPUList.CPU.cpuUtilization
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: hikvision_cam.get_status
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 0ae4dbcc05544fb7b67183fcf3b9654b
              expression: 'min(/Hikvision camera by HTTP/hikvision_cam.cpu.util,5m)>{$CPU.UTIL.CRIT}'
              name: 'Hikvision: High CPU utilization'
              event_name: 'Hikvision: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 7e65f407b515429caf415820dd633b0e
          name: 'Current device time'
          type: DEPENDENT
          key: hikvision_cam.current_device_time
          value_type: CHAR
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceStatus.currentDeviceTime
              error_handler: DISCARD_VALUE
          master_item:
            key: hikvision_cam.get_status
          tags:
            - tag: component
              value: system
        - uuid: 42b0f3ae08cf4730a52ea2ddda6f5bae
          name: 'Device description'
          type: DEPENDENT
          key: hikvision_cam.device_description
          value_type: CHAR
          inventory_link: NOTES
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.deviceDescription
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 4abc7dcef6ec4b97bd1350d2e93f58d4
          name: 'Device ID'
          type: DEPENDENT
          key: hikvision_cam.device_id
          value_type: CHAR
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.deviceID
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: f4e6f9d05fea4489a9eaa47effe66ceb
          name: 'Device location'
          type: DEPENDENT
          key: hikvision_cam.device_location
          value_type: CHAR
          inventory_link: LOCATION
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.deviceLocation
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 278a04c86c22419886aa64fad8e05c9e
          name: 'Device name'
          type: DEPENDENT
          key: hikvision_cam.device_name
          value_type: CHAR
          inventory_link: NAME
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.deviceName
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 84d86e688a31402a82798f9e2ff04ab8
          name: 'Device type'
          type: DEPENDENT
          key: hikvision_cam.device_type
          value_type: CHAR
          inventory_link: TYPE
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.deviceType
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 66ee550f4838455e9500561d790a76d1
          name: 'Encoder released date'
          type: DEPENDENT
          key: hikvision_cam.encoder_released_date
          value_type: CHAR
          inventory_link: SOFTWARE_APP_D
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.encoderReleasedDate
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 4798d54b70ee445293c12b3a8038b8c8
          name: 'Encoder version'
          type: DEPENDENT
          key: hikvision_cam.encoder_version
          value_type: CHAR
          inventory_link: SOFTWARE_APP_C
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.encoderVersion
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: ac6ee4d15c584709a7bdf2b89048aacc
          name: 'Firmware released date'
          type: DEPENDENT
          key: hikvision_cam.firmware_released_date
          value_type: CHAR
          inventory_link: SOFTWARE_APP_B
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.firmwareReleasedDate
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: eafe1a75a24c479cb5bf116be2272375
          name: 'Firmware version'
          type: DEPENDENT
          key: hikvision_cam.firmware_version
          value_type: CHAR
          inventory_link: SOFTWARE_APP_A
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.firmwareVersion
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 3c0b5a0046894a54803cd984cda13fa2
              expression: 'last(/Hikvision camera by HTTP/hikvision_cam.firmware_version,#1)<>last(/Hikvision camera by HTTP/hikvision_cam.firmware_version,#2) and length(last(/Hikvision camera by HTTP/hikvision_cam.firmware_version))>0'
              name: 'Hikvision: Version has changed'
              event_name: 'Hikvision: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'Hikvision camera version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 0ddd3af82fb64b75821dc1fab96c16ab
          name: 'Get device info'
          type: HTTP_AGENT
          key: hikvision_cam.get_info
          history: '0'
          value_type: TEXT
          authtype: DIGEST
          username: '{$USER}'
          password: '{$PASSWORD}'
          description: 'Used to get the device information'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"html":{"head":{"title":"Connection error"}}}'
            - type: XML_TO_JSON
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"html":{"head":{"title":"Connection error"}}}'
          url: 'http://{$HIKVISION_ISAPI_HOST}:{$HIKVISION_ISAPI_PORT}/ISAPI/System/deviceInfo'
          status_codes: '200,401'
          tags:
            - tag: component
              value: raw
        - uuid: d0fc2ebf4ae140b68546e2425321f797
          name: 'Get device info: Login status'
          type: DEPENDENT
          key: hikvision_cam.get_info.login_status
          valuemap:
            name: 'Login status'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  
                  if ("html" in data){
                  	if (data.html.head.title === "Document Error: Unauthorized")
                  		{return 1}
                  	else if (data.html.head.title === "Connection error")
                  		{return 2}
                  }
                  return 0;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 1ad3e3c9f60043a58f63addc8768c887
          name: 'Get system status'
          type: HTTP_AGENT
          key: hikvision_cam.get_status
          history: '0'
          value_type: TEXT
          authtype: DIGEST
          username: '{$USER}'
          password: '{$PASSWORD}'
          description: 'It is used to get the status information of the device'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"html":{"head":{"title":"Connection error"}}}'
            - type: XML_TO_JSON
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"html":{"head":{"title":"Connection error"}}}'
          url: 'http://{$HIKVISION_ISAPI_HOST}:{$HIKVISION_ISAPI_PORT}/ISAPI/System/status'
          status_codes: '200,401'
          tags:
            - tag: component
              value: raw
        - uuid: ebca4ac32e2e4bfd8bf3cdae155a4ee6
          name: 'Get system status: Login status'
          type: DEPENDENT
          key: hikvision_cam.get_status.login_status
          valuemap:
            name: 'Login status'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  
                  if ("html" in data){
                  	if (data.html.head.title === "Document Error: Unauthorized")
                  		{return 1}
                  	else if (data.html.head.title === "Connection error")
                  		{return 2}
                  }
                  return 0;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: hikvision_cam.get_status
          tags:
            - tag: component
              value: system
        - uuid: 65f89830d9f041f9a1558936dfcffc5f
          name: 'Get streaming channels'
          type: HTTP_AGENT
          key: hikvision_cam.get_streaming
          history: '0'
          value_type: TEXT
          authtype: DIGEST
          username: '{$USER}'
          password: '{$PASSWORD}'
          description: 'Used to get the properties of streaming channels for the device'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"html":{"head":{"title":"Connection error"}}}'
            - type: XML_TO_JSON
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"html":{"head":{"title":"Connection error"}}}'
          url: 'http://{$HIKVISION_ISAPI_HOST}:{$HIKVISION_ISAPI_PORT}/ISAPI/Streaming/channels'
          status_codes: '200,401'
          tags:
            - tag: component
              value: raw
        - uuid: c90527e1a2a948b5a5f678ec0d981954
          name: 'Get streaming channels: Login status'
          type: DEPENDENT
          key: hikvision_cam.get_streaming.login_status
          valuemap:
            name: 'Login status'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  
                  if ("html" in data){
                  	if (data.html.head.title === "Document Error: Unauthorized")
                  		{return 1}
                  	else if (data.html.head.title === "Connection error")
                  		{return 2}
                  }
                  return 0;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: hikvision_cam.get_streaming
          tags:
            - tag: component
              value: system
        - uuid: 03aecf4021c2402bb415798ef339b914
          name: 'Hardware version'
          type: DEPENDENT
          key: hikvision_cam.hardware_version
          value_type: CHAR
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.hardwareVersion
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: da9ec53ecc6b4c25b6539666eb9f6544
          name: MACaddress
          type: DEPENDENT
          key: hikvision_cam.mac_address
          value_type: CHAR
          inventory_link: MACADDRESS_A
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.macAddress
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: network
        - uuid: d1d026c6240c493387374b756b04452f
          name: 'Memory utilization'
          type: DEPENDENT
          key: hikvision_cam.memory.usage
          value_type: FLOAT
          units: '%'
          description: 'Memory utilization in %'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceStatus.MemoryList.Memory.memoryUsage
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: hikvision_cam.get_status
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 62cfa0b87f234f1cb67b9b5b6b2fa8f2
              expression: 'min(/Hikvision camera by HTTP/hikvision_cam.memory.usage,5m)>{$MEMORY.UTIL.MAX}'
              name: 'Hikvision: High memory utilization'
              event_name: 'Hikvision: High memory utilization (>{$MEMORY.UTIL.MAX}% for 5m)'
              priority: AVERAGE
              description: 'The system is running out of free memory.'
              tags:
                - tag: scope
                  value: performance
        - uuid: b295689d34934401b0eda407edaee426
          name: Model
          type: DEPENDENT
          key: hikvision_cam.model
          value_type: CHAR
          inventory_link: MODEL
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.model
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: b6715593c52a4255ae6a4f68c3de6b6d
          name: 'Serial number'
          type: DEPENDENT
          key: hikvision_cam.serial_number
          value_type: CHAR
          inventory_link: SERIALNO_A
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.serialNumber
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 281999cbd6324aacbbb86b4945000c60
              expression: 'last(/Hikvision camera by HTTP/hikvision_cam.serial_number,#1)<>last(/Hikvision camera by HTTP/hikvision_cam.serial_number,#2) and length(last(/Hikvision camera by HTTP/hikvision_cam.serial_number))>0'
              name: 'Hikvision: Camera has been replaced'
              event_name: 'Hikvision: Camera has been replaced (new serial number received)'
              priority: INFO
              description: 'Camera serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 72ffbe3d976b437ab5df06b32a5c4b12
          name: 'Supported beep'
          type: DEPENDENT
          key: hikvision_cam.support_beep
          value_type: CHAR
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.supportBeep
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 03d220eb782346269de6b0867ed3acd3
          name: 'Supported video loss'
          type: DEPENDENT
          key: hikvision_cam.support_video_loss
          value_type: CHAR
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.supportVideoLoss
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: d29814c630f94d5cabdc350d8b161b5b
          name: 'System contact'
          type: DEPENDENT
          key: hikvision_cam.system_contact
          value_type: CHAR
          inventory_link: CONTACT
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.systemContact
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 8678cee9999b45f1975f9639c8c197af
          name: 'Telecontrol ID'
          type: DEPENDENT
          key: hikvision_cam.telecontrol_id
          value_type: CHAR
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceInfo.telecontrolID
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 24h
          master_item:
            key: hikvision_cam.get_info
          tags:
            - tag: component
              value: system
        - uuid: 4e680a5e347948fe8118b58c2c62d55f
          name: Uptime
          type: DEPENDENT
          key: hikvision_cam.uptime
          trends: '0'
          units: uptime
          description: 'The system uptime expressed in the following format: "N days, hh:mm:ss".'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.DeviceStatus.deviceUpTime
              error_handler: DISCARD_VALUE
          master_item:
            key: hikvision_cam.get_status
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: f46b43fe9b354990929e7fdb80b792ec
              expression: 'last(/Hikvision camera by HTTP/hikvision_cam.uptime)<10m'
              name: 'Hikvision: Camera has been restarted'
              event_name: 'Hikvision: Camera has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: 00647c38d30d44378bdcf573178063ec
          name: 'PTZ discovery'
          type: HTTP_AGENT
          key: hikvision_cam.ptz.discovery
          delay: 1d
          authtype: DIGEST
          username: '{$USER}'
          password: '{$PASSWORD}'
          item_prototypes:
            - uuid: bb3be316a5fc4b25bd15c903909b7746
              name: 'Channel "{#PTZ_CHANNEL_ID}": Get PTZ info: Channel "{#PTZ_CHANNEL_ID}": Login status'
              type: DEPENDENT
              key: 'hikvision_cam.get_ptz.login_status[{#PTZ_CHANNEL_ID}]'
              valuemap:
                name: 'Login status'
              preprocessing:
                - type: JAVASCRIPT
                  parameters:
                    - |
                      var data = JSON.parse(value);
                      
                      if ("html" in data){
                      	if (data.html.head.title === "Document Error: Unauthorized")
                      		{return 1}
                      	else if (data.html.head.title === "Connection error")
                      		{return 2}
                      }
                      return 0;
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'hikvision_cam.get_ptz[{#PTZ_CHANNEL_ID}]'
              tags:
                - tag: component
                  value: system
              trigger_prototypes:
                - uuid: 7ce39ff8b5f14fcbb7b575f9c44a9efd
                  expression: 'last(/Hikvision camera by HTTP/hikvision_cam.get_ptz.login_status[{#PTZ_CHANNEL_ID}])=1'
                  name: 'Hikvision: Channel "{#PTZ_CHANNEL_ID}": Authorisation error'
                  priority: WARNING
                  description: 'Check the correctness of the authorization data'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'Hikvision: Authorisation error'
                      expression: |
                        last(/Hikvision camera by HTTP/hikvision_cam.get_info.login_status)=1 or
                        last(/Hikvision camera by HTTP/hikvision_cam.get_streaming.login_status)=1 or
                        last(/Hikvision camera by HTTP/hikvision_cam.get_status.login_status)=1
                  tags:
                    - tag: scope
                      value: notice
                - uuid: c702b7321b664f5d950b0d879bbd7371
                  expression: 'last(/Hikvision camera by HTTP/hikvision_cam.get_ptz.login_status[{#PTZ_CHANNEL_ID}])=2'
                  name: 'Hikvision: Channel "{#PTZ_CHANNEL_ID}": Error receiving data'
                  priority: WARNING
                  description: 'Check the availability of the HTTP port'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'Hikvision: Error receiving data'
                      expression: |
                        last(/Hikvision camera by HTTP/hikvision_cam.get_info.login_status)=2 or
                        last(/Hikvision camera by HTTP/hikvision_cam.get_streaming.login_status)=2 or
                        last(/Hikvision camera by HTTP/hikvision_cam.get_status.login_status)=2
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 6799d99ad02743a1b294b80bbed52280
              name: 'Channel "{#PTZ_CHANNEL_ID}": Get PTZ info'
              type: HTTP_AGENT
              key: 'hikvision_cam.get_ptz[{#PTZ_CHANNEL_ID}]'
              history: '0'
              value_type: TEXT
              authtype: DIGEST
              username: '{$USER}'
              password: '{$PASSWORD}'
              description: 'High precision positioning which is accurate to a bit after the decimal point'
              preprocessing:
                - type: CHECK_NOT_SUPPORTED
                  parameters:
                    - '-1'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '{"html":{"head":{"title":"Connection error"}}}'
                - type: XML_TO_JSON
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '{"html":{"head":{"title":"Connection error"}}}'
              url: 'http://{$HIKVISION_ISAPI_HOST}:{$HIKVISION_ISAPI_PORT}/ISAPI/PTZCtrl/channels/{#PTZ_CHANNEL_ID}/status'
              status_codes: '200,401'
              tags:
                - tag: component
                  value: raw
            - uuid: 16225fb78f414308829d035cd32f8468
              name: 'Channel "{#PTZ_CHANNEL_ID}": Absolute zoom'
              type: DEPENDENT
              key: 'hikvision_cam.ptz.absolute_zoom[{#PTZ_CHANNEL_ID}]'
              value_type: FLOAT
              units: '!x'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.PTZStatus.AbsoluteHigh.absoluteZoom
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '0.1'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'hikvision_cam.get_ptz[{#PTZ_CHANNEL_ID}]'
              tags:
                - tag: component
                  value: ptz
                - tag: ptz-id
                  value: '{#PTZ_CHANNEL_ID}'
            - uuid: 6282376b25a9462e84b748d011f2fbf6
              name: 'Channel "{#PTZ_CHANNEL_ID}": Azimuth'
              type: DEPENDENT
              key: 'hikvision_cam.ptz.azimuth[{#PTZ_CHANNEL_ID}]'
              value_type: FLOAT
              units: '!°'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.PTZStatus.AbsoluteHigh.azimuth
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '0.1'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'hikvision_cam.get_ptz[{#PTZ_CHANNEL_ID}]'
              tags:
                - tag: component
                  value: ptz
                - tag: ptz-id
                  value: '{#PTZ_CHANNEL_ID}'
            - uuid: da148a9826724869a58d286a07edc036
              name: 'Channel "{#PTZ_CHANNEL_ID}": Elevation'
              type: DEPENDENT
              key: 'hikvision_cam.ptz.elevation[{#PTZ_CHANNEL_ID}]'
              value_type: FLOAT
              units: '!°'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.PTZStatus.AbsoluteHigh.elevation
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '0.1'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'hikvision_cam.get_ptz[{#PTZ_CHANNEL_ID}]'
              tags:
                - tag: component
                  value: ptz
                - tag: ptz-id
                  value: '{#PTZ_CHANNEL_ID}'
          trigger_prototypes:
            - uuid: dbf391b5e18b4e018d889e460b7acc74
              expression: |
                last(/Hikvision camera by HTTP/hikvision_cam.ptz.absolute_zoom[{#PTZ_CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.ptz.absolute_zoom[{#PTZ_CHANNEL_ID}],#2) or 
                last(/Hikvision camera by HTTP/hikvision_cam.ptz.azimuth[{#PTZ_CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.ptz.azimuth[{#PTZ_CHANNEL_ID}],#2) or 
                last(/Hikvision camera by HTTP/hikvision_cam.ptz.elevation[{#PTZ_CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.ptz.elevation[{#PTZ_CHANNEL_ID}],#2)
              name: 'Hikvision: Channel "{#PTZ_CHANNEL_ID}": PTZ position changed'
              priority: INFO
              description: 'The direction of the camera has changed'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
          url: 'http://{$HIKVISION_ISAPI_HOST}:{$HIKVISION_ISAPI_PORT}/ISAPI/PTZCtrl/channels'
          status_codes: '200,401'
          preprocessing:
            - type: XML_TO_JSON
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  var out = [];
                  
                  if ("PTZChannel" in data.PTZChannelList) {
                  	out.push({
                  		"{#PTZ_CHANNEL_ID}": data.PTZChannelList.PTZChannel.id
                  	})
                  }
                  
                  return JSON.stringify(out);
        - uuid: 0bf00b49acd448ddbd1f4fac7630c40e
          name: 'Streaming channels discovery'
          type: HTTP_AGENT
          key: hikvision_cam.streaming.discovery
          delay: 1d
          authtype: DIGEST
          username: '{$USER}'
          password: '{$PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#CHANNEL_ENABLED}'
                value: 'true'
          item_prototypes:
            - uuid: 90ef1dd6e3d04ce8ab84731377c07ea6
              name: 'Channel "{#CHANNEL_ID}": Constant bitRate'
              type: DEPENDENT
              key: 'hikvision_cam.constant_bit_rate[{#CHANNEL_ID}]'
              units: '!kbit/s'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.constantBitRate'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$.[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: b992569a9db346ac85886fe7a5e55074
              name: 'Channel "{#CHANNEL_ID}": Fixed quality'
              type: DEPENDENT
              key: 'hikvision_cam.fixed_quality[{#CHANNEL_ID}]'
              units: '%'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.fixedQuality'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 7343f2206cfd4942976b5dca214a7558
              name: 'Channel "{#CHANNEL_ID}": GovLength'
              type: DEPENDENT
              key: 'hikvision_cam.gov_length[{#CHANNEL_ID}]'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.GovLength'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: ef1df8955ab84efab5ae9be340715431
              name: 'Channel "{#CHANNEL_ID}": H264Profile'
              type: DEPENDENT
              key: 'hikvision_cam.h264Profile[{#CHANNEL_ID}]'
              value_type: CHAR
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.H264Profile'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: ce45290377cc402bacda95ea8a136946
              name: 'Channel "{#CHANNEL_ID}": Key frame interval'
              type: DEPENDENT
              key: 'hikvision_cam.key_frame_interval[{#CHANNEL_ID}]'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.keyFrameInterval'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 4d621b75e2ef432a9cab88b61718125d
              name: 'Channel "{#CHANNEL_ID}": Frame rate (max)'
              type: DEPENDENT
              key: 'hikvision_cam.max_frame_rate[{#CHANNEL_ID}]'
              units: '!fps'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.maxFrameRate'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 12f1fadb9d364e6b96ab01b468c94891
              name: 'Channel "{#CHANNEL_ID}": Smoothing'
              type: DEPENDENT
              key: 'hikvision_cam.smoothing[{#CHANNEL_ID}]'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.smoothing'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 1854ab4fd6f14adf90c0ddb42712a4ef
              name: 'Channel "{#CHANNEL_ID}": Snapshot image type'
              type: DEPENDENT
              key: 'hikvision_cam.snap_shot_image_type[{#CHANNEL_ID}]'
              value_type: CHAR
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.snapShotImageType'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: d1523faa362842ef9313ffc15a6d5e8c
              name: 'Channel "{#CHANNEL_ID}": VBR lower'
              type: DEPENDENT
              key: 'hikvision_cam.vbr_lower_cap[{#CHANNEL_ID}]'
              units: '!kbit/s'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.vbrLowerCap'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 725669dc6bfd4871a3133ab7fcd4c571
              name: 'Channel "{#CHANNEL_ID}": VBR upper'
              type: DEPENDENT
              key: 'hikvision_cam.vbr_upper_cap[{#CHANNEL_ID}]'
              units: '!kbit/s'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.vbrUpperCap'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 96ef96886e9244f08cf245f4253839b2
              name: 'Channel "{#CHANNEL_ID}": Video codec type'
              type: DEPENDENT
              key: 'hikvision_cam.video_codec_type[{#CHANNEL_ID}]'
              value_type: CHAR
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.videoCodecType'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 59e8f0440ec04306a0c79cc8c9a5c91f
              name: 'Channel "{#CHANNEL_ID}": Video quality control type'
              type: DEPENDENT
              key: 'hikvision_cam.video_quality_control_type[{#CHANNEL_ID}]'
              value_type: CHAR
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.videoQualityControlType'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 18f5eed445154a42828cea423db9ebec
              name: 'Channel "{#CHANNEL_ID}": Resolution height'
              type: DEPENDENT
              key: 'hikvision_cam.video_resolution_height[{#CHANNEL_ID}]'
              units: '!px'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.videoResolutionHeight'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 13f343a9c3804846a31867e942602199
              name: 'Channel "{#CHANNEL_ID}": Resolution width'
              type: DEPENDENT
              key: 'hikvision_cam.video_resolution_width[{#CHANNEL_ID}]'
              units: '!px'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.videoResolutionWidth'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
            - uuid: 2ccd4b38faf046b88a0983249ca0c4f6
              name: 'Channel "{#CHANNEL_ID}": Video scan type'
              type: DEPENDENT
              key: 'hikvision_cam.video_scan_type[{#CHANNEL_ID}]'
              value_type: CHAR
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.StreamingChannelList.StreamingChannel[?(@.id=={#CHANNEL_ID})].Video.videoScanType'
                  error_handler: DISCARD_VALUE
                - type: JSONPATH
                  parameters:
                    - '$[0]'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hikvision_cam.get_streaming
              tags:
                - tag: component
                  value: stream
                - tag: stream-id
                  value: '{#CHANNEL_ID}'
          trigger_prototypes:
            - uuid: 16cf4d23b3c8410586703efca81ebe52
              expression: |
                last(/Hikvision camera by HTTP/hikvision_cam.video_resolution_height[{#CHANNEL_ID}])<>{$HIKVISION_STREAM_HEIGHT} or
                last(/Hikvision camera by HTTP/hikvision_cam.video_resolution_width[{#CHANNEL_ID}])<>{$HIKVISION_STREAM_WIDTH}
              name: 'Hikvision: Channel "{#CHANNEL_ID}": Invalid video stream resolution parameters'
              priority: WARNING
              description: |
                expected: {$HIKVISION_STREAM_WIDTH} px x {$HIKVISION_STREAM_HEIGHT} px
                received: {ITEM.LASTVALUE2} x {ITEM.LASTVALUE1}
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
            - uuid: 4f2a512d8f95414495dec5670e5e9680
              expression: |
                last(/Hikvision camera by HTTP/hikvision_cam.fixed_quality[{#CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.fixed_quality[{#CHANNEL_ID}],#2) or
                last(/Hikvision camera by HTTP/hikvision_cam.constant_bit_rate[{#CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.constant_bit_rate[{#CHANNEL_ID}],#2) or
                last(/Hikvision camera by HTTP/hikvision_cam.video_quality_control_type[{#CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.video_quality_control_type[{#CHANNEL_ID}],#2) or
                last(/Hikvision camera by HTTP/hikvision_cam.video_resolution_width[{#CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.video_resolution_width[{#CHANNEL_ID}],#2) or
                last(/Hikvision camera by HTTP/hikvision_cam.video_resolution_height[{#CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.video_resolution_height[{#CHANNEL_ID}],#2)
              name: 'Hikvision: Channel "{#CHANNEL_ID}": Parameters of video stream are changed'
              priority: INFO
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
          url: 'http://{$HIKVISION_ISAPI_HOST}:{$HIKVISION_ISAPI_PORT}/ISAPI/Streaming/channels'
          status_codes: '200,401'
          preprocessing:
            - type: XML_TO_JSON
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  var out = [];
                  
                  data.StreamingChannelList.StreamingChannel.forEach(function (field) {
                  	out.push({
                  		"{#CHANNEL_ID}": field.id,
                  		"{#CHANNEL_NAME}": field.channelName,
                  		"{#CHANNEL_ENABLED}": field.enabled
                  	});
                  })
                  
                  return JSON.stringify(out);
          overrides:
            - name: 'trigger disabled non main channels'
              step: '1'
              filter:
                conditions:
                  - macro: '{#CHANNEL_ID}'
                    value: '{$HIKVISION_MAIN_CHANNEL_ID}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: 'Invalid video stream resolution parameters'
                  discover: NO_DISCOVER
                  status: ENABLED
      tags:
        - tag: class
          value: hardware
        - tag: subclass
          value: camera
        - tag: subclass
          value: device
        - tag: subclass
          value: dvr
        - tag: subclass
          value: monitoring
        - tag: target
          value: cctv
        - tag: target
          value: hikvision
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          config:
            type: TEXT
            priority: '1'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HIKVISION_ISAPI_HOST}'
          description: 'The hostname or IP address of the Hikvision ISAPI host.'
          config:
            type: TEXT
            priority: '2'
            label: Address
            description: 'The hostname or IP address of the Hikvision ISAPI host.'
            required: 'YES'
        - macro: '{$HIKVISION_ISAPI_PORT}'
          value: '80'
          description: 'ISAPI port on device'
          config:
            type: TEXT
            priority: '3'
            label: Port
            description: 'ISAPI port on device In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HIKVISION_MAIN_CHANNEL_ID}'
          value: '101'
          description: 'Main video stream ID'
          config:
            type: TEXT
            priority: '4'
            label: 'Stream ID'
            description: 'Main video stream ID'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HIKVISION_STREAM_HEIGHT}'
          value: '1080'
          description: 'Main video stream image height'
          config:
            type: TEXT
            priority: '5'
            label: Height
            description: 'Main video stream image height'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HIKVISION_STREAM_WIDTH}'
          value: '1920'
          description: 'Main video stream image width'
          config:
            type: TEXT
            priority: '6'
            label: Width
            description: 'Main video stream image width'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMORY.UTIL.MAX}'
          value: '95'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Threshold for memory utilization'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PASSWORD}'
          type: SECRET_TEXT
          config:
            type: TEXT
            priority: '8'
            label: Password
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$USER}'
          value: admin
          config:
            type: TEXT
            priority: '9'
            label: Username
            required: 'YES'
      dashboards:
        - uuid: db988ae8a2044b4da5e0ca388bb92d39
          name: 'Hikvision camera: Overview'
          pages:
            - widgets:
                - type: graph
                  name: 'Hikvision camera: CPU utilization'
                  width: '36'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Hikvision camera by HTTP'
                        name: 'Hikvision camera: CPU utilization'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  name: 'Hikvision camera: Memory'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Hikvision camera by HTTP'
                        name: 'Hikvision camera: Memory'
                    - type: STRING
                      name: reference
                      value: AAAAB
      valuemaps:
        - uuid: 4c14241141504a9d852d83965c309f31
          name: 'Login status'
          mappings:
            - value: '0'
              newvalue: OK
            - value: '1'
              newvalue: Unauthorized
            - value: '2'
              newvalue: 'Connection error'
    - uuid: b84324c2a40a496dbbb379bbf5dde8d5
      template: 'Morningstar ProStar MPPT by SNMP'
      name: 'Morningstar ProStar MPPT by SNMP'
      description: |
        MIBs used:
        PROSTAR-MPPT
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: a517a7aafbab426eb6ced8d5f57c1fa4
          name: 'Array: Sweep Pmax'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.64.0]'
          key: 'array.sweep_pmax[arrayMaxPowerSweep.0]'
          value_type: FLOAT
          units: W
          description: |
            MIB: PROSTAR-MPPT
            Array Max. Power (sweep)
             Description:Array Max. Power (last sweep)
             Scaling Factor:1.0
             Units:W
             Range:[0.0, 500]
             Modbus address:0x003E
          tags:
            - tag: component
              value: array
        - uuid: 7714c76013e341f8b6753cc5a50a960f
          name: 'Array: Sweep Vmp'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.63.0]'
          key: 'array.sweep_vmp[arrayVmp.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: PROSTAR-MPPT
            Array Vmp
              Description:Array Max. Power Point Voltage
              Scaling Factor:1.0
              Units:V
              Range:[0.0, 5000.0]
              Modbus address:0x003D
          tags:
            - tag: component
              value: array
        - uuid: 379ab969ad784968a1090ff98f5801ff
          name: 'Array: Sweep Voc'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.65.0]'
          key: 'array.sweep_voc[arrayVoc.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: PROSTAR-MPPT
            Array Voc
             Description:Array Open Circuit Voltage
             Scaling Factor:1.0
             Units:V
             Range:[0.0, 80.0]
             Modbus address:0x003F
          tags:
            - tag: component
              value: array
        - uuid: 41a1118e1be3417daa79faace733d861
          name: 'Array: Voltage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.31.0]'
          key: 'array.voltage[arrayVoltage.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: PROSTAR-MPPT
            Array Voltage
              Description:Array Voltage
              Scaling Factor:1.0
              Units:V
              Range:[0, 80]
              Modbus address:0x0013
          tags:
            - tag: component
              value: array
        - uuid: fe5c3b724e894573acdaf522a2213adb
          name: 'Battery: Battery Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.30.0]'
          key: 'battery.voltage.discovery[batteryTerminalVoltage.0]'
          delay: 15m
          history: '0'
          value_type: FLOAT
          units: V
          description: 'MIB: PROSTAR-MPPT'
          tags:
            - tag: component
              value: battery
            - tag: component
              value: discovery
            - tag: component
              value: raw
        - uuid: ed1d54fce0904b7c9d0895a094f55108
          name: 'Battery: Charge Current'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.33.0]'
          key: 'charge.current[chargeCurrent.0]'
          value_type: FLOAT
          units: A
          description: |
            MIB: PROSTAR-MPPT
            Charge Current
              Description:Charge Current
              Scaling Factor:1.0
              Units:A
              Range:[0, 40]
              Modbus address:0x0010
          tags:
            - tag: component
              value: battery
        - uuid: 1b1b61995c0d4d89a7f9ad4e14c3541f
          name: 'Battery: Charge State'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.45.0]'
          key: 'charge.state[chargeState.0]'
          value_type: FLOAT
          description: |
            MIB: PROSTAR-MPPT
            Charge State
              Description:Control State
              Modbus address:0x0021
            
              0: Start
              1: NightCheck
              2: Disconnect
              3: Night
              4: Fault
              5: BulkMppt
              6: Absorption
              7: Float
              8: Equalize
              9: Slave
              10: Fixed
          valuemap:
            name: 'ProStar MPPT charge state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: battery
          triggers:
            - uuid: fe4863fdd4d64e1c977328bd3d0f687f
              expression: 'last(/Morningstar ProStar MPPT by SNMP/charge.state[chargeState.0])={$CHARGE.STATE.CRIT}'
              name: 'Morningstar ProStar MPPT: Battery: Device charge in critical state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 4d064e4877474d72b85c9cdfb7b09dad
              expression: 'last(/Morningstar ProStar MPPT by SNMP/charge.state[chargeState.0])={$CHARGE.STATE.WARN}'
              name: 'Morningstar ProStar MPPT: Battery: Device charge in warning state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar ProStar MPPT: Battery: Device charge in critical state'
                  expression: 'last(/Morningstar ProStar MPPT by SNMP/charge.state[chargeState.0])={$CHARGE.STATE.CRIT}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 009eb72ff6674da49d1dd85a6f9459cf
          name: 'Counter: Charge Amp-hours'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.49.0]'
          key: 'counter.charge_amp_hours[ahChargeResettable.0]'
          value_type: FLOAT
          units: Ah
          description: |
            MIB: PROSTAR-MPPT
            Ah Charge (Resettable)
             Description:Ah Charge (Resettable)
             Scaling Factor:0.1
             Units:Ah
             Range:[0.0, 4294967294]
             Modbus addresses:H=0x0026 L=0x0027
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.1'
          tags:
            - tag: component
              value: counter
        - uuid: 4a53a2211a1249d59369ad65762ffe47
          name: 'Counter: Charge KW-hours'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.51.0]'
          key: 'counter.charge_kw_hours[kwhChargeResettable.0]'
          value_type: FLOAT
          units: '!kWh'
          description: |
            MIB: PROSTAR-MPPT
            kWh Charge (Resettable)
            Description:Kilowatt Hours Charge (Resettable)
            Scaling Factor:1.0
            Units:kWh
            Range:[0.0, 65535]
            Modbus address:0x002A
          tags:
            - tag: component
              value: counter
        - uuid: c72ef851c2d240c9835c1703cec49fd6
          name: 'Counter: Load Amp-hours'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.56.0]'
          key: 'counter.load_amp_hours[ahLoadResettable.0]'
          value_type: FLOAT
          units: Ah
          description: |
            MIB: PROSTAR-MPPT
            Description:Ah Load (Resettable)
            Scaling Factor:0.1
            Units:Ah
            Range:[0.0, 4294967294]
            Modbus addresses:H=0x0032 L=0x0033
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.1'
          tags:
            - tag: component
              value: counter
        - uuid: 29a7d76472fb4025bc78fbeab273e955
          name: 'Load: Current'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.34.0]'
          key: 'load.current[loadCurrent.0]'
          value_type: FLOAT
          units: A
          description: |
            MIB: PROSTAR-MPPT
            Load Current
             Description:Load Current
             Scaling Factor:1.0
             Units:A
             Range:[0, 60]
             Modbus address:0x0016
          tags:
            - tag: component
              value: load
        - uuid: ae927b5cba5b43f5a2136fd3ee71b63d
          name: 'Load: State'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.53.0]'
          key: 'load.state[loadState.0]'
          value_type: FLOAT
          description: |
            MIB: PROSTAR-MPPT
            Load State
             Description:Load State
             Modbus address:0x002E
            
             0: Start
            1: Normal
            2: LvdWarning
            3: Lvd
            4: Fault
            5: Disconnect
            6: NormalOff
            7: Override
            8: NotUsed
          valuemap:
            name: 'ProStar MPPT load state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: load
          triggers:
            - uuid: a88025c5e5a748e3a6dfa01685ba075b
              expression: 'last(/Morningstar ProStar MPPT by SNMP/load.state[loadState.0])={$LOAD.STATE.CRIT:"lvd"} or last(/Morningstar ProStar MPPT by SNMP/load.state[loadState.0])={$LOAD.STATE.CRIT:"fault"}'
              name: 'Morningstar ProStar MPPT: Load: Device load in critical state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 9ab107b39b874fed83d09e7c1964a699
              expression: 'last(/Morningstar ProStar MPPT by SNMP/load.state[loadState.0])={$LOAD.STATE.WARN:"lvdWarning"}  or last(/Morningstar ProStar MPPT by SNMP/load.state[loadState.0])={$LOAD.STATE.WARN:"override"}'
              name: 'Morningstar ProStar MPPT: Load: Device load in warning state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar ProStar MPPT: Load: Device load in critical state'
                  expression: 'last(/Morningstar ProStar MPPT by SNMP/load.state[loadState.0])={$LOAD.STATE.CRIT:"lvd"} or last(/Morningstar ProStar MPPT by SNMP/load.state[loadState.0])={$LOAD.STATE.CRIT:"fault"}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 47894752dd1d41f1aa882387acf6dc3a
          name: 'Load: Voltage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.32.0]'
          key: 'load.voltage[loadVoltage.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: PROSTAR-MPPT
            Load Voltage
             Description:Load Voltage
             Scaling Factor:1.0
             Units:V
             Range:[0, 80]
             Modbus address:0x0014
          tags:
            - tag: component
              value: load
        - uuid: d44cb5d7db31402dae79275a9148817d
          name: 'Status: Alarms'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.59.0]'
          key: 'status.alarms[alarms.0]'
          history: 1h
          value_type: TEXT
          description: |
            MIB: PROSTAR-MPPT
            Description:Alarms
            Modbus addresses:H=0x0038 L=0x0039
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  var FIELDS = [
                  	'rtsOpen',
                  	'rtsShorted',
                  	'rtsDisconnected',
                  	'heatsinkTempSensorOpen',
                  	'heatsinkTempSensorShorted',
                  	'heatsinkTempLimit',
                  	'inductorTempSensorOpen',
                  	'inductorTempSensorShorted',
                  	'inductorTempLimit',
                  	'currentLimit',
                  	'currentMeasurementError',
                  	'batterySenseOutOfRange',
                  	'batterySenseDisconnected',
                  	'uncalibrated',
                  	'tb5v',
                  	'fp10SupplyOutOfRange',
                  	'unused',
                  	'mosfetOpen',
                  	'arrayCurrentOffset',
                  	'loadCurrentOffset',
                  	'p33SupplyOutOfRange',
                  	'p12SupplyOutOfRange',
                  	'hightInputVoltageLimit',
                  	'controllerReset',
                  	'loadLvd',
                  	'logTimeout',
                  	'eepromAccessFailure'
                  ];
                  
                  var flags = parseInt(value.replace(/\x20/g, ''), 16),
                  	result = [];
                  
                  for (var i = 0, f = 1 << 31 >>> 0, l = FIELDS.length; i < l; i++, f >>>= 1) {
                  	if (flags & f) {
                  		result.push(FIELDS[i]);
                  	}
                  }
                  
                  return result.length ? result.join('\n') : 'No alarms';
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: a2d0ab5150dd4bad8b5ec4f2c6aa13f8
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","arrayCurrentOffset")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "arrayCurrentOffset" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: cc6a15f16fd8470a9dcd9a9e01cba61c
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","batterySenseDisconnected")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "batterySenseDisconnected" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 55d4726d9b9047c79cf690353d950797
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","batterySenseOutOfRange")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "batterySenseOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 7f015198395042219666cde4458d407c
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","controllerReset")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "controllerReset" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 48339339e5a7465fbc67266998c9a8fe
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","currentLimit")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "currentLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: c88074037099498c896bb4793e04fea3
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","currentMeasurementError")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "currentMeasurementError" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: cecd8ee17e5143ffb46495e927750c82
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","eepromAccessFailure")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "eepromAccessFailure" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 4affa15e1c1c42459ea8dd6820d1c008
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","fp10SupplyOutOfRange")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "fp10SupplyOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 41e4225072a3468696cfb534c65b9736
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempLimit")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "heatsinkTempLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 5d269997a57d44ceb545e751e8e2d919
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempSensorOpen")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "heatsinkTempSensorOpen" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: a8342a4e2fff40a7b830086dec303fd9
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempSensorShorted")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "heatsinkTempSensorShorted" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 32e5b7ae81ce4ebea9b05ff7ab411e5a
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","hightInputVoltageLimit")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "hightInputVoltageLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: c10d27c1d9d54b8981a639e7bf0dfc02
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","inductorTempLimit")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "inductorTempLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 9f80959684b34b6498a1634097cd0d22
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","inductorTempSensorOpen")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "inductorTempSensorOpen" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: cc735ddcc98e4c099bb770e2b2a171b5
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","inductorTempSensorShorted")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "inductorTempSensorShorted" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 217935cd6c7547bc95f5af51b3e643d4
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","loadCurrentOffset")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "loadCurrentOffset" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: cb05261f120240bf944b304ffc4979e6
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","loadLvd")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "loadLvd" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 1ed1de932e084ce5ba03747bdd8ca4e5
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","logTimeout")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "logTimeout" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 8824f80f1ef245508d6d0d660e3cabf1
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","mosfetOpen")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "mosfetOpen" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 59569aaebf32403c9fd310f6b26845b0
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","p12SupplyOutOfRange")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "p12SupplyOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 4775d3a7b843455eb404661c070be092
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","p33SupplyOutOfRange")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "p33SupplyOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 2015d2b876564ad79699a23fc6b60f07
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","rtsDisconnected")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "rtsDisconnected" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: cce1eb2bee094a3b9a993ec2d60d182b
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","rtsShorted")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "rtsShorted" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 7a07b757660a4c9a879ac03a94832720
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","tb5v")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "tb5v" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 39205fc6d2cd4888994cccb016b4b2f8
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.alarms[alarms.0],#3,"like","uncalibrated")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "uncalibrated" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
        - uuid: 8fbb5c650fa040c892a1d10a17fbbf14
          name: 'Status: Array Faults'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.46.0]'
          key: 'status.array_faults[arrayFaults.0]'
          history: 1h
          value_type: TEXT
          description: |
            MIB: PROSTAR-MPPT
            Description:Array Faults
            Modbus address:0x0022
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  var FIELDS = [
                  	'overcurrent',
                  	'mosfetSShorted',
                  	'software',
                  	'batteryHvd',
                  	'arrayHvd',
                  	'customSettingsEdit',
                  	'rtsShorted',
                  	'rtsNoLongerValid',
                  	'localTempSensorDamaged',
                  	'batteryLowVoltageDisconnect',
                  	'slaveTimeout',
                  	'dipSwitchChanged',
                  ];
                  
                  var flags = parseInt(value.replace(/\x20/g, ''), 16),
                  	result = [];
                  
                  for (var i = 0, f = 1 << 31 >>> 0, l = FIELDS.length; i < l; i++, f >>>= 1) {
                  	if (flags & f) {
                  		result.push(FIELDS[i]);
                  	}
                  }
                  
                  return result.length ? result.join('\n') : 'No faults';
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 8322f8ca8e2e462a8799dc399f17ba27
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","arrayHvd")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "arrayHvd" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 6a138cd2af754bb3a22173e8da28b254
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","batteryHvd")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "batteryHvd" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 8e42cf21ec10409da840021bfd26f74c
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","batteryLowVoltageDisconnect")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "batteryLowVoltageDisconnect" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: d1112d9828064a879d56626ac6339dbf
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","customSettingsEdit")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "customSettingsEdit" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 75a67f17a33e41eea34585fade6319ef
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","dipSwitchChanged")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "dipSwitchChanged" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 4502112383524f0499ea13e6f83ce789
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","localTempSensorDamaged")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "localTempSensorDamaged" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: f1489dc1f8574895bd233b14ce080748
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","mosfetSShorted")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "mosfetSShorted" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 4ea903d3e8644ddaa5309eaa9715b894
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","overcurrent")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "overcurrent" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: e12a29ec16ea423cb69ca4ce460f201b
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","rtsNoLongerValid")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "rtsNoLongerValid" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 3ec4307bb2c444fc8eca27f9b7a136e2
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","rtsShorted")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "rtsShorted" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 915c00d98e144ee7a9a2d50d0bd474c0
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","slaveTimeout")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "slaveTimeout" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 9aac314eef594a8d86fd4b88308428e5
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.array_faults[arrayFaults.0],#3,"like","software")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "software" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
        - uuid: 712a9b442bec4e89acf4ee5d5bf26fb8
          name: 'Status: Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: status.hw.uptime
          units: uptime
          description: 'The amount of time since this host was last initialized. Note that this is different from sysUpTime in the SNMPv2-MIB [RFC1907] because sysUpTime is the uptime of the network management portion of the system.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: status
        - uuid: fb4d2147a8224b599ad908eca1b019e4
          name: 'Status: Load Faults'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.54.0]'
          key: 'status.load_faults[loadFaults.0]'
          history: 1h
          value_type: TEXT
          description: |
            MIB: PROSTAR-MPPT
            Description:Array Faults
            Modbus address:0x0022
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  var FIELDS = [
                  	'externalShortCircuit',
                  	'overcurrent',
                  	'mosfetShorted',
                  	'software',
                  	'loadHvd',
                  	'highTempDisconnect',
                  	'dipSwitchChanged',
                  	'customSettingsEdit'
                  ];
                  
                  var flags = parseInt(value.replace(/\x20/g, ''), 16),
                  	result = [];
                  
                  for (var i = 0, f = 1 << 31 >>> 0, l = FIELDS.length; i < l; i++, f >>>= 1) {
                  	if (flags & f) {
                  		result.push(FIELDS[i]);
                  	}
                  }
                  
                  return result.length ? result.join('\n') : 'No faults';
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 93750f768ba94f1bb9302fc17c76faeb
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.load_faults[loadFaults.0],#3,"like","customSettingsEdit")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "customSettingsEdit" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 456e2c36369f4519b2c80bcfe1acb4b0
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.load_faults[loadFaults.0],#3,"like","dipSwitchChanged")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "dipSwitchChanged" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 359df17c40684187b7ae92c8aa0c9624
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.load_faults[loadFaults.0],#3,"like","externalShortCircuit")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "externalShortCircuit" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 6dadf09064304f4381ad9ed0436e562a
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.load_faults[loadFaults.0],#3,"like","highTempDisconnect")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "highTempDisconnect" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: bc41145ae8074290913a47cc3fd11e1e
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.load_faults[loadFaults.0],#3,"like","loadHvd")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "loadHvd" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 8c8a7021928e4bf78b6309574e298876
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.load_faults[loadFaults.0],#3,"like","mosfetShorted")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "mosfetShorted" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: b7d3f05837bd4d788d14f1aaf18b0482
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.load_faults[loadFaults.0],#3,"like","overcurrent")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "overcurrent" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 801728740c1948b1a751469e6443daab
              expression: 'count(/Morningstar ProStar MPPT by SNMP/status.load_faults[loadFaults.0],#3,"like","software")=2'
              name: 'Morningstar ProStar MPPT: Status: Device has "software" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
        - uuid: 526ee94df484462a9264e57d92954e64
          name: 'Status: Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: status.net.uptime
          units: uptime
          description: 'The time (in hundredths of a second) since the network management portion of the system was last re-initialized.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 59cbcaaee8304b38a1144b3abf40bd9d
              expression: 'nodata(/Morningstar ProStar MPPT by SNMP/status.net.uptime,5m)=1'
              name: 'Morningstar ProStar MPPT: Status: Failed to fetch data'
              event_name: 'Morningstar ProStar MPPT: Status: Failed to fetch data (or no data for 5m)'
              priority: WARNING
              description: 'Zabbix has not received data for items for the last 5 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 20ce95acdff6486684461f10579a73b4
          name: 'Battery: Target Voltage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.48.0]'
          key: 'target.voltage[targetVoltage.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: PROSTAR-MPPT
            Target Voltage
             Description:Target Regulation Voltage
             Scaling Factor:1.0
             Units:V
             Range:[0.0, 80.0]
             Modbus address:0x0024
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: battery
        - uuid: 9a87cdcf65184059be334e986bcf801d
          name: 'Temperature: Ambient'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.40.0]'
          key: 'temp.ambient[ambientTemperature.0]'
          value_type: FLOAT
          units: C
          description: |
            MIB: PROSTAR-MPPT
            Ambient Temperature
             Description:Ambient Temperature
             Scaling Factor:1.0
             Units:deg C
             Range:[-128, 127]
             Modbus address:0x001C
          tags:
            - tag: component
              value: temperature
        - uuid: 1a8e79f49e86429abc80dd29598299ee
          name: 'Temperature: Battery'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.39.0]'
          key: 'temp.battery[batteryTemperature.0]'
          value_type: FLOAT
          units: C
          description: |
            MIB: PROSTAR-MPPT
            Battery Temperature
              Description:Battery Temperature
              Scaling Factor:1.0
              Units:deg C
              Range:[-128, 127]
              Modbus address:0x001B
          tags:
            - tag: component
              value: temperature
          triggers:
            - uuid: c74e1d3be1c24bde986bbce068db4bb8
              expression: 'min(/Morningstar ProStar MPPT by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.CRIT}'
              name: 'Morningstar ProStar MPPT: Temperature: Critically high battery temperature'
              event_name: 'Morningstar ProStar MPPT: Temperature: Critically high battery temperature (over {$BATTERY.TEMP.MAX.CRIT}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 0c2180ae5deb41adb503e37bf91c34e2
              expression: 'max(/Morningstar ProStar MPPT by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.CRIT}'
              name: 'Morningstar ProStar MPPT: Temperature: Critically low battery temperature'
              event_name: 'Morningstar ProStar MPPT: Temperature: Critically low battery temperature (below {$BATTERY.TEMP.MIN.WARN}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 1ab91d781c734f1eb2b9552f6dee9370
              expression: 'min(/Morningstar ProStar MPPT by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.WARN}'
              name: 'Morningstar ProStar MPPT: Temperature: High battery temperature'
              event_name: 'Morningstar ProStar MPPT: Temperature: High battery temperature (over {$BATTERY.TEMP.MAX.WARN}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar ProStar MPPT: Temperature: Critically high battery temperature'
                  expression: 'min(/Morningstar ProStar MPPT by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.CRIT}'
              tags:
                - tag: scope
                  value: notice
            - uuid: 6ec855dc6a5c42a79f1f40e14655418a
              expression: 'max(/Morningstar ProStar MPPT by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.WARN}'
              name: 'Morningstar ProStar MPPT: Temperature: Low battery temperature'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar ProStar MPPT: Temperature: Critically low battery temperature'
                  expression: 'max(/Morningstar ProStar MPPT by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.CRIT}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 7d0cf28c0d334154971738df11775d1f
          name: 'Temperature: Heatsink'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.5.38.0]'
          key: 'temp.heatsink[heatsinkTemperature.0]'
          value_type: FLOAT
          units: C
          description: |
            MIB: PROSTAR-MPPT
            Heatsink Temperature
             Description:Heatsink Temperature
             Scaling Factor:1.0
             Units:deg C
             Range:[-128, 127]
             Modbus address:0x001A
          tags:
            - tag: component
              value: temperature
      discovery_rules:
        - uuid: 1a21c30663c74c23b60e6ad72e228681
          name: 'Battery voltage discovery'
          type: DEPENDENT
          key: battery.voltage.discovery
          description: 'Discovery for battery voltage triggers'
          item_prototypes:
            - uuid: c02c73a349ec4a6b8557e142c4866148
              name: 'Battery: Voltage{#SINGLETON}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.33333.5.30.0]'
              key: 'battery.voltage[batteryTerminalVoltage.0{#SINGLETON}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: PROSTAR-MPPT
                Battery Terminal Voltage
                Description:Battery  Terminal Voltage
                Scaling Factor:1.0
                Units:V
                Range:[0.0, 80.0]
                Modbus address:0x0012
              tags:
                - tag: component
                  value: battery
              trigger_prototypes:
                - uuid: 402f73ca5b8d412689a7e715223e890d
                  expression: 'min(/Morningstar ProStar MPPT by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.CRIT}'
                  name: 'Morningstar ProStar MPPT: Battery: Critically high battery voltage'
                  event_name: 'Morningstar ProStar MPPT: Battery: Critically high battery voltage (over {#VOLTAGE.MAX.CRIT}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 753a0d25832d434186f586f895124f31
                  expression: 'max(/Morningstar ProStar MPPT by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.CRIT}'
                  name: 'Morningstar ProStar MPPT: Battery: Critically low battery voltage'
                  event_name: 'Morningstar ProStar MPPT: Battery: Critically low battery voltage (below {#VOLTAGE.MIN.CRIT}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 66e1fdfbfa5740dfa8945626f7f8be78
                  expression: 'min(/Morningstar ProStar MPPT by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.WARN}'
                  name: 'Morningstar ProStar MPPT: Battery: High battery voltage'
                  event_name: 'Morningstar ProStar MPPT: Battery: High battery voltage (over {#VOLTAGE.MAX.WARN}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  dependencies:
                    - name: 'Morningstar ProStar MPPT: Battery: Critically high battery voltage'
                      expression: 'min(/Morningstar ProStar MPPT by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.CRIT}'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: c9f3d03ce06641eb9b184f511a3a0341
                  expression: 'max(/Morningstar ProStar MPPT by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.WARN}'
                  name: 'Morningstar ProStar MPPT: Battery: Low battery voltage'
                  event_name: 'Morningstar ProStar MPPT: Battery: Low battery voltage (below {#VOLTAGE.MIN.WARN}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  dependencies:
                    - name: 'Morningstar ProStar MPPT: Battery: Critically low battery voltage'
                      expression: 'max(/Morningstar ProStar MPPT by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.CRIT}'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: 480e4c11060a4e34851b48bf7b9c5bb1
              name: 'Voltage: Battery/Load{#SINGLETON}'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Morningstar ProStar MPPT by SNMP'
                    key: 'battery.voltage[batteryTerminalVoltage.0{#SINGLETON}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Morningstar ProStar MPPT by SNMP'
                    key: 'load.voltage[loadVoltage.0]'
          master_item:
            key: 'battery.voltage.discovery[batteryTerminalVoltage.0]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var v_range = [
                  	[[0, 18], [12, 15, 11.5, 15.5]],
                  	[[18, 36], [24, 30, 23, 31]],
                  	[[36, 99], [48, 60, 46, 62]],
                  ],
                  	result = [];
                  
                  for (var idx in v_range) {
                  	if (v_range[idx][0][0] < value && value <= v_range[idx][0][1]) {
                  		result = [{
                  			'{#VOLTAGE.MIN.WARN}': parseInt({$VOLTAGE.MIN.WARN}) || v_range[idx][1][0],
                  			'{#VOLTAGE.MAX.WARN}': parseInt({$VOLTAGE.MAX.WARN}) || v_range[idx][1][1],
                  			'{#VOLTAGE.MIN.CRIT}': parseInt({$VOLTAGE.MIN.CRIT}) || v_range[idx][1][2],
                  			'{#VOLTAGE.MAX.CRIT}': parseInt({$VOLTAGE.MAX.CRIT}) || v_range[idx][1][3],
                  			'{#SINGLETON}': ''
                  		}];
                  		break;
                  	}
                  }
                  
                  return JSON.stringify(result);
      tags:
        - tag: class
          value: hardware
        - tag: class
          value: power
        - tag: subclass
          value: device
        - tag: target
          value: morningstar
      macros:
        - macro: '{$BATTERY.TEMP.MAX.CRIT}'
          value: '60'
          description: 'Battery high temperature critical value'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Battery maximum critical threshold'
            description: 'Battery high temperature critical value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BATTERY.TEMP.MAX.WARN}'
          value: '45'
          description: 'Battery high temperature warning value'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Battery maximum warning threshold'
            description: 'Battery high temperature warning value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BATTERY.TEMP.MIN.CRIT}'
          value: '-20'
          description: 'Battery low temperature critical value'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Battery minimum critical threshold'
            description: 'Battery low temperature critical value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BATTERY.TEMP.MIN.WARN}'
          value: '0'
          description: 'Battery low temperature warning value'
          config:
            type: TEXT
            priority: '1'
            section_name: Thresholds
            label: 'Battery minimum warning threshold'
            description: 'Battery low temperature warning value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$CHARGE.STATE.CRIT}'
          value: '4'
          description: fault
          config:
            type: TEXT
            priority: '10'
            section_name: Other
            label: 'Charging critical status'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$CHARGE.STATE.WARN}'
          value: '2'
          description: disconnect
          config:
            type: TEXT
            priority: '9'
            section_name: Other
            label: 'Charging warning status'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.CRIT:"fault"}'
          value: '4'
          description: fault
          config:
            type: TEXT
            priority: '15'
            section_name: Other
            label: 'Load status critical (fault)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.CRIT:"lvd"}'
          value: '3'
          description: lvd
          config:
            type: TEXT
            priority: '14'
            section_name: Other
            label: 'Load status critical (lvd)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.WARN:"disconnect"}'
          value: '5'
          description: disconnect
          config:
            type: TEXT
            priority: '12'
            section_name: Other
            label: 'Load status warning (disconnect)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.WARN:"lvdWarning"}'
          value: '2'
          description: lvdWarning
          config:
            type: TEXT
            priority: '11'
            section_name: Other
            label: 'Load status warning (lvdWarning)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.WARN:"override"}'
          value: '7'
          description: override
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Load status warning (override)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MAX.CRIT}'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Voltage maximum critical threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MAX.WARN}'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Voltage maximum warning threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MIN.CRIT}'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Voltage minimum critical threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MIN.WARN}'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Voltage minimum warning threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 3765513f1a4945c0801639e4c689f99f
          name: 'Morningstar ProStar MPPT: Overview'
          pages:
            - widgets:
                - type: graph
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar ProStar MPPT by SNMP'
                        name: 'Array: Voltage'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '4'
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar ProStar MPPT by SNMP'
                        name: 'Current: Charge/Load'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  'y': '8'
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar ProStar MPPT by SNMP'
                        name: 'Temperature: Ambient/Battery/Heatsink'
                    - type: STRING
                      name: reference
                      value: AAAAC
      valuemaps:
        - uuid: 1703c3aeb1b24641821e1c6d2cb4c8b7
          name: 'ProStar MPPT charge state'
          mappings:
            - value: '0'
              newvalue: Start
            - value: '1'
              newvalue: NightCheck
            - value: '2'
              newvalue: Disconnect
            - value: '3'
              newvalue: Night
            - value: '4'
              newvalue: Fault
            - value: '5'
              newvalue: BulkMppt
            - value: '6'
              newvalue: Absorption
            - value: '7'
              newvalue: Float
            - value: '8'
              newvalue: Equalize
            - value: '9'
              newvalue: Slave
            - value: '10'
              newvalue: Fixed
        - uuid: b5403a0805a54b9294f69a1e11a438b1
          name: 'ProStar MPPT load state'
          mappings:
            - value: '0'
              newvalue: Start
            - value: '1'
              newvalue: Normal
            - value: '2'
              newvalue: LvdWarning
            - value: '3'
              newvalue: Lvd
            - value: '4'
              newvalue: Fault
            - value: '5'
              newvalue: Disconnect
            - value: '6'
              newvalue: NormalOff
            - value: '7'
              newvalue: Override
            - value: '8'
              newvalue: NotUsed
    - uuid: 24bed6339f0a492fab86fe757394b937
      template: 'Morningstar ProStar PWM by SNMP'
      name: 'Morningstar ProStar PWM by SNMP'
      description: |
        MIBs used:
        PROSTAR-PWM
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 953fb8b3c23f420bb6132874ce3e33e2
          name: 'Array: Voltage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.31.0]'
          key: 'array.voltage[arrayVoltage.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: PROSTAR-PWM
            Description:Array Voltage
            Scaling Factor:1.0
            Units:V
            Range:[0, 80]
            Modbus address:0x0013
          tags:
            - tag: component
              value: array
        - uuid: a80ad3ace9b14446bc5fd5d6aaa5af87
          name: 'Battery: Battery Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.30.0]'
          key: 'battery.voltage.discovery[batteryTerminalVoltage.0]'
          delay: 15m
          history: '0'
          value_type: FLOAT
          units: V
          description: 'MIB: PROSTAR-PWM'
          tags:
            - tag: component
              value: battery
            - tag: component
              value: discovery
            - tag: component
              value: raw
        - uuid: 148008b117c94155ba81600e3050ab25
          name: 'Battery: Charge Current'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.33.0]'
          key: 'charge.current[chargeCurrent.0]'
          value_type: FLOAT
          units: A
          description: |
            MIB: PROSTAR-PWM
            Description:Charge Current
            Scaling Factor:1.0
            Units:A
            Range:[0, 40]
            Modbus address:0x0011
          tags:
            - tag: component
              value: battery
        - uuid: a7ae2d3b911e4bb5a7eeb770470245a5
          name: 'Battery: Charge State'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.45.0]'
          key: 'charge.state[chargeState.0]'
          value_type: FLOAT
          description: |
            MIB: PROSTAR-PWM
            Description:Control State
            Modbus address:0x0021
            
            0: Start
            1: NightCheck
            2: Disconnect
            3: Night
            4: Fault
            5: Bulk
            6: Pwm
            7: Float
            8: Equalize
          valuemap:
            name: 'ProStar PWM charge state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: battery
          triggers:
            - uuid: f12fc2c1a7a142a287304c18bafa1181
              expression: 'last(/Morningstar ProStar PWM by SNMP/charge.state[chargeState.0])={$CHARGE.STATE.CRIT}'
              name: 'Morningstar ProStar PWM: Battery: Device charge in critical state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: adf8cf02aa1e42fa84e1f11ddae4df01
              expression: 'last(/Morningstar ProStar PWM by SNMP/charge.state[chargeState.0])={$CHARGE.STATE.WARN}'
              name: 'Morningstar ProStar PWM: Battery: Device charge in warning state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar ProStar PWM: Battery: Device charge in critical state'
                  expression: 'last(/Morningstar ProStar PWM by SNMP/charge.state[chargeState.0])={$CHARGE.STATE.CRIT}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 8acd2e7944694a828cf9b739b75513d9
          name: 'Counter: Charge Amp-hours'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.49.0]'
          key: 'counter.charge_amp_hours[ahChargeResettable.0]'
          value_type: FLOAT
          units: Ah
          description: |
            MIB: PROSTAR-PWM
            Description:Ah Charge (Resettable)
            Scaling Factor:0.1
            Units:Ah
            Range:[0.0, 4294967294]
            Modbus addresses:H=0x0026 L=0x0027
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.1'
          tags:
            - tag: component
              value: counter
        - uuid: 0e7124df3f2b4298b1a13576d0b2d5e7
          name: 'Counter: Charge KW-hours'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.51.0]'
          key: 'counter.charge_kw_hours[kwhChargeResettable.0]'
          value_type: FLOAT
          units: '!kWh'
          description: |
            MIB: PROSTAR-PWM
            Description:Kilowatt Hours Charge (Resettable)
            Scaling Factor:1.0
            Units:kWh
            Range:[0.0, 65535]
            Modbus address:0x002A
          tags:
            - tag: component
              value: counter
        - uuid: 104a7db1c27d40b3bbee506f7f922393
          name: 'Counter: Load Amp-hours'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.56.0]'
          key: 'counter.load_amp_hours[ahLoadResettable.0]'
          value_type: FLOAT
          units: Ah
          description: |
            MIB: PROSTAR-PWM
            Description:Ah Load (Resettable)
            Scaling Factor:0.1
            Units:Ah
            Range:[0.0, 4294967294]
            Modbus addresses:H=0x0032 L=0x0033
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.1'
          tags:
            - tag: component
              value: counter
        - uuid: dcade8607cf142a2b88333f9880448fc
          name: 'Load: Current'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.34.0]'
          key: 'load.current[loadCurrent.0]'
          value_type: FLOAT
          units: A
          description: |
            MIB: PROSTAR-PWM
            Description:Load Current
            Scaling Factor:1.0
            Units:A
            Range:[0, 60]
            Modbus address:0x0016
          tags:
            - tag: component
              value: load
        - uuid: 14b3ca3869374f54a467e5e9017f918a
          name: 'Load: State'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.53.0]'
          key: 'load.state[loadState.0]'
          value_type: FLOAT
          description: |
            MIB: PROSTAR-PWM
            Description:Load State
            Modbus address:0x002E
            
            0: Start
            1: Normal
            2: LvdWarning
            3: Lvd
            4: Fault
            5: Disconnect
            6: NormalOff
            7: Override
            8: NotUsed
          valuemap:
            name: 'ProStar PWM load state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: load
          triggers:
            - uuid: 7a8bf4420b6b48ab8a5bc999eecae760
              expression: 'last(/Morningstar ProStar PWM by SNMP/load.state[loadState.0])={$LOAD.STATE.CRIT:"lvd"} or last(/Morningstar ProStar PWM by SNMP/load.state[loadState.0])={$LOAD.STATE.CRIT:"fault"}'
              name: 'Morningstar ProStar PWM: Load: Device load in critical state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 5152f9cd4ee34be485f3cb0a0f60afd5
              expression: 'last(/Morningstar ProStar PWM by SNMP/load.state[loadState.0])={$LOAD.STATE.WARN:"lvdWarning"}  or last(/Morningstar ProStar PWM by SNMP/load.state[loadState.0])={$LOAD.STATE.WARN:"override"}'
              name: 'Morningstar ProStar PWM: Load: Device load in warning state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar ProStar PWM: Load: Device load in critical state'
                  expression: 'last(/Morningstar ProStar PWM by SNMP/load.state[loadState.0])={$LOAD.STATE.CRIT:"lvd"} or last(/Morningstar ProStar PWM by SNMP/load.state[loadState.0])={$LOAD.STATE.CRIT:"fault"}'
              tags:
                - tag: scope
                  value: notice
        - uuid: cccc0976a62b47b1a558d521704c125d
          name: 'Load: Voltage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.32.0]'
          key: 'load.voltage[loadVoltage.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: PROSTAR-PWM
            Description:Load Voltage
            Scaling Factor:1.0
            Units:V
            Range:[0, 80]
            Modbus address:0x0014
          tags:
            - tag: component
              value: load
        - uuid: 7c1c1e03425c4b4bb176cf45458b916a
          name: 'Status: Alarms'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.59.0]'
          key: 'status.alarms[alarms.0]'
          history: 1h
          value_type: TEXT
          description: |
            MIB: PROSTAR-PWM
            Description:Alarms
            Modbus addresses:H=0x0038 L=0x0039
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  var FIELDS = [
                  	'rtsOpen',
                  	'rtsShorted',
                  	'rtsDisconnected',
                  	'heatsinkTempSensorOpen',
                  	'heatsinkTempSensorShorted',
                  	'heatsinkTempLimit',
                  	'currentLimit',
                  	'currentMeasurementError',
                  	'batterySenseOutOfRange',
                  	'batterySenseDisconnected',
                  	'uncalibrated',
                  	'batteryTempOutOfRange',
                  	'fp10SupplyOutOfRange',
                  	'mosfetOpen',
                  	'arrayCurrentOffset',
                  	'loadCurrentOffset',
                  	'p33SupplyOutOfRange',
                  	'p12SupplyOutOfRange',
                  	'hightInputVoltageLimit',
                  	'controllerReset',
                  	'loadLvd',
                  	'logTimeout',
                  	'eepromAccessFailure'
                  ];
                  
                  var flags = parseInt(value.replace(/\x20/g, ''), 16),
                  	result = [];
                  
                  for (var i = 0, f = 1 << 31 >>> 0, l = FIELDS.length; i < l; i++, f >>>= 1) {
                  	if (flags & f) {
                  		result.push(FIELDS[i]);
                  	}
                  }
                  
                  return result.length ? result.join('\n') : 'No alarms';
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 67fd46f034c3486e9af3cabfc5dc8056
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","arrayCurrentOffset")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "arrayCurrentOffset" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 31cc0b05b83045de80a7d07f26545010
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","batterySenseDisconnected")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "batterySenseDisconnected" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 9e498d21bc7f4ca1937f1628f4b1ea55
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","batterySenseOutOfRange")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "batterySenseOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 8a09c7609f9a45cea5b217757a7d2e5e
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","batteryTempOutOfRange")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "batteryTempOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: b173b8ca12f8464aae6476009b4c89e8
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","controllerReset")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "controllerReset" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: cdbac88810ff49caa35771e661d8b312
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","currentLimit")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "currentLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 7758388df28d4540ba393f4423fef00a
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","currentMeasurementError")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "currentMeasurementError" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: a56fef1f61c44ba884ec448b0d306c1d
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","eepromAccessFailure")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "eepromAccessFailure" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: fefea5daa03d453c8c5148ddb39997f9
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","fp10SupplyOutOfRange")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "fp10SupplyOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: c252c82aff2a4ac680965115cb2fab64
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempLimit")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "heatsinkTempLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 5b93a0a09a62481d8096ec743c2ceaff
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempSensorOpen")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "heatsinkTempSensorOpen" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: f28e5143a238470ba93c1345c814f87d
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempSensorShorted")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "heatsinkTempSensorShorted" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 75c84ef378984fca854b34a8ef79668c
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","hightInputVoltageLimit")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "hightInputVoltageLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 5c1551f7e2be40e0b8b50ed263f8e293
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","loadCurrentOffset")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "loadCurrentOffset" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 665117c5b9b64ea09a1d661e9c40fc43
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","loadLvd")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "loadLvd" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: b89c002c859c419ea748b43d575e9e27
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","logTimeout")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "logTimeout" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 17f51e7b248b4e63934e8b529b85b2ef
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","mosfetOpen")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "mosfetOpen" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 75e23772250741d0b1fc1ddff2a72ef6
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","p12SupplyOutOfRange")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "p12SupplyOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: fc374c9ac9fa4f979fbff9f7c7d83565
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","p33SupplyOutOfRange")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "p33SupplyOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: fbec2a1fdbe54d8da352471acf67bad1
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","rtsDisconnected")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "rtsDisconnected" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 915da6e7b1cd410da9a6c68e3b4abd85
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","rtsShorted")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "rtsShorted" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: e8bf2213a5444e2c9923b6f093d43f75
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.alarms[alarms.0],#3,"like","uncalibrated")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "uncalibrated" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
        - uuid: 2517d96e51c14372a0336c9a6ed5d078
          name: 'Status: Array Faults'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.46.0]'
          key: 'status.array_faults[arrayFaults.0]'
          history: 1h
          value_type: TEXT
          description: |
            MIB: PROSTAR-PWM
            Description:Array Faults
            Modbus address:0x0022
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  var FIELDS = [
                  	'overcurrent',
                  	'mosfetSShorted',
                  	'software',
                  	'batteryHvd',
                  	'arrayHvd',
                  	'customSettingsEdit',
                  	'rtsShorted',
                  	'rtsNoLongerValid',
                  	'localTempSensorDamaged',
                  	'batteryLowVoltageDisconnect',
                  	'slaveTimeout',
                  	'dipSwitchChanged',
                  	'p3Fault',
                  ];
                  
                  var flags = parseInt(value.replace(/\x20/g, ''), 16),
                  	result = [];
                  
                  for (var i = 0, f = 1 << 31 >>> 0, l = FIELDS.length; i < l; i++, f >>>= 1) {
                  	if (flags & f) {
                  		result.push(FIELDS[i]);
                  	}
                  }
                  
                  return result.length ? result.join('\n') : 'No faults';
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: b2ff69793e124031a79a668b03678fac
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","arrayHvd")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "arrayHvd" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: a4ca36ccaa9d45ceb79303afef1c49f0
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","batteryHvd")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "batteryHvd" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: f4d1120afb13456b9d45f8795dbc30b7
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","batteryLowVoltageDisconnect")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "batteryLowVoltageDisconnect" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 9e5f2c575945458ea8a39f33cb23b833
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","customSettingsEdit")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "customSettingsEdit" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: fd904f4469324784ac2c469e64069f94
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","dipSwitchChanged")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "dipSwitchChanged" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 62076ce0967049c8bde39f71afcb85d9
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","localTempSensorDamaged")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "localTempSensorDamaged" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: ea8487afe1c14bc08f3d9fd7f75d208f
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","mosfetSShorted")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "mosfetSShorted" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: b0bb139541ae493bafc40dac9074d898
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","overcurrent")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "overcurrent" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 8af94d7ff1a84e18b10122b0e3743d45
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","p3Fault")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "p3Fault" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: b41cb2e05acb40f59efa50a25f66cd62
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","rtsNoLongerValid")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "rtsNoLongerValid" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: d99c3f126c7e480cb4fcc705349eb61d
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","rtsShorted")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "rtsShorted" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 711b28f19cb74c0faeef73263ca1fb8f
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","slaveTimeout")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "slaveTimeout" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: e4a261d750d546c7b5d5067dd9a0ec25
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.array_faults[arrayFaults.0],#3,"like","software")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "software" array faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
        - uuid: 2c9f864ac33b4c2d992459c6519d045a
          name: 'Status: Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: status.hw.uptime
          units: uptime
          description: 'The amount of time since this host was last initialized. Note that this is different from sysUpTime in the SNMPv2-MIB [RFC1907] because sysUpTime is the uptime of the network management portion of the system.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: status
        - uuid: 1cd47d04af104cb9ab1cd7dc745a6aea
          name: 'Status: Load Faults'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.54.0]'
          key: 'status.load_faults[loadFaults.0]'
          history: 1h
          value_type: TEXT
          description: |
            MIB: PROSTAR-PWM
            Description:Load Faults
            Modbus address:0x002F
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  var FIELDS = [
                  	'externalShortCircuit',
                  	'overcurrent',
                  	'mosfetShorted',
                  	'software',
                  	'loadHvd',
                  	'highTempDisconnect',
                  	'dipSwitchChanged',
                  	'customSettingsEdit',
                  	'p3Fault'
                  ];
                  
                  var flags = parseInt(value.replace(/\x20/g, ''), 16),
                  	result = [];
                  
                  for (var i = 0, f = 1 << 31 >>> 0, l = FIELDS.length; i < l; i++, f >>>= 1) {
                  	if (flags & f) {
                  		result.push(FIELDS[i]);
                  	}
                  }
                  
                  return result.length ? result.join('\n') : 'No faults';
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 99ab5f0d3014459a8cd7d137d3a1f688
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.load_faults[loadFaults.0],#3,"like","customSettingsEdit")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "customSettingsEdit" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 77752192092f4f1caceef19c3c164b72
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.load_faults[loadFaults.0],#3,"like","dipSwitchChanged")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "dipSwitchChanged" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: d2e55501d89844aeb47f7887a11754a9
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.load_faults[loadFaults.0],#3,"like","externalShortCircuit")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "externalShortCircuit" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: a6548502cfc4406098ba3129af8efcb5
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.load_faults[loadFaults.0],#3,"like","highTempDisconnect")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "highTempDisconnect" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 6e8f0127bc7b42dea9d867ab174f458c
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.load_faults[loadFaults.0],#3,"like","loadHvd")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "loadHvd" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 2a303d4712e244a9b051fb1b0247fac5
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.load_faults[loadFaults.0],#3,"like","mosfetShorted")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "mosfetShorted" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 5720e2e15e5f42099fd7de361f62c99a
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.load_faults[loadFaults.0],#3,"like","overcurrent")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "overcurrent" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 2f522d50a8124ed2a8af4d7b6417c31c
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.load_faults[loadFaults.0],#3,"like","p3Fault")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "p3Fault" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: e75abe852b9c4e1d91a1f8f83622ef64
              expression: 'count(/Morningstar ProStar PWM by SNMP/status.load_faults[loadFaults.0],#3,"like","software")=2'
              name: 'Morningstar ProStar PWM: Status: Device has "software" load faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
        - uuid: 42f6a75d923d4262b37d85c4f7d1d322
          name: 'Status: Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: status.net.uptime
          units: uptime
          description: 'The time (in hundredths of a second) since the network management portion of the system was last re-initialized.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 16c1444a745a47e59fd22bd1a64baef3
              expression: 'nodata(/Morningstar ProStar PWM by SNMP/status.net.uptime,5m)=1'
              name: 'Morningstar ProStar PWM: Status: Failed to fetch data'
              event_name: 'Morningstar ProStar PWM: Status: Failed to fetch data (or no data for 5m)'
              priority: WARNING
              description: 'Zabbix has not received data for items for the last 5 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: f4b7bfb000754a17b4719863d3755519
          name: 'Battery: Target Voltage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.48.0]'
          key: 'target.voltage[targetVoltage.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: PROSTAR-PWM
            Description:Target Regulation Voltage
            Scaling Factor:1.0
            Units:V
            Range:[0.0, 80.0]
            Modbus address:0x0024
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: battery
        - uuid: 13d3479a7b5940b5a53d5f13bea9e2d1
          name: 'Temperature: Ambient'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.40.0]'
          key: 'temp.ambient[ambientTemperature.0]'
          value_type: FLOAT
          units: C
          description: |
            MIB: PROSTAR-PWM
            Description:Ambient Temperature
            Scaling Factor:1.0
            Units:deg C
            Range:[-128, 127]
            Modbus address:0x001C
          tags:
            - tag: component
              value: temperature
        - uuid: 39763f7fccd94aefb720a34871c0962b
          name: 'Temperature: Battery'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.39.0]'
          key: 'temp.battery[batteryTemperature.0]'
          value_type: FLOAT
          units: C
          description: |
            MIB: PROSTAR-PWM
            Description:Battery Temperature
            Scaling Factor:1.0
            Units:deg C
            Range:[-128, 127]
            Modbus address:0x001B
          tags:
            - tag: component
              value: temperature
          triggers:
            - uuid: 46eb3a0e80294a4db8324d56337ed712
              expression: 'min(/Morningstar ProStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.CRIT}'
              name: 'Morningstar ProStar PWM: Temperature: Critically high battery temperature'
              event_name: 'Morningstar ProStar PWM: Temperature: Critically high battery temperature (over {$BATTERY.TEMP.MAX.CRIT}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: c3f3ba5b2cab4481bb62fa8527554e96
              expression: 'max(/Morningstar ProStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.CRIT}'
              name: 'Morningstar ProStar PWM: Temperature: Critically low battery temperature'
              event_name: 'Morningstar ProStar PWM: Temperature: Critically low battery temperature (below {$BATTERY.TEMP.MIN.WARN}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 80aaf1de029b4d6eadce9f2a946f6dde
              expression: 'min(/Morningstar ProStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.WARN}'
              name: 'Morningstar ProStar PWM: Temperature: High battery temperature'
              event_name: 'Morningstar ProStar PWM: Temperature: High battery temperature (over {$BATTERY.TEMP.MAX.WARN}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar ProStar PWM: Temperature: Critically high battery temperature'
                  expression: 'min(/Morningstar ProStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.CRIT}'
              tags:
                - tag: scope
                  value: notice
            - uuid: cf1db336ea124f9a9fd6eb367f93f0e8
              expression: 'max(/Morningstar ProStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.WARN}'
              name: 'Morningstar ProStar PWM: Temperature: Low battery temperature'
              event_name: 'Morningstar ProStar PWM: Temperature: Low battery temperature (below {$BATTERY.TEMP.MIN.WARN}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar ProStar PWM: Temperature: Critically low battery temperature'
                  expression: 'max(/Morningstar ProStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.CRIT}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 1d13bd3ea24a4fcab3cd5b7586e6033a
          name: 'Temperature: Heatsink'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.6.38.0]'
          key: 'temp.heatsink[heatsinkTemperature.0]'
          value_type: FLOAT
          units: C
          description: |
            MIB: PROSTAR-PWM
            Description:Heatsink Temperature
            Scaling Factor:1.0
            Units:deg C
            Range:[-128, 127]
            Modbus address:0x001A
          tags:
            - tag: component
              value: temperature
      discovery_rules:
        - uuid: 17148797def9484ba26b0afdcc44bfd5
          name: 'Battery voltage discovery'
          type: DEPENDENT
          key: battery.voltage.discovery
          description: 'Discovery for battery voltage triggers'
          item_prototypes:
            - uuid: 6e4ed5ae449c48eeb328d30b76d083a2
              name: 'Battery: Voltage{#SINGLETON}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.33333.6.30.0]'
              key: 'battery.voltage[batteryTerminalVoltage.0{#SINGLETON}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: PROSTAR-PWM
                Description:Control State
                Modbus address:0x0021
              tags:
                - tag: component
                  value: battery
              trigger_prototypes:
                - uuid: e89cf2b8066840c2876642f0d8db1edd
                  expression: 'min(/Morningstar ProStar PWM by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.CRIT}'
                  name: 'Morningstar ProStar PWM: Battery: Critically high battery voltage'
                  event_name: 'Morningstar ProStar PWM: Battery: Critically high battery voltage (over {#VOLTAGE.MAX.CRIT}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 8356aba9afb242b09902873a5f0e1d47
                  expression: 'max(/Morningstar ProStar PWM by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.CRIT}'
                  name: 'Morningstar ProStar PWM: Battery: Critically low battery voltage'
                  event_name: 'Morningstar ProStar PWM: Battery: Critically low battery voltage (below {#VOLTAGE.MIN.CRIT}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 77f130af976c43edb8c823de5cbd57b2
                  expression: 'min(/Morningstar ProStar PWM by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.WARN}'
                  name: 'Morningstar ProStar PWM: Battery: High battery voltage'
                  event_name: 'Morningstar ProStar PWM: Battery: High battery voltage (over {#VOLTAGE.MAX.WARN}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  dependencies:
                    - name: 'Morningstar ProStar PWM: Battery: Critically high battery voltage'
                      expression: 'min(/Morningstar ProStar PWM by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.CRIT}'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 6c288c8b28db4f8e95c8ad2aa8b838ef
                  expression: 'max(/Morningstar ProStar PWM by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.WARN}'
                  name: 'Morningstar ProStar PWM: Battery: Low battery voltage'
                  event_name: 'Morningstar ProStar PWM: Battery: Low battery voltage (below {#VOLTAGE.MIN.WARN}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  dependencies:
                    - name: 'Morningstar ProStar PWM: Battery: Critically low battery voltage'
                      expression: 'max(/Morningstar ProStar PWM by SNMP/battery.voltage[batteryTerminalVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.CRIT}'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: 8ecd4f88627a4dadb132fdbb6d911b6b
              name: 'Voltage: Battery/Load{#SINGLETON}'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Morningstar ProStar PWM by SNMP'
                    key: 'battery.voltage[batteryTerminalVoltage.0{#SINGLETON}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Morningstar ProStar PWM by SNMP'
                    key: 'load.voltage[loadVoltage.0]'
          master_item:
            key: 'battery.voltage.discovery[batteryTerminalVoltage.0]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var v_range = [
                  	[[0, 18], [12, 15, 11.5, 15.5]],
                  	[[18, 36], [24, 30, 23, 31]],
                  	[[36, 99], [48, 60, 46, 62]],
                  ],
                  	result = [];
                  
                  for (var idx in v_range) {
                  	if (v_range[idx][0][0] < value && value <= v_range[idx][0][1]) {
                  		result = [{
                  			'{#VOLTAGE.MIN.WARN}': parseInt({$VOLTAGE.MIN.WARN}) || v_range[idx][1][0],
                  			'{#VOLTAGE.MAX.WARN}': parseInt({$VOLTAGE.MAX.WARN}) || v_range[idx][1][1],
                  			'{#VOLTAGE.MIN.CRIT}': parseInt({$VOLTAGE.MIN.CRIT}) || v_range[idx][1][2],
                  			'{#VOLTAGE.MAX.CRIT}': parseInt({$VOLTAGE.MAX.CRIT}) || v_range[idx][1][3],
                  			'{#SINGLETON}': ''
                  		}];
                  		break;
                  	}
                  }
                  
                  return JSON.stringify(result);
      tags:
        - tag: class
          value: hardware
        - tag: class
          value: power
        - tag: subclass
          value: device
        - tag: target
          value: morningstar
      macros:
        - macro: '{$BATTERY.TEMP.MAX.CRIT}'
          value: '60'
          description: 'Battery high temperature critical value'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Battery maximum critical threshold'
            description: 'Battery high temperature critical value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BATTERY.TEMP.MAX.WARN}'
          value: '45'
          description: 'Battery high temperature warning value'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Battery maximum warning threshold'
            description: 'Battery high temperature warning value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BATTERY.TEMP.MIN.CRIT}'
          value: '-20'
          description: 'Battery low temperature critical value'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Battery minimum critical threshold'
            description: 'Battery low temperature critical value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BATTERY.TEMP.MIN.WARN}'
          value: '0'
          description: 'Battery low temperature warning value'
          config:
            type: TEXT
            priority: '1'
            section_name: Thresholds
            label: 'Battery minimum warning threshold'
            description: 'Battery low temperature warning value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$CHARGE.STATE.CRIT}'
          value: '4'
          description: fault
          config:
            type: TEXT
            priority: '10'
            section_name: Other
            label: 'Charging critical status'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$CHARGE.STATE.WARN}'
          value: '2'
          description: disconnect
          config:
            type: TEXT
            priority: '9'
            section_name: Other
            label: 'Charging warning status'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.CRIT:"fault"}'
          value: '4'
          description: fault
          config:
            type: TEXT
            priority: '15'
            section_name: Other
            label: 'Load status critical (fault)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.CRIT:"lvd"}'
          value: '3'
          description: lvd
          config:
            type: TEXT
            priority: '14'
            section_name: Other
            label: 'Load status critical (lvd)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.WARN:"disconnect"}'
          value: '5'
          description: disconnect
          config:
            type: TEXT
            priority: '12'
            section_name: Other
            label: 'Load status warning (disconnect)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.WARN:"lvdWarning"}'
          value: '2'
          description: lvdWarning
          config:
            type: TEXT
            priority: '11'
            section_name: Other
            label: 'Load status warning (lvdWarning)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.WARN:"override"}'
          value: '7'
          description: override
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Load status warning (override)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MAX.CRIT}'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Voltage maximum critical threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MAX.WARN}'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Voltage maximum warning threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MIN.CRIT}'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Voltage minimum critical threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MIN.WARN}'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Voltage minimum warning threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: eb560f95bfa3418b8b614ef066b36dde
          name: 'Morningstar ProStar PWM: Overview'
          pages:
            - widgets:
                - type: graph
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar ProStar PWM by SNMP'
                        name: 'Array: Voltage'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '4'
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar ProStar PWM by SNMP'
                        name: 'Current: Charge/Load'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  'y': '8'
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar ProStar PWM by SNMP'
                        name: 'Temperature: Ambient/Battery/Heatsink'
                    - type: STRING
                      name: reference
                      value: AAAAC
      valuemaps:
        - uuid: f94eb6ad54c44281878c7c018c6209d1
          name: 'ProStar PWM charge state'
          mappings:
            - value: '0'
              newvalue: Start
            - value: '1'
              newvalue: NightCheck
            - value: '2'
              newvalue: Disconnect
            - value: '3'
              newvalue: Night
            - value: '4'
              newvalue: Fault
            - value: '5'
              newvalue: Bulk
            - value: '6'
              newvalue: Pwm
            - value: '7'
              newvalue: Float
            - value: '8'
              newvalue: Equalize
        - uuid: f0be8765c74e4c4788d4ff99a6c5ccd4
          name: 'ProStar PWM load state'
          mappings:
            - value: '0'
              newvalue: Start
            - value: '1'
              newvalue: Normal
            - value: '2'
              newvalue: LvdWarning
            - value: '3'
              newvalue: Lvd
            - value: '4'
              newvalue: Fault
            - value: '5'
              newvalue: Disconnect
            - value: '6'
              newvalue: NormalOff
            - value: '7'
              newvalue: Override
            - value: '8'
              newvalue: NotUsed
    - uuid: 2d20a2fbd540492089fdcafc8feb60e3
      template: 'Morningstar TriStar MPPT 600V by SNMP'
      name: 'Morningstar TriStar MPPT 600V by SNMP'
      description: |
        MIBs used:
        TRISTAR-MPPT
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 2e83c42d78e8486f936733e3cb6dee6b
          name: 'Array: Array Current'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.31.0]'
          key: 'array.current[arrayCurrent.0]'
          value_type: FLOAT
          units: A
          description: |
            MIB: TRISTAR-MPPT
            Description:Array Current
            Scaling Factor:1.0
            Units:A
            Range:[-10, 80]
            Modbus address:0x001d
          tags:
            - tag: component
              value: array
        - uuid: 9750ce4073d9467fa18f0e35f990c081
          name: 'Array: Sweep Pmax'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.33.0]'
          key: 'array.sweep_pmax[arrayPmaxLastSweep.0]'
          value_type: FLOAT
          units: W
          description: |
            MIB: TRISTAR-MPPT
            Description:Pmax (last sweep)
            Scaling Factor:1.0
            Units:W
            Range:[-10, 5000]
            Modbus address:0x003c
          tags:
            - tag: component
              value: array
        - uuid: de36a1087b2d4ade8369c620c794c881
          name: 'Array: Sweep Vmp'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.34.0]'
          key: 'array.sweep_vmp[arrayVmpLastSweep.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: TRISTAR-MPPT
            Description:Vmp (last sweep)
            Scaling Factor:1.0
            Units:V
            Range:[-10, 650.0]
            Modbus address:0x003d
          tags:
            - tag: component
              value: array
        - uuid: a8f4819131fe4247aef9b1cd819b47d9
          name: 'Array: Sweep Voc'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.35.0]'
          key: 'array.sweep_voc[arrayVocLastSweep.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: TRISTAR-MPPT
            Description:Voc (last sweep)
            Scaling Factor:1.0
            Units:V
            Range:[-10, 650.0]
            Modbus address:0x003e
          tags:
            - tag: component
              value: array
        - uuid: e13c3135ce8649ea9c88d4f9eb56219e
          name: 'Array: Voltage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.30.0]'
          key: 'array.voltage[arrayVoltage.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: TRISTAR-MPPT
            Description:Array Voltage
            Scaling Factor:1.0
            Units:V
            Range:[-10, 650]
            Modbus address:0x001b
          tags:
            - tag: component
              value: array
        - uuid: 058dc403d9b541978aebcb2944ecf75f
          name: 'Battery: Battery Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.36.0]'
          key: 'battery.voltage.discovery[batteryVoltage.0]'
          delay: 15m
          history: '0'
          value_type: FLOAT
          units: V
          description: |
            MIB: TRISTAR-MPPT
            Description:Battery voltage
            Scaling Factor:1.0
            Units:V
            Range:[-10, 80]
            Modbus address:0x0018
          tags:
            - tag: component
              value: battery
            - tag: component
              value: discovery
            - tag: component
              value: raw
        - uuid: 5e42ba3c9a764b9690feb04d4bf7df45
          name: 'Battery: Charge Current'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.42.0]'
          key: 'charge.current[batteryCurrent.0]'
          value_type: FLOAT
          units: A
          description: |
            MIB: TRISTAR-MPPT
            Description:Battery Current
            Scaling Factor:1.0
            Units:A
            Range:[-10, 80]
            Modbus address:0x001c
          tags:
            - tag: component
              value: battery
        - uuid: 6e168ff947324068aad1fc16d577369d
          name: 'Battery: Output Power'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.44.0]'
          key: 'charge.output_power[ outputPower.0]'
          value_type: FLOAT
          units: W
          description: |
            MIB: TRISTAR-MPPT
            Description:Output Power
            Scaling Factor:1.0
            Units:W
            Range:[-10, 4000]
            Modbus address:0x003a
          tags:
            - tag: component
              value: battery
        - uuid: aa20a89288c444a492910cb1a7f19499
          name: 'Battery: Charge State'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.46.0]'
          key: 'charge.state[chargeState.0]'
          value_type: FLOAT
          description: |
            MIB: TRISTAR-MPPT
            Description:Charge State
            Modbus address:0x0032
            
            0: Start
            1: NightCheck
            2: Disconnect
            3: Night
            4: Fault
            5: Mppt
            6: Absorption
            7: Float
            8: Equalize
            9: Slave
            10: Fixed
          valuemap:
            name: 'TriStar MPPT 600V charge state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: battery
          triggers:
            - uuid: ed2b56b78fce47f88b679774640706b5
              expression: 'last(/Morningstar TriStar MPPT 600V by SNMP/charge.state[chargeState.0])={$CHARGE.STATE.CRIT}'
              name: 'Morningstar TriStar MPPT 600V: Battery: Device charge in critical state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 6f21bda91cc640809f0f4faf04ba86f4
              expression: 'last(/Morningstar TriStar MPPT 600V by SNMP/charge.state[chargeState.0])={$CHARGE.STATE.WARN}'
              name: 'Morningstar TriStar MPPT 600V: Battery: Device charge in warning state'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar TriStar MPPT 600V: Battery: Device charge in critical state'
                  expression: 'last(/Morningstar TriStar MPPT 600V by SNMP/charge.state[chargeState.0])={$CHARGE.STATE.CRIT}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 3d67ceefb2c443d38051e2d22aca45ce
          name: 'Counter: Charge Amp-hours'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.50.0]'
          key: 'counter.charge_amp_hours[ahChargeResetable.0]'
          value_type: FLOAT
          units: Ah
          description: |
            MIB: TRISTAR-MPPT
            Description:Ah Charge Resettable
            Scaling Factor:1.0
            Units:Ah
            Range:[0.0, 5000]
            Modbus addresses:H=0x0034 L=0x0035
          tags:
            - tag: component
              value: counter
        - uuid: 1a7ff2c884784eb4817956e0ecd5b718
          name: 'Counter: Charge KW-hours'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.52.0]'
          key: 'counter.charge_kw_hours[kwhChargeResetable.0]'
          value_type: FLOAT
          units: '!kWh'
          description: |
            MIB: TRISTAR-MPPT
            Description:kWh Charge Resettable
            Scaling Factor:1.0
            Units:kWh
            Range:[0.0, 65535.0]
            Modbus address:0x0038
          tags:
            - tag: component
              value: counter
        - uuid: a2b5a78fe649480ea0cc580b5fa30bde
          name: 'Status: Alarms'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.57.0]'
          key: 'status.alarms[alarms.0]'
          history: 1h
          value_type: TEXT
          description: |
            MIB: TRISTAR-MPPT
            Description:Alarms
            Modbus addresses:H=0x002e L=0x002f
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  var FIELDS = [
                  	'rtsOpen',
                  	'rtsShorted',
                  	'rtsDisconnected',
                  	'heatsinkTempSensorOpen',
                  	'heatsinkTempSensorShorted',
                  	'highTemperatureCurrentLimit',
                  	'currentLimit',
                  	'currentOffset',
                  	'batterySense',
                  	'batterySenseDisconnected',
                  	'uncalibrated',
                  	'rtsMiswire',
                  	'highVoltageDisconnect',
                  	'undefined',
                  	'systemMiswire',
                  	'mosfetSOpen',
                  	'p12VoltageOutOfRange',
                  	'highArrayVCurrentLimit',
                  	'maxAdcValueReached',
                  	'controllerWasReset',
                  	'alarm21Internal',
                  	'p3VoltageOutOfRange',
                  	'derateLimit',
                  	'arrayCurrentOffset',
                  	'ee-i2cRetryLimit',
                  	'ethernetAlarm',
                  	'lvd',
                  	'software',
                  	'fp12VoltageOutOfRange',
                  	'extflashFault',
                  	'slaveControlFault',
                  	'alarm32Undefined'
                  ];
                  
                  var flags = parseInt(value.replace(/\x20/g, ''), 16),
                  	result = [];
                  
                  for (var i = 0, f = 1 << 31 >>> 0, l = FIELDS.length; i < l; i++, f >>>= 1) {
                  	if (flags & f) {
                  		result.push(FIELDS[i]);
                  	}
                  }
                  
                  return result.length ? result.join('\n') : 'No alarms';
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 62d1ffe8417c4ef9b746d17185d8853b
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","alarm21Internal")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "alarm21Internal" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 367d91fa49c241e795a2b497739c6f01
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","arrayCurrentOffset")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "arrayCurrentOffset" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 1c1baf4eea9e416a98bcf3e12d7ae01f
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","batterySense")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "batterySense" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: b627e79de7b446d69ee245b07f755405
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","batterySenseDisconnected")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "batterySenseDisconnected" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 73aba1af987843d98542105f2b41c5bd
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","controllerWasReset")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "controllerWasReset" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: aae5a3441b9e4394a39e7a8c5ce29e0c
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","currentLimit")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "currentLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: f8e42483b1534ed586252db0c8880aa6
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","currentOffset")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "currentOffset" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: bd32be9b60334cc1b80d2de129f0f1a2
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","derateLimit")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "derateLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: e0886663f4df4ff0965fac33951d4ffc
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","ee-i2cRetryLimit")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "ee-i2cRetryLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: abfeb2c3c566401b9f30cd28765aacff
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","ethernetAlarm")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "ethernetAlarm" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: a0ffdbf5695d4945960df6ea7defa071
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","extflashFault")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "extflashFault" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: f92ce5a55f0a4a65beca0abb748b7c04
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","fp12VoltageOutOfRange")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "fp12VoltageOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 5bdcd298878a4baf97aab8df338e1123
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempSensorOpen")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "heatsinkTempSensorOpen" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 9fe220d99b524db8bbfe5b511ee91fa7
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempSensorShorted")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "heatsinkTempSensorShorted" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: dc8d3f71c60643b7a6a25a9d7452ce60
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","highArrayVCurrentLimit")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "highArrayVCurrentLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: d279f44217b046c789c865b8b44c9342
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","highTemperatureCurrentLimit")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "highTemperatureCurrentLimit" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: b48d1c04e95c4b89a7240fc2a611a499
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","highVoltageDisconnect")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "highVoltageDisconnect" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 767be108224d43a99ac2568166c9cd33
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","lvd")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "lvd" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 107b8a4a63c146fa908f5b7ccc716258
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","maxAdcValueReached")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "maxAdcValueReached" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 5792c3702ab94123891e02ee4c05339f
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","mosfetSOpen")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "mosfetSOpen" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: a115f88a282e41179b569633234f04e2
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","p3VoltageOutOfRange")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "p3VoltageOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 8a3906ceae5547ca8f9c916ca46e7be8
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","p12VoltageOutOfRange")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "p12VoltageOutOfRange" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 49d3fb027a88462aa7f67442a507c051
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","rtsDisconnected")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "rtsDisconnected" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 650cf2d3c06f4c55ac90b1dd23ca25d1
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","rtsMiswire")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "rtsMiswire" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 48bb77b135c84d6a9e3792d8385f16da
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","rtsShorted")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "rtsShorted" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 7e363c7cc8ce4104a9c6269c9e94ac26
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","slaveControlFault")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "slaveControlFault" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: e1235a2201a542bb9ac67345c70641e3
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","software")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "software" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: cb5b84c99bcf45459bdc955c8604264b
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","systemMiswire")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "systemMiswire" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
            - uuid: 72ce41657c1848d897255ad3de77d942
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.alarms[alarms.0],#3,"like","uncalibrated")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "uncalibrated" alarm flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
        - uuid: 81efe20cce1b4b26a6eda83e86fbd49c
          name: 'Status: Faults'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.55.0]'
          key: 'status.faults[faults.0]'
          history: 1h
          value_type: TEXT
          description: |
            MIB: TRISTAR-MPPT
            Description:Faults
            Modbus addresses:H=0x002c L=0x002d
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  var FIELDS = [
                  	'overcurrent',
                  	'fetShort',
                  	'softwareFault',
                  	'batteryHvd',
                  	'arrayHvd',
                  	'dipSwitchChange',
                  	'customSettingsEdit',
                  	'rtsShorted',
                  	'rtsDisconnected',
                  	'eepromRetryLimit',
                  	'controllerWasReset',
                  	'chargeSlaveControlTimeout',
                  	'rs232SerialToMeterBridge',
                  	'batteryLvd',
                  	'fault14Undefined',
                  	'powerboardCommunicationFault',
                  	'fault16Software',
                  	'fault17Software',
                  	'fault18Software',
                  	'fault19Software',
                  	'fault20Software',
                  	'fault21Software',
                  	'fpgaVersion',
                  	'currentSensorReferenceOutOfRange',
                  	'ia-refSlaveModeTimeout',
                  	'blockbusBoot',
                  	'hscommMaster',
                  	'hscomm',
                  	'slave',
                  ];
                  
                  var flags = parseInt(value.replace(/\x20/g, ''), 16),
                  	result = [];
                  
                  for (var i = 0, f = 1 << 31 >>> 0, l = FIELDS.length; i < l; i++, f >>>= 1) {
                  	if (flags & f) {
                  		result.push(FIELDS[i]);
                  	}
                  }
                  
                  return result.length ? result.join('\n') : 'No faults';
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 747a56182a6f4336b720a95b0609013c
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","arrayHvd")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "arrayHvd" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: e9d7a51b64444e27b28b13ebf38a11c3
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","batteryHvd")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "batteryHvd" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: b898ac485d094f1cb65020ad5459641b
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","batteryLvd")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "batteryLvd" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 806e83938072453ab66895044907c02d
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","blockbusBoot")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "blockbusBoot" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: f20f87cd6ce3414182cd2088a947ef24
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","chargeSlaveControlTimeout")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "chargeSlaveControlTimeout" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: f4478548ad17400c9cddbf8b27720952
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","controllerWasReset")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "controllerWasReset" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 6c9a64ff6f61457daf826e831f51b048
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","currentSensorReferenceOutOfRange")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "currentSensorReferenceOutOfRange" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 74d39d01841f454e8f72457104a42cb7
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","customSettingsEdit")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "customSettingsEdit" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 12d55fb0398c4fbb87ca948f2e692a38
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","dipSwitchChange")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "dipSwitchChange" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 25e71e9c3ad945ed9f48945cac45bb56
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","eepromRetryLimit")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "eepromRetryLimit" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: f6fafa09a41a428c87d5ef303071a7f7
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","fault16Software")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "fault16Software" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 8f079e7606d14dc2ab6313fdae80bafc
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","fault17Software")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "fault17Software" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: c388f647dd48445d8b8e3eee02ea38fc
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","fault18Software")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "fault18Software" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 1466954e09704b3092772f0996f692f4
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","fault19Software")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "fault19Software" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 86595bafc3054fd99343f24bbfdc44e3
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","fault20Software")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "fault20Software" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: d269607e330243fe93e2f85c36d38114
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","fault21Software")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "fault21Software" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 68d6b95b6b9e42ada5a212a913d1ae43
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","fetShort")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "fetShort" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: dcb1c2bcc704405c8baae825124e3958
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","fpgaVersion")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "fpgaVersion" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 351af5c43f984930b4ebdb8690c52e7d
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","hscomm")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "hscomm" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: b32067a9b80c4836af4120f9f8e21bbd
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","hscommMaster")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "hscommMaster" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: bb61ea6f03c94556bf4f333bc050206f
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","ia-refSlaveModeTimeout")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "ia-refSlaveModeTimeout" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 843654df3185400e854c8c1f0229c32c
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","overcurrent")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "overcurrent" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 642f03d6eda346aca835e75088b7067b
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","powerboardCommunicationFault")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "powerboardCommunicationFault" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 4d8f0244f8d047bc8730ffc2f02a976d
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","rs232SerialToMeterBridge")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "rs232SerialToMeterBridge" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 6c125b8f681b47a99f7535292bd0507c
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","rtsDisconnected")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "rtsDisconnected" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: abad398631f34dac8094e4bcd14e3613
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","rtsShorted")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "rtsShorted" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 6824d221feb042da860248a4b418105c
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","slave")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "slave" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 56adf438e90f410497246b27b6da49f4
              expression: 'count(/Morningstar TriStar MPPT 600V by SNMP/status.faults[faults.0],#3,"like","softwareFault")=2'
              name: 'Morningstar TriStar MPPT 600V: Status: Device has "softwareFault" faults flag'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
        - uuid: d61bd2d5717740518867bfbf734914c9
          name: 'Status: Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: status.hw.uptime
          units: uptime
          description: 'The amount of time since this host was last initialized. Note that this is different from sysUpTime in the SNMPv2-MIB [RFC1907] because sysUpTime is the uptime of the network management portion of the system.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: status
        - uuid: e6a4dd0a61c8479985a1179842d22766
          name: 'Status: Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: status.net.uptime
          units: uptime
          description: 'The time (in hundredths of a second) since the network management portion of the system was last re-initialized.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: c4f0ea9e18884bc0b546933871017098
              expression: 'nodata(/Morningstar TriStar MPPT 600V by SNMP/status.net.uptime,5m)=1'
              name: 'Morningstar TriStar MPPT 600V: Status: Failed to fetch data'
              event_name: 'Morningstar TriStar MPPT 600V: Status: Failed to fetch data (or no data for 5m)'
              priority: WARNING
              description: 'Zabbix has not received data for items for the last 5 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 738f2e6d143a4e6db3ecf2736ca843cb
          name: 'Battery: Target Voltage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.45.0]'
          key: 'target.voltage[targetRegulationVoltage.0]'
          value_type: FLOAT
          units: V
          description: |
            MIB: TRISTAR-MPPT
            Description:Target Voltage
            Scaling Factor:1.0
            Units:V
            Range:[-10, 650.0]
            Modbus address:0x0033
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: battery
        - uuid: 4f3fdc6382704fb584fbe11264a0e5c2
          name: 'Temperature: Battery'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.48.0]'
          key: 'temp.battery[batteryTemperature.0]'
          value_type: FLOAT
          units: C
          description: |
            MIB: TRISTAR-MPPT
            Description:Batt. Temp
            Scaling Factor:1.0
            Units:C
            Range:[-40, 80]
            Modbus address:0x0025
          tags:
            - tag: component
              value: temperature
          triggers:
            - uuid: bc117de353304889980c7836603abb0d
              expression: 'min(/Morningstar TriStar MPPT 600V by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.CRIT}'
              name: 'Morningstar TriStar MPPT 600V: Temperature: Critically high battery temperature'
              event_name: 'Morningstar TriStar MPPT 600V: Temperature: Critically high battery temperature (over {$BATTERY.TEMP.MAX.CRIT}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: 25a8f16d632940c3a2c994a9f2a76851
              expression: 'max(/Morningstar TriStar MPPT 600V by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.CRIT}'
              name: 'Morningstar TriStar MPPT 600V: Temperature: Critically low battery temperature'
              event_name: 'Morningstar TriStar MPPT 600V: Temperature: Critically low battery temperature (below {$BATTERY.TEMP.MIN.WARN}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
            - uuid: db1152c815c84d208be0db3dac63acb4
              expression: 'min(/Morningstar TriStar MPPT 600V by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.WARN}'
              name: 'Morningstar TriStar MPPT 600V: Temperature: High battery temperature'
              event_name: 'Morningstar TriStar MPPT 600V: Temperature: High battery temperature (over {$BATTERY.TEMP.MAX.WARN}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar TriStar MPPT 600V: Temperature: Critically high battery temperature'
                  expression: 'min(/Morningstar TriStar MPPT 600V by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.CRIT}'
              tags:
                - tag: scope
                  value: notice
            - uuid: 9c331fb9a30b4867a3e16acd7e9f8983
              expression: 'max(/Morningstar TriStar MPPT 600V by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.WARN}'
              name: 'Morningstar TriStar MPPT 600V: Temperature: Low battery temperature'
              event_name: 'Morningstar TriStar MPPT 600V: Temperature: Low battery temperature (below {$BATTERY.TEMP.MIN.WARN}C for 5m)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Morningstar TriStar MPPT 600V: Temperature: Critically low battery temperature'
                  expression: 'max(/Morningstar TriStar MPPT 600V by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.CRIT}'
              tags:
                - tag: scope
                  value: notice
        - uuid: d3abc18d718540039adcfcb4a74bea43
          name: 'Temperature: Heatsink'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.33333.7.49.0]'
          key: 'temp.heatsink[heatsinkTemperature.0]'
          value_type: FLOAT
          units: C
          description: |
            MIB: TRISTAR-MPPT
            Description:HS Temp
            Scaling Factor:1.0
            Units:C
            Range:[-40, 80]
            Modbus address:0x0023
          tags:
            - tag: component
              value: temperature
      discovery_rules:
        - uuid: 7ba9493b38174751b448419b0b03312e
          name: 'Battery voltage discovery'
          type: DEPENDENT
          key: battery.voltage.discovery
          description: 'Discovery for battery voltage triggers'
          item_prototypes:
            - uuid: 429d19822647434ca7df7016f44d690f
              name: 'Battery: Voltage{#SINGLETON}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.33333.7.36.0]'
              key: 'battery.voltage[batteryVoltage.0{#SINGLETON}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: TRISTAR-MPPT
                Description:Battery voltage
                Scaling Factor:1.0
                Units:V
                Range:[-10, 80]
                Modbus address:0x0018
              tags:
                - tag: component
                  value: battery
              trigger_prototypes:
                - uuid: f326b9eb93fe4267bf9f4a07bb578eca
                  expression: 'min(/Morningstar TriStar MPPT 600V by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.CRIT}'
                  name: 'Morningstar TriStar MPPT 600V: Battery: Critically high battery voltage'
                  event_name: 'Morningstar TriStar MPPT 600V: Battery: Critically high battery voltage (over {#VOLTAGE.MAX.CRIT}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 07fb5dd68c954da3982392dfcb2de0b8
                  expression: 'max(/Morningstar TriStar MPPT 600V by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.CRIT}'
                  name: 'Morningstar TriStar MPPT 600V: Battery: Critically low battery voltage'
                  event_name: 'Morningstar TriStar MPPT 600V: Battery: Critically low battery voltage (below {#VOLTAGE.MIN.CRIT}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: aca6ef49842d4b3ba543fcf470473a96
                  expression: 'min(/Morningstar TriStar MPPT 600V by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.WARN}'
                  name: 'Morningstar TriStar MPPT 600V: Battery: High battery voltage'
                  event_name: 'Morningstar TriStar MPPT 600V: Battery: High battery voltage (over {#VOLTAGE.MAX.WARN}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  dependencies:
                    - name: 'Morningstar TriStar MPPT 600V: Battery: Critically high battery voltage'
                      expression: 'min(/Morningstar TriStar MPPT 600V by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.CRIT}'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: b8673c0802a244d0850730e3fdf5a6dc
                  expression: 'max(/Morningstar TriStar MPPT 600V by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.WARN}'
                  name: 'Morningstar TriStar MPPT 600V: Battery: Low battery voltage'
                  event_name: 'Morningstar TriStar MPPT 600V: Battery: Low battery voltage (below {#VOLTAGE.MIN.WARN}V for 5m)'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  dependencies:
                    - name: 'Morningstar TriStar MPPT 600V: Battery: Critically low battery voltage'
                      expression: 'max(/Morningstar TriStar MPPT 600V by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.CRIT}'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: 592990e094e842f68463ab542878d5a9
              name: 'Battery: Voltage{#SINGLETON}'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Morningstar TriStar MPPT 600V by SNMP'
                    key: 'battery.voltage[batteryVoltage.0{#SINGLETON}]'
          master_item:
            key: 'battery.voltage.discovery[batteryVoltage.0]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var v_range = [
                  	[[0, 18], [12, 15, 11.5, 15.5]],
                  	[[18, 36], [24, 30, 23, 31]],
                  	[[36, 99], [48, 60, 46, 62]],
                  ],
                  	result = [];
                  
                  for (var idx in v_range) {
                  	if (v_range[idx][0][0] < value && value <= v_range[idx][0][1]) {
                  		result = [{
                  			'{#VOLTAGE.MIN.WARN}': parseInt({$VOLTAGE.MIN.WARN}) || v_range[idx][1][0],
                  			'{#VOLTAGE.MAX.WARN}': parseInt({$VOLTAGE.MAX.WARN}) || v_range[idx][1][1],
                  			'{#VOLTAGE.MIN.CRIT}': parseInt({$VOLTAGE.MIN.CRIT}) || v_range[idx][1][2],
                  			'{#VOLTAGE.MAX.CRIT}': parseInt({$VOLTAGE.MAX.CRIT}) || v_range[idx][1][3],
                  			'{#SINGLETON}': ''
                  		}];
                  		break;
                  	}
                  }
                  
                  return JSON.stringify(result);
      tags:
        - tag: class
          value: hardware
        - tag: class
          value: power
        - tag: subclass
          value: device
        - tag: target
          value: morningstar
      macros:
        - macro: '{$BATTERY.TEMP.MAX.CRIT}'
          value: '60'
          description: 'Battery high temperature critical value'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Battery maximum critical threshold'
            description: 'Battery high temperature critical value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BATTERY.TEMP.MAX.WARN}'
          value: '45'
          description: 'Battery high temperature warning value'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Battery maximum warning threshold'
            description: 'Battery high temperature warning value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BATTERY.TEMP.MIN.CRIT}'
          value: '-20'
          description: 'Battery low temperature critical value'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Battery minimum critical threshold'
            description: 'Battery low temperature critical value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BATTERY.TEMP.MIN.WARN}'
          value: '0'
          description: 'Battery low temperature warning value'
          config:
            type: TEXT
            priority: '1'
            section_name: Thresholds
            label: 'Battery minimum warning threshold'
            description: 'Battery low temperature warning value'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$CHARGE.STATE.CRIT}'
          value: '4'
          description: fault
          config:
            type: TEXT
            priority: '10'
            section_name: Other
            label: 'Charging critical status'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$CHARGE.STATE.WARN}'
          value: '2'
          description: disconnect
          config:
            type: TEXT
            priority: '9'
            section_name: Other
            label: 'Charging warning status'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.CRIT:"fault"}'
          value: '4'
          description: fault
          config:
            type: TEXT
            priority: '15'
            section_name: Other
            label: 'Load status critical (fault)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.CRIT:"lvd"}'
          value: '3'
          description: lvd
          config:
            type: TEXT
            priority: '14'
            section_name: Other
            label: 'Load status critical (lvd)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.WARN:"disconnect"}'
          value: '5'
          description: disconnect
          config:
            type: TEXT
            priority: '12'
            section_name: Other
            label: 'Load status warning (disconnect)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.WARN:"lvdWarning"}'
          value: '2'
          description: lvdWarning
          config:
            type: TEXT
            priority: '11'
            section_name: Other
            label: 'Load status warning (lvdWarning)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$LOAD.STATE.WARN:"override"}'
          value: '7'
          description: override
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Load status warning (override)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MAX.CRIT}'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Voltage maximum critical threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MAX.WARN}'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Voltage maximum warning threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MIN.CRIT}'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Voltage minimum critical threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VOLTAGE.MIN.WARN}'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Voltage minimum warning threshold'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: aaa5fbc301ab439e8774e054c843c0f0
          name: 'Morningstar TriStar MPPT 600V: Overview'
          pages:
            - widgets:
                - type: graph
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar TriStar MPPT 600V by SNMP'
                        name: 'Array: Voltage'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '4'
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar TriStar MPPT 600V by SNMP'
                        name: 'Battery: Current'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  'y': '8'
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar TriStar MPPT 600V by SNMP'
                        name: 'Battery: Output Power (Watts)'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '12'
                  width: '72'
                  height: '4'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Morningstar TriStar MPPT 600V by SNMP'
                        name: 'Temperature: Battery/Heatsink'
                    - type: STRING
                      name: reference
                      value: AAAAD
      valuemaps:
        - uuid: 8a0dfdf98d254c219905751cccc878d7
          name: 'TriStar MPPT 600V charge state'
          mappings:
            - value: '0'
              newvalue: Start
            - value: '1'
              newvalue: NightCheck
            - value: '2'
              newvalue: Disconnect
            - value: '3'
              newvalue: Night
            - value: '4'
              newvalue: Fault
            - value: '5'
              newvalue: Mppt
            - value: '6'
              newvalue: Absorption
            - value: '7'
              newvalue: Float
            - value: '8'
              newvalue: Equalize
            - value: '9'
              newvalue: Slave
            - value: '10'
              newvalue: Fixed
    - uuid: 34f386276a094e8e9a6e46653fdf05b1
      template: 'Nextcloud by HTTP'
      name: 'Nextcloud by HTTP'
      description: |
        This template is designed for monitoring Nextcloud by HTTP via Zabbix, and it works without any external scripts.
          Nextcloud is a suite of client-server software for creating and using file hosting services.
          For more information, see the [`official documentation`](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-api-overview.html#)
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed for monitoring Nextcloud by HTTP via Zabbix, and it works without any external scripts.
        Nextcloud is a suite of client-server software for creating and using file hosting services.
        For more information, see the [`official documentation`](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-api-overview.html#)
        
        
        ## Setup
        
        Set host wizard configuration fields `Username`, `Password`, `Address`.
        The user must be included in the Administrators group.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: Templates/Applications
      items:
        - uuid: cf89012acb7749a396fc14a705145c91
          name: 'Active users, last 1 hour'
          type: DEPENDENT
          key: nextcloud.serverinfo.active_users.last1h
          description: 'The number of active users in the last 1 hour.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.activeUsers.last1hour
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: environment
        - uuid: 355d11e7459a4c599a86b2c08b90fd56
          name: 'Active users, last 5 minutes'
          type: DEPENDENT
          key: nextcloud.serverinfo.active_users.last5m
          description: 'The number of active users in the last 5 minutes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.activeUsers.last5minutes
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: environment
        - uuid: 6a28646d56804f9fa4d060af26579881
          name: 'Active users, last 24 hours'
          type: DEPENDENT
          key: nextcloud.serverinfo.active_users.last24hours
          description: 'The number of active users in the last day.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.activeUsers.last24hours
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: environment
        - uuid: cca878683ecb4de4b648fa100b579748
          name: 'Apps installed'
          type: DEPENDENT
          key: nextcloud.serverinfo.apps.installed
          description: 'The number of installed applications.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.nextcloud.system.apps.num_installed
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: b0375ab303e74e7cadd911a4a2e98725
              expression: 'change(/Nextcloud by HTTP/nextcloud.serverinfo.apps.installed)<>0'
              name: 'Nextcloud: Number of installed apps has been changed'
              priority: INFO
              description: 'Applications have been installed or removed.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: d53e692d6c7d42fcb8a69e322f434da1
          name: 'Apps update available'
          type: DEPENDENT
          key: nextcloud.serverinfo.apps.update
          description: 'The number of applications for which an update is available.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.nextcloud.system.apps.num_updates_available
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 180c82d98b694f27bc44d1fc20ccd06e
              expression: 'last(/Nextcloud by HTTP/nextcloud.serverinfo.apps.update)<>0'
              name: 'Nextcloud: Application updates are available'
              priority: WARNING
              description: 'Updates are available for some of the installed applications.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: cc488c36ae0643a7bacb5173935ba608
          name: 'Web server'
          type: DEPENDENT
          key: nextcloud.serverinfo.apps.webserver
          value_type: CHAR
          description: 'Web server description.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.webserver
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: environment
        - uuid: b018847264af4db3b3969e037734d669
          name: 'CPU load, avg 1m'
          type: DEPENDENT
          key: nextcloud.serverinfo.cpu.avg.1m
          value_type: FLOAT
          description: 'The average system load (the number of processes in the system run queue), last 1 minute.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.ocs.data.nextcloud.system.cpuload[0]'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 481edcbc45174b35a2d44003aa101817
              expression: 'min(/Nextcloud by HTTP/nextcloud.serverinfo.cpu.avg.1m,5m) > {$NEXTCLOUD.CPU.LOAD.MAX}'
              name: 'Nextcloud: CPU load is too high'
              event_name: 'Nextcloud: CPU load is too high (over {$NEXTCLOUD.CPU.LOAD.MAX} for 5m)'
              priority: AVERAGE
              description: 'High CPU load.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 1a7ca7bf50f042f7b0f025604cbeb008
          name: 'CPU load, avg 5m'
          type: DEPENDENT
          key: nextcloud.serverinfo.cpu.avg.5m
          value_type: FLOAT
          description: 'The average system load (the number of processes in the system run queue), last 5 minutes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.ocs.data.nextcloud.system.cpuload[1]'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: cpu
        - uuid: 06a34d8efcc043bbb027dbbddd37c8a2
          name: 'CPU load, avg 15m'
          type: DEPENDENT
          key: nextcloud.serverinfo.cpu.avg.15m
          value_type: FLOAT
          description: 'The average system load (the number of processes in the system run queue), last 15 minutes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.ocs.data.nextcloud.system.cpuload[2]'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: cpu
        - uuid: 725bdfe6f7eb4888b453c8ddd8907ba2
          name: 'Database size'
          type: DEPENDENT
          key: nextcloud.serverinfo.db.size
          units: B
          description: 'Size of database.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.database.size
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: storage
        - uuid: a1992a76942e4a8ebcd010ca73eed0af
          name: 'Database type'
          type: DEPENDENT
          key: nextcloud.serverinfo.db.type
          value_type: CHAR
          description: 'Database type.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.database.type
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: environment
        - uuid: 9a244bfd15a94f07a4f88947c10ff4b9
          name: 'Database version'
          type: DEPENDENT
          key: nextcloud.serverinfo.db.version
          value_type: CHAR
          description: 'Database description.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.database.version
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: environment
          triggers:
            - uuid: d59f8e583cc34c578946607433d254ca
              expression: 'change(/Nextcloud by HTTP/nextcloud.serverinfo.db.version)=1 and length(last(/Nextcloud by HTTP/nextcloud.serverinfo.db.version))>0'
              name: 'Nextcloud: Database version has changed'
              event_name: 'Nextcloud: Database version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'The Database version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 77bfc58708a54e8f89d83c962b7c2dac
          name: 'Free space'
          type: DEPENDENT
          key: nextcloud.serverinfo.freespace
          units: B
          description: 'The amount of free disk space.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.nextcloud.system.freespace
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: storage
          triggers:
            - uuid: 6d9d52db83e34d83891cc3bb449d59b2
              expression: 'last(/Nextcloud by HTTP/nextcloud.serverinfo.freespace)<{$NEXTCLOUD.STORAGE.FREE.MIN}'
              name: 'Nextcloud: Disk space is low'
              event_name: 'Nextcloud: Disk space is low (free < {$NEXTCLOUD.STORAGE.FREE.MIN})'
              priority: AVERAGE
              description: |
                Condition should be the following:
                - the disk free space is less than `{$NEXTCLOUD.STORAGE.FREE.MIN}`;
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: capacity
        - uuid: 8a7fb4062f484de4a8579ebb83b297a2
          name: 'Get server information'
          type: HTTP_AGENT
          key: nextcloud.serverinfo.get_data
          history: '0'
          value_type: TEXT
          authtype: BASIC
          username: '{$NEXTCLOUD.USER.NAME}'
          password: '{$NEXTCLOUD.USER.PASSWORD}'
          description: |
            This item provides useful server information, such as CPU load, RAM usage, disk usage, number of users, etc.
            https://github.com/nextcloud/serverinfo
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_ERROR
              error_handler_params: 'Could not get data.'
          timeout: 10s
          url: '{$NEXTCLOUD.SCHEMA}://{$NEXTCLOUD.ADDRESS}/ocs/v2.php/apps/serverinfo/api/v1/info'
          query_fields:
            - name: format
              value: json
            - name: skipApps
              value: 'false'
            - name: skipUpdate
              value: 'false'
          status_codes: '200,401'
          http_proxy: '{$NEXTCLOUD.PROXY}'
          headers:
            - name: OCS-APIRequest
              value: 'true'
          tags:
            - tag: component
              value: raw
        - uuid: 1e96304bec7447329f91875b7beadf7d
          name: 'Memory free'
          type: DEPENDENT
          key: nextcloud.serverinfo.mem.free
          units: B
          description: 'The amount of free RAM.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.nextcloud.system.mem_free
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
        - uuid: e4b20717f8ea48f49c8814955cbf5c6d
          name: 'Memory used, in %'
          type: DEPENDENT
          key: nextcloud.serverinfo.mem.pused
          units: '%'
          description: 'RAM usage, in percent.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  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 was not found: ' + path;
                  		}
                  
                  		data = data[step];
                  	}
                  
                  	return data;
                  }
                  
                  var data = JSON.parse(value),
                  	mem_total = getField(data,'ocs.data.nextcloud.system.mem_total'),
                  	mem_free = getField(data,'ocs.data.nextcloud.system.mem_free');
                  
                  return Math.ceil(100 - mem_free / mem_total * 100);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: b1f8786b975c443bac5daf351c29cde5
              expression: 'min(/Nextcloud by HTTP/nextcloud.serverinfo.mem.pused,5m) > {$NEXTCLOUD.MEM.PUSED.MAX}'
              name: 'Nextcloud: High memory utilization'
              event_name: 'Nextcloud: High memory utilization (>{$NEXTCLOUD.MEM.PUSED.MAX}% for 5m)'
              priority: AVERAGE
              description: 'The system is running out of free memory.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 04f69d7593a045a0815e78d65882c895
          name: 'Memory total'
          type: DEPENDENT
          key: nextcloud.serverinfo.mem.total
          units: B
          description: 'The size of the RAM.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.nextcloud.system.mem_total
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
        - uuid: e6a227bd9ae54d0faff1f591219d766f
          name: 'PHP maximum execution time'
          type: DEPENDENT
          key: nextcloud.serverinfo.php.max_execution_time
          units: s
          description: 'By default, the maximum execution time for PHP scripts is set to 30 seconds. If a script runs for longer than 30 seconds, PHP stops the script and reports an error. You can control the amount of time PHP allows scripts to run by changing the ''max_execution_time'' directive in your php.ini file.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.php.max_execution_time
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: environment
        - uuid: 50e1ce974d154e98a6d2bfce8fed78e1
          name: 'PHP memory free'
          type: DEPENDENT
          key: nextcloud.serverinfo.php.memory.free
          units: B
          description: 'PHP free memory size.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.php.opcache.memory_usage.free_memory
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
        - uuid: 87819fcbbc9745fa93a47c7043906299
          name: 'PHP memory limit'
          type: DEPENDENT
          key: nextcloud.serverinfo.php.memory.limit
          units: B
          description: 'By default, the PHP memory limit is generally set to 128 MB, but it can be customized based on the application''s specific needs. The php.ini file is usually the standard location to set the PHP memory limit.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.php.memory_limit
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
        - uuid: 0b8c6ee4a95b49a3b0b7eabf5131e56f
          name: 'PHP memory used, in %'
          type: DEPENDENT
          key: nextcloud.serverinfo.php.memory.pused
          units: '%'
          description: 'PHP memory used percentage'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  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 was not found: ' + path;
                  		}
                  
                  		data = data[step];
                  	}
                  
                  	return data;
                  }
                  
                  var data = JSON.parse(value),
                  	php_total = getField(data,'ocs.data.server.php.memory_limit'),
                  	php_free = getField(data,'ocs.data.server.php.opcache.memory_usage.used_memory');
                  
                  return Math.ceil(php_free / php_total * 100);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: ee778919cf91495da4445974afa039e9
              expression: 'min(/Nextcloud by HTTP/nextcloud.serverinfo.php.memory.pused,5m) > {$NEXTCLOUD.PHP.MEM.PUSED.MAX}'
              name: 'Nextcloud: High PHP memory utilization'
              event_name: 'Nextcloud: High PHP memory utilization (>{$NEXTCLOUD.PHP.MEM.PUSED.MAX}% for 5m)'
              priority: AVERAGE
              description: 'The PHP is running out of free memory.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 1db9f9c33eca4537b9069d358b27ac06
          name: 'PHP memory used'
          type: DEPENDENT
          key: nextcloud.serverinfo.php.memory.used
          units: B
          description: 'PHP memory used'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.php.opcache.memory_usage.used_memory
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
        - uuid: 5f4eb296e96f4e7f9760ee5e2a2b7064
          name: 'PHP memory wasted'
          type: DEPENDENT
          key: nextcloud.serverinfo.php.memory.wasted
          units: B
          description: 'Memory allocated to the service but not in use.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.php.opcache.memory_usage.wasted_memory
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
        - uuid: 63acb31d32b143baaca36cf7c1eaf673
          name: 'PHP memory wasted, in %'
          type: DEPENDENT
          key: nextcloud.serverinfo.php.memory.wasted_percentage
          value_type: FLOAT
          units: '%'
          description: 'Memory allocated to the service but not in use, in percent.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.php.opcache.memory_usage.current_wasted_percentage
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
        - uuid: 080ff2fb09a343cc90e62e9fe640c45c
          name: 'PHP maximum upload file size'
          type: DEPENDENT
          key: nextcloud.serverinfo.php.upload_max_filesize
          units: B
          description: 'By default, the maximum upload file size for PHP scripts is set to 128 megabytes. However, you may want to change this limit. For example, you can set a lower limit to prevent users from uploading large files to your site. To do this, change the ''upload_max_filesize'' and ''post_max_size'' directives.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.php.upload_max_filesize
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: environment
        - uuid: 59b08f54ce2a4d058f43c09dd1a9c469
          name: 'PHP version'
          type: DEPENDENT
          key: nextcloud.serverinfo.php.version
          value_type: CHAR
          description: 'PHP version'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.server.php.version
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: environment
          triggers:
            - uuid: ff6e12cb84bb494a9ffc692b28862a25
              expression: 'change(/Nextcloud by HTTP/nextcloud.serverinfo.php.version)=1 and length(last(/Nextcloud by HTTP/nextcloud.serverinfo.php.version))>0'
              name: 'Nextcloud: PHP version has changed'
              event_name: 'Nextcloud: PHP version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'The PHP version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: e02be7c876e8452bbf3722038bac9634
          name: 'Server information status'
          type: DEPENDENT
          key: nextcloud.serverinfo.status
          value_type: CHAR
          description: 'Server information API status'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.meta.message
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: b44c435b48264626ae2ec5cb610edac9
              expression: 'last(/Nextcloud by HTTP/nextcloud.serverinfo.status)<>"OK"'
              name: 'Nextcloud: Server information unavailable'
              opdata: 'Current state: {ITEM.LASTVALUE}'
              priority: HIGH
              description: 'Failed to get server information.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 2551bef7fa0f4ee0acbfd6bd0c90ef76
          name: 'Swap free'
          type: DEPENDENT
          key: nextcloud.serverinfo.swap.free
          units: B
          description: 'The amount of free swap.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.nextcloud.system.swap_free
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
        - uuid: 8a625e77ba964a49945c6367d95f3a88
          name: 'Swap used, in %'
          type: DEPENDENT
          key: nextcloud.serverinfo.swap.pused
          units: '%'
          description: 'Swap usage, in percent.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  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 was not found: ' + path;
                  		}
                  
                  		data = data[step];
                  	}
                  
                  	return data;
                  }
                  
                  var data = JSON.parse(value),
                  	swap_total = getField(data,'ocs.data.nextcloud.system.swap_total'),
                  	swap_free = getField(data,'ocs.data.nextcloud.system.swap_free');
                  
                  return Math.ceil(100 - swap_free / swap_total * 100);
            - type: STR_REPLACE
              parameters:
                - NaN
                - '0'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: da09c1862385450196651573aec00178
              expression: 'min(/Nextcloud by HTTP/nextcloud.serverinfo.swap.pused,5m) > {$NEXTCLOUD.SWAP.PUSED.MAX}'
              name: 'Nextcloud: High swap utilization'
              event_name: 'Nextcloud: High swap utilization (>{$NEXTCLOUD.SWAP.PUSED.MAX}% for 5m)'
              priority: AVERAGE
              description: 'The system is running out of free swap.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 361f440188a3415280e2b5f1b6b5aafb
          name: 'Swap total'
          type: DEPENDENT
          key: nextcloud.serverinfo.swap.total
          units: B
          description: 'The size of the swap memory.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.nextcloud.system.swap_total
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: memory
        - uuid: 202ccbfe8b3748918bdad4ff2d203a2f
          name: 'Instance update available'
          type: DEPENDENT
          key: nextcloud.serverinfo.update
          description: 'This metric indicates that an update for Nextcloud is available. Note that this metric doesn''t work on Nextcloud version 27 and lower.'
          valuemap:
            name: Boolean
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.nextcloud.system.update.available
              error_handler: DISCARD_VALUE
            - type: BOOL_TO_DECIMAL
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: b31ccb1f04c148e4b4abc7bc6516c2d5
              expression: 'last(/Nextcloud by HTTP/nextcloud.serverinfo.update)=1'
              name: 'Nextcloud: Server not up to date'
              priority: INFO
              description: 'A new Nextcloud version is available.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: c4939cb87ff8495784e3937c4bc7e34d
          name: Version
          type: DEPENDENT
          key: nextcloud.serverinfo.version
          value_type: CHAR
          description: 'Nextcloud service version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.nextcloud.system.version
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: nextcloud.serverinfo.get_data
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: e66591237ce643b0971e69b18a88a7cc
              expression: 'change(/Nextcloud by HTTP/nextcloud.serverinfo.version)=1 and length(last(/Nextcloud by HTTP/nextcloud.serverinfo.version))>0'
              name: 'Nextcloud: Version has changed'
              event_name: 'Nextcloud: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'Nextcloud version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: 477477630aa14dd8b3940f7b95697893
          name: 'Nextcloud: User discovery'
          type: HTTP_AGENT
          key: nextcloud.user.discovery
          delay: 1h
          authtype: BASIC
          username: '{$NEXTCLOUD.USER.NAME}'
          password: '{$NEXTCLOUD.USER.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NEXTCLOUD.USER}'
                value: '{$NEXTCLOUD.LLD.FILTER.USER.MATCHES}'
              - macro: '{#NEXTCLOUD.USER}'
                value: '{$NEXTCLOUD.LLD.FILTER.USER.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          lifetime: 1d
          description: 'User discovery.'
          item_prototypes:
            - uuid: eb16b38dd7e94aaa8ff103ffdec16858
              name: 'User "{#NEXTCLOUD.USER}": Display name'
              type: DEPENDENT
              key: 'nextcloud.user.displayname[{#NEXTCLOUD.USER}]'
              value_type: CHAR
              description: 'User visible name.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.displayname
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: environment
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
            - uuid: ed4fcf54655d49d3971d3ca1a63c6df2
              name: 'User "{#NEXTCLOUD.USER}": Status'
              type: DEPENDENT
              key: 'nextcloud.user.enabled[{#NEXTCLOUD.USER}]'
              description: 'User account status.'
              valuemap:
                name: 'User status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.enabled
                  error_handler: DISCARD_VALUE
                - type: BOOL_TO_DECIMAL
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: environment
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
              trigger_prototypes:
                - uuid: 402851b8791c4f6da8f513e6e8c51f46
                  expression: 'change(/Nextcloud by HTTP/nextcloud.user.enabled[{#NEXTCLOUD.USER}]) = 1'
                  name: 'Nextcloud: User "{#NEXTCLOUD.USER}" status changed'
                  priority: INFO
                  description: 'User account status has changed.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 78b3e2a8e7844b0ea5929dbecd8a2ed7
              name: 'User "{#NEXTCLOUD.USER}": Get data'
              type: HTTP_AGENT
              key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              history: '0'
              value_type: TEXT
              authtype: BASIC
              username: '{$NEXTCLOUD.USER.NAME}'
              password: '{$NEXTCLOUD.USER.PASSWORD}'
              description: 'Get common information about user'
              preprocessing:
                - type: CHECK_NOT_SUPPORTED
                  parameters:
                    - '-1'
                  error_handler: CUSTOM_ERROR
                  error_handler_params: 'Could not get data.'
              timeout: 10s
              url: '{$NEXTCLOUD.SCHEMA}://{$NEXTCLOUD.ADDRESS}/ocs/v1.php/cloud/users/{#NEXTCLOUD.USER}'
              query_fields:
                - name: format
                  value: json
              status_codes: '200,401'
              http_proxy: '{$NEXTCLOUD.PROXY}'
              headers:
                - name: OCS-APIRequest
                  value: 'true'
              tags:
                - tag: component
                  value: raw
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
            - uuid: d69ff358ddfe4ef3b5cc2f4218495975
              name: 'User "{#NEXTCLOUD.USER}": Last login, days ago'
              type: DEPENDENT
              key: 'nextcloud.user.inactive[{#NEXTCLOUD.USER}]'
              value_type: FLOAT
              units: '!days ago'
              description: 'The number of days since the user has last logged in.'
              valuemap:
                name: 'Last activity'
              preprocessing:
                - type: JAVASCRIPT
                  parameters:
                    - |
                      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 was not found: ' + path;
                      		}
                      
                      		data = data[step];
                      	}
                      
                      	return data;
                      }
                      
                      var data = JSON.parse(value),
                      	lastlogin = getField(data,'ocs.data.lastLogin');
                      
                      if (lastlogin === '0')
                      	return -1
                      
                      return Math.floor((Date.now() - lastlogin) / 1000 / 86400);
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: environment
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
              trigger_prototypes:
                - uuid: d2392d1b6e974a2da32de3a1f20f54a6
                  expression: 'last(/Nextcloud by HTTP/nextcloud.user.inactive[{#NEXTCLOUD.USER}]) > {$NEXTCLOUD.USER.MAX.INACTIVE:"{#NEXTCLOUD.USER}"}'
                  name: 'Nextcloud: User "{#NEXTCLOUD.USER}": inactive'
                  event_name: 'Nextcloud: User "{#NEXTCLOUD.USER}": inactive over {$NEXTCLOUD.USER.MAX.INACTIVE:"{#NEXTCLOUD.USER}"} days'
                  priority: INFO
                  description: 'The user has not logged in for more than {$NEXTCLOUD.USER.MAX.INACTIVE:"{#NEXTCLOUD.USER}"} days.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: ee0911775cb4404586aa38d95a4659a1
              name: 'User "{#NEXTCLOUD.USER}": Language'
              type: DEPENDENT
              key: 'nextcloud.user.language[{#NEXTCLOUD.USER}]'
              value_type: CHAR
              description: 'User language.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.language
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: environment
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
            - uuid: fbf8643740a748019950eddea3baa79d
              name: 'User "{#NEXTCLOUD.USER}": Last login'
              type: DEPENDENT
              key: 'nextcloud.user.lastLogin[{#NEXTCLOUD.USER}]'
              units: unixtime
              description: 'The time the user has last logged in.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.lastLogin
                  error_handler: DISCARD_VALUE
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: environment
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
            - uuid: 289504a5d93243ae8a8e1598c5568f25
              name: 'User "{#NEXTCLOUD.USER}": Quota free space'
              type: DEPENDENT
              key: 'nextcloud.user.quota.free[{#NEXTCLOUD.USER}]'
              value_type: FLOAT
              units: B
              description: 'The size of the free available space in the user''s storage.'
              valuemap:
                name: 'Quota type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.quota.free
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: storage
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
            - uuid: 3764a92e1b8b40a29da63202d435f648
              name: 'User "{#NEXTCLOUD.USER}": Quota used space, in %'
              type: DEPENDENT
              key: 'nextcloud.user.quota.pused[{#NEXTCLOUD.USER}]'
              value_type: FLOAT
              units: '%'
              description: 'Usage of the allocated storage space, in percent.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.quota.relative
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: storage
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
              trigger_prototypes:
                - uuid: e39849b5b7394bd88002441afa27907c
                  expression: 'min(/Nextcloud by HTTP/nextcloud.user.quota.pused[{#NEXTCLOUD.USER}],5m) > {$NEXTCLOUD.USER.QUOTA.PUSED.MAX:"{#NEXTCLOUD.USER}"}'
                  name: 'Nextcloud: User "{#NEXTCLOUD.USER}": High quota utilization'
                  event_name: 'Nextcloud: User "{#NEXTCLOUD.USER}" High quota utilization (>{$NEXTCLOUD.USER.QUOTA.PUSED.MAX:"{#NEXTCLOUD.USER}"}% for 5m)'
                  priority: WARNING
                  description: 'More than {$NEXTCLOUD.USER.QUOTA.PUSED.MAX:"{#NEXTCLOUD.USER}"} percent of the allocated storage space has been used.'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: 1d939132880f43438fcf84c46540e1cb
              name: 'User "{#NEXTCLOUD.USER}": Quota total space'
              type: DEPENDENT
              key: 'nextcloud.user.quota.total[{#NEXTCLOUD.USER}]'
              value_type: FLOAT
              units: B
              description: 'The size of space available in the user''s storage.'
              valuemap:
                name: 'Quota type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.quota.total
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: storage
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
            - uuid: f0ff887fde504a1f86c0d6c8c4fb1285
              name: 'User "{#NEXTCLOUD.USER}": Quota used space'
              type: DEPENDENT
              key: 'nextcloud.user.quota.used[{#NEXTCLOUD.USER}]'
              units: B
              description: 'The size of the used available space in the user storage.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.quota.used
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: storage
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
            - uuid: ac6ec7674e544151a4c5457d203d1e90
              name: 'User "{#NEXTCLOUD.USER}": Quota'
              type: DEPENDENT
              key: 'nextcloud.user.quota[{#NEXTCLOUD.USER}]'
              value_type: FLOAT
              units: B
              description: 'The size of space available in the user''s storage.'
              valuemap:
                name: 'Quota type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.quota.quota
                  error_handler: DISCARD_VALUE
                - type: STR_REPLACE
                  parameters:
                    - none
                    - '-99'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: storage
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
            - uuid: a1841e2a74dc4238842d1ec6643000ae
              name: 'User "{#NEXTCLOUD.USER}": Storage location'
              type: DEPENDENT
              key: 'nextcloud.user.storageLocation[{#NEXTCLOUD.USER}]'
              value_type: CHAR
              description: 'The location of the user''s store.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ocs.data.storageLocation
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nextcloud.user.get_data[{#NEXTCLOUD.USER}]'
              tags:
                - tag: component
                  value: environment
                - tag: user
                  value: '{#NEXTCLOUD.USER}'
          graph_prototypes:
            - uuid: 54e9ed6ca0e44cbb9c7d309e5bc9aa1b
              name: 'Nextcloud: User "{#NEXTCLOUD.USER}": Quota'
              type: PIE
              show_3d: 'YES'
              graph_items:
                - color: 81C784
                  item:
                    host: 'Nextcloud by HTTP'
                    key: 'nextcloud.user.quota.free[{#NEXTCLOUD.USER}]'
                - sortorder: '1'
                  color: FF5722
                  item:
                    host: 'Nextcloud by HTTP'
                    key: 'nextcloud.user.quota.used[{#NEXTCLOUD.USER}]'
            - uuid: 298d3eca259c47b28c03e25b007128fb
              name: 'Nextcloud: User "{#NEXTCLOUD.USER}": Quota, history'
              type: STACKED
              graph_items:
                - color: 81C784
                  item:
                    host: 'Nextcloud by HTTP'
                    key: 'nextcloud.user.quota.free[{#NEXTCLOUD.USER}]'
                - sortorder: '1'
                  color: FF5722
                  item:
                    host: 'Nextcloud by HTTP'
                    key: 'nextcloud.user.quota.used[{#NEXTCLOUD.USER}]'
          timeout: 10s
          url: '{$NEXTCLOUD.SCHEMA}://{$NEXTCLOUD.ADDRESS}/ocs/v1.php/cloud/users?format=json'
          http_proxy: '{$NEXTCLOUD.PROXY}'
          headers:
            - name: OCS-APIRequest
              value: 'true'
          lld_macro_paths:
            - lld_macro: '{#NEXTCLOUD.USER}'
              path: $.user_name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ocs.data.users
              error_handler: CUSTOM_VALUE
              error_handler_params: '[]'
            - type: JAVASCRIPT
              parameters:
                - 'return JSON.stringify(JSON.parse(value).map(function(user) {return {user_name: user}}));'
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: fileshare
        - tag: target
          value: nextcloud
      macros:
        - macro: '{$NEXTCLOUD.ADDRESS}'
          value: 127.0.0.1
          description: 'IP or DNS name of Nextcloud server.'
          config:
            type: TEXT
            priority: '4'
            label: Address
            description: 'IP or DNS name of Nextcloud server.'
            required: 'YES'
        - macro: '{$NEXTCLOUD.CPU.LOAD.MAX}'
          value: '95'
          description: 'CPU load threshold (the number of processes in the system run queue).'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'CPU load threshold'
            description: 'CPU load threshold (the number of processes in the system run queue). In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NEXTCLOUD.LLD.FILTER.USER.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable users by name.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Users filter (include)'
            description: 'Filter of discoverable users by name.'
        - macro: '{$NEXTCLOUD.LLD.FILTER.USER.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered users by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Users filter (exclude)'
            description: 'Filter to exclude discovered users by name.'
        - macro: '{$NEXTCLOUD.MEM.PUSED.MAX}'
          value: '90'
          description: 'Memory utilization threshold.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Memory utilization threshold'
            description: 'Memory utilization threshold. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NEXTCLOUD.PHP.MEM.PUSED.MAX}'
          value: '90'
          description: 'PHP memory utilization threshold.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'PHP memory utilization threshold'
            description: 'PHP memory utilization threshold. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NEXTCLOUD.PROXY}'
          description: 'Proxy HTTP(S) address.'
          config:
            type: TEXT
            priority: '14'
            section_name: Other
            label: Proxy
            description: 'Proxy HTTP(S) address.'
        - macro: '{$NEXTCLOUD.SCHEMA}'
          value: https
          description: 'HTTP or HTTPS protocol of Nextcloud.'
          config:
            type: LIST
            priority: '1'
            label: Schema
            description: 'HTTP or HTTPS protocol of Nextcloud.'
            required: 'YES'
            options:
              - value: http
                text: http
              - value: https
                text: https
        - macro: '{$NEXTCLOUD.STORAGE.FREE.MIN}'
          value: 1G
          description: 'Free space threshold.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Free space threshold'
            description: 'Free space threshold.'
        - macro: '{$NEXTCLOUD.SWAP.PUSED.MAX}'
          value: '90'
          description: 'Swap utilization threshold.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Swap utilization threshold'
            description: 'Swap utilization threshold. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NEXTCLOUD.USER.MAX.INACTIVE}'
          value: '30'
          description: 'How many days a user can be inactive.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'User inactivity days limit'
            description: 'How many days a user can be inactive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NEXTCLOUD.USER.NAME}'
          value: root
          description: 'Nextcloud username.'
          config:
            type: TEXT
            priority: '2'
            label: Username
            description: 'Nextcloud username.'
            required: 'YES'
        - macro: '{$NEXTCLOUD.USER.PASSWORD}'
          type: SECRET_TEXT
          description: 'Nextcloud user password.'
          config:
            type: TEXT
            priority: '3'
            label: Password
            description: 'Nextcloud user password.'
            required: 'YES'
        - macro: '{$NEXTCLOUD.USER.QUOTA.PUSED.MAX}'
          value: '90'
          description: 'Storage utilization threshold.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Storage utilization threshold'
            description: 'Storage utilization threshold. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 580aef505caa41619a3296dda70b6512
          name: Nextcloud
          pages:
            - name: 'Nextcloud: Overview'
              widgets:
                - type: item
                  name: 'Nextcloud: Version'
                  width: '6'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Nextcloud by HTTP'
                        key: nextcloud.serverinfo.version
                    - type: INTEGER
                      name: show.0
                      value: '4'
                    - type: INTEGER
                      name: show.1
                      value: '3'
                    - type: INTEGER
                      name: show.2
                      value: '2'
                - type: graph
                  name: 'Nextcloud: Active users'
                  'y': '2'
                  width: '72'
                  height: '6'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Nextcloud by HTTP'
                        name: 'Nextcloud: Active users'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  name: 'Nextcloud: CPU load'
                  'y': '8'
                  width: '72'
                  height: '6'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Nextcloud by HTTP'
                        name: 'Nextcloud: CPU load'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  name: 'Nextcloud: Database size'
                  'y': '14'
                  width: '72'
                  height: '6'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Nextcloud by HTTP'
                        name: 'Nextcloud: Database: size'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  name: 'Nextcloud: Memory utilization'
                  'y': '20'
                  width: '72'
                  height: '6'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Nextcloud by HTTP'
                        name: 'Nextcloud: Memory utilization'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: item
                  name: 'Nextcloud: Web server'
                  x: '6'
                  width: '18'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Nextcloud by HTTP'
                        key: nextcloud.serverinfo.apps.webserver
                    - type: INTEGER
                      name: show.0
                      value: '4'
                    - type: INTEGER
                      name: show.1
                      value: '3'
                    - type: INTEGER
                      name: show.2
                      value: '2'
                - type: item
                  name: 'Nextcloud: Free space'
                  x: '24'
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Nextcloud by HTTP'
                        key: nextcloud.serverinfo.freespace
                    - type: INTEGER
                      name: show.0
                      value: '4'
                    - type: INTEGER
                      name: show.1
                      value: '3'
                    - type: INTEGER
                      name: show.2
                      value: '2'
                - type: item
                  name: 'Nextcloud: Database'
                  x: '36'
                  width: '36'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Nextcloud by HTTP'
                        key: nextcloud.serverinfo.db.version
                    - type: INTEGER
                      name: show.0
                      value: '4'
                    - type: INTEGER
                      name: show.1
                      value: '3'
                    - type: INTEGER
                      name: show.2
                      value: '2'
            - name: 'Nextcloud: Users'
              widgets:
                - type: graphprototype
                  name: 'Nextcloud: User quota usage'
                  width: '72'
                  height: '24'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Nextcloud by HTTP'
                        name: 'Nextcloud: User "{#NEXTCLOUD.USER}": Quota, history'
                    - type: STRING
                      name: reference
                      value: AAAAE
                    - type: INTEGER
                      name: rows
                      value: '4'
      valuemaps:
        - uuid: b0913f72fb804d5ab9ef0e9ce13dc61a
          name: Boolean
          mappings:
            - value: '0'
              newvalue: 'False'
            - value: '1'
              newvalue: 'True'
        - uuid: 19c5ab8f192d42f4bd35a969bef3c9d6
          name: 'Last activity'
          mappings:
            - value: '0'
              newvalue: Today
            - value: '1'
              newvalue: Yesterday
            - value: '-1'
              newvalue: Never
            - type: IN_RANGE
              value: 2-7
              newvalue: 'This week'
        - uuid: 18f5c94273b24b88a96bdf9d01b8d63b
          name: 'Quota type'
          mappings:
            - value: '-3'
              newvalue: Unlimited
            - value: '-99'
              newvalue: Unknown
        - uuid: 3265bb49d935495abbcf8b24fbe8ed91
          name: 'User status'
          mappings:
            - value: '0'
              newvalue: Disabled
            - value: '1'
              newvalue: Enabled
    - uuid: b8a6f34fd5c447b1b9310746a96f4e80
      template: 'ZYXEL ES3500-8PD by SNMP'
      name: 'ZYXEL ES3500-8PD by SNMP'
      description: |
        ZYXEL ES3500-8PD
        
        MIBs used:
        RFC1213-MIB
        HOST-RESOURCES-MIB
        ZYXEL-ES3500-8PD-MIB
        IF-MIB
        
        Known Issues:
        
          Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
          Version: all versions firmware
          Device: ZYXEL ES3500-8PD
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/422668-discussion-thread-for-official-zabbix-templates-for-zyxel
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        https://service-provider.zyxel.com/emea/en/products/carrier-and-access-switches/access-switches/mes3500-series
        
        ### Known Issues
        
        Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
        Version: all versions firmware
        Device: ZYXEL ES3500-8PD
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 294a49fc36e848cc9f9959624c9a5ab3
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          valuemap:
            name: 'SNMP available'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 3bbbd93c114f4bf5b8f4788ca6825afd
              expression: 'max(/ZYXEL ES3500-8PD by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'ZYXEL: No SNMP data collection'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'SNMP is not available for polling. Please check device connectivity and SNMP settings.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 6d513a036f8547219b1120fc4fffff1d
          name: Contact
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: zyxel.3500_8pd.contact
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The textual identification of the contact person
            for this managed node, together with information
            on how to contact this person.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: e7fd0f225802477aabbbcbfe5ac4a7f6
          name: 'CPU utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.12.7.0]'
          key: zyxel.3500_8pd.cpuusage
          value_type: FLOAT
          units: '%'
          description: |
            MIB: ZYXEL-ES3500-8PD-MIB
            Show device CPU load in %, it's the snapshot of CPU load when
            getting the values.
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 3cf67f911a854d2ebeb9e006f3f97738
              expression: 'min(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.cpuusage,5m)>{$CPU.UTIL.CRIT}'
              name: 'ZYXEL: High CPU utilization'
              event_name: 'ZYXEL: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 8749f59cbfeb4c43b7753901f3219716
          name: 'ZyNOS F/W Version'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMP.ARRAY},1.3.6.1.4.1.890.1.5.8.72.1]'
          key: zyxel.3500_8pd.fwversion
          delay: 1h
          value_type: CHAR
          description: 'MIB: ZYXEL-ES3500-8PD-MIB'
          inventory_link: SOFTWARE_FULL
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var tmpObj = {};
                  inArray.forEach(function(item, i, arr) {
                    tmpObj[item["{#SNMPINDEX}"]] = item["{#SNMP.ARRAY}"]
                  });
                  var strOut = 'V' + tmpObj["1.0"] + '.' + tmpObj["2.0"]
                    + '(' + tmpObj["3.0"] + '.' + tmpObj["4.0"] + ')_'
                    + tmpObj["7.0"] + '.' + tmpObj["6.0"] + '.' + tmpObj["5.0"];
                  return strOut;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: bd6d0fe201094c00b6c93d7c04c27729
              expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.fwversion,#1)<>last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.fwversion,#2) and length(last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.fwversion))>0'
              name: 'ZYXEL: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'Firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: ef45d91672ea43c3aa24cbc21f37d391
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: zyxel.3500_8pd.hw.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized.
            Note that this is different from sysUpTime in the SNMPv2-MIB
            [RFC1907] because sysUpTime is the uptime of the
            network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: cbccb45e9d1d4b529cce2d43e6c96a24
          name: Location
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: zyxel.3500_8pd.location
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The physical location of this node (e.g.,
            `telephone closet, 3rd floor').
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 1479a543105a4cf2b524bf8d042afd00
          name: 'MAC address'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.2.2.1.6.1]'
          key: zyxel.3500_8pd.mac
          delay: 1h
          value_type: CHAR
          description: |
            MIB: IF-MIB
            The interface's address at the protocol layer
            immediately `below' the network layer in the
            protocol stack.  For interfaces which do not have
            such an address (e.g., a serial line), this object
            should contain an octet string of zero length.
          inventory_link: MACADDRESS_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: c753caf7686e49968931df18076a5d4f
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: zyxel.3500_8pd.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            A textual description of the entity.  This value
            should include the full name and version
            identification of the system's hardware type,
            software operating-system, and networking
            software.  It is mandatory that this only contain
            printable ASCII characters.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: e03ca45643354a18a9d6ffbb38a07654
              expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.model)<>"ES3500-8PD"'
              name: 'ZYXEL: Template does not match hardware'
              priority: INFO
              description: 'This template is for Zyxel ES3500-8PD, but connected to {ITEM.VALUE}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 2072ac4b4437425a9ef1496b90c64990
          name: 'Host name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: zyxel.3500_8pd.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            An administratively-assigned name for this
            managed node.  By convention, this is the node's
            fully-qualified domain name.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: bbd24719955740e0acc2316a945dac38
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: zyxel.3500_8pd.net.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: RFC1213-MIB
            The time (in hundredths of a second) since the
            network management portion of the system was last
            re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 93a3b8ef959e41fe822abb959f090939
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.1.10.0]'
          key: zyxel.3500_8pd.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ZYXEL-ES3500-8PD-MIB
            Serial number
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 83548aba74c148e28e6611d5abfb9694
              expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.serialnumber,#1)<>last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.serialnumber,#2) and length(last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.serialnumber))>0'
              name: 'ZYXEL: Device has been replaced'
              event_name: 'ZYXEL: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'Device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: dfc515bfe86642e784735637bdb6c0a7
          name: 'Memory pool discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.MEMORY.NAME},1.3.6.1.4.1.890.1.5.8.72.124.1.1.2]'
          key: zyxel.3500_8pd.memory.discovery
          delay: 1h
          item_prototypes:
            - uuid: ae5a9303d10a49fba04064bb77b40b61
              name: 'Memory "{#ZYXEL.MEMORY.NAME}" utilization'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.124.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.memory[{#SNMPINDEX}]'
              units: '%'
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                Utilization of memory pool in %.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
              trigger_prototypes:
                - uuid: c59c3730eea44cf7a842fe46aa12fa3d
                  expression: 'min(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.memory[{#SNMPINDEX}],5m)>{$MEMORY.UTIL.MAX}'
                  name: 'ZYXEL: High memory utilization in "{#ZYXEL.MEMORY.NAME}" pool'
                  event_name: 'ZYXEL: High memory utilization in "{#ZYXEL.MEMORY.NAME}" pool (>{$MEMORY.UTIL.MAX}% for 5m)'
                  priority: AVERAGE
                  description: 'The system is running out of free memory.'
                  tags:
                    - tag: scope
                      value: performance
        - uuid: c71d57f8ed0b470faae1bfd7033fbcf0
          name: 'Interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.IF.NAME},1.3.6.1.4.1.890.1.5.8.72.24.1.1.3,{#ZYXEL.IF.LINKUPTYPE},1.3.6.1.4.1.890.1.5.8.72.24.1.1.5]'
          key: zyxel.3500_8pd.net.if.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 91a0a38a0f60464cb97c65f375e8fbb7
              name: 'Port {#SNMPINDEX}: Administrative status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.adminstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The desired state of the interface.  The
                testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL ES3500-8PD port admin status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 1daef38185b14a96b8f0fce757c48677
              name: 'Port {#SNMPINDEX}: Interface name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.descr[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: IF-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 4de0488610054ed9bd869dc48a07174e
              name: 'Port {#SNMPINDEX}: Link speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.highspeed[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in bits per second
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 55cf0d86b8bc4a6fa6806c9f8bce7ee9
              name: 'Port {#SNMPINDEX}: Incoming broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.9.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.in.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a broadcast
                address at this sub-layer.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 0ce5c7ae49284615a41aba4cdd0f565b
              name: 'Port {#SNMPINDEX}: Incoming multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.in.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a multicast
                address at this sub-layer.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 34a86d17de7e4725aa6e5893c1e52526
              name: 'Port {#SNMPINDEX}: Incoming traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.in.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface,
                including framing characters.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b1c630d6f06748b88d695dfdb734cd19
              name: 'Port {#SNMPINDEX}: Incoming unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.in.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were not addressed to a multicast
                or broadcast address at this sub-layer
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: f24ad30d48ca427eb3b19d4459cab733
              name: 'Port {#SNMPINDEX}: Incoming utilization'
              type: CALCULATED
              key: 'zyxel.3500_8pd.net.if.in.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3500_8pd.net.if.in.traffic[{#SNMPINDEX}]) * (last(//zyxel.3500_8pd.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3500_8pd.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3500_8pd.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 8c141ab269eb4a8891937a1847312890
              name: 'Port {#SNMPINDEX}: Link type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.24.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.link_type[{#SNMPINDEX}]'
              description: |
                MIB:  ZYXEL-ES3500-8PD-MIB
                Physical connection type
              valuemap:
                name: 'ZYXEL ES3500-8PD operational mode port link up type'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 018c1028b7904fbea8b1bb0d2fac1621
              name: 'Port {#SNMPINDEX}: Interface description'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.24.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.name[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB:  ZYXEL-ES3500-8PD-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 4f75b84c02b4496db2cbedca8df00c04
              name: 'Port {#SNMPINDEX}: Operational status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.operstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                The testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL ES3500-8PD port operational status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 27ba4832c79d447186ae6de254aad9d7
                  expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.net.if.operstatus[{#SNMPINDEX}])=2 and last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.net.if.operstatus[{#SNMPINDEX}],#1)<>last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.net.if.operstatus[{#SNMPINDEX}],#2)'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.net.if.operstatus[{#SNMPINDEX}])<>2'
                  name: 'ZYXEL: Port {#SNMPINDEX}: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$IFCONTROL:"{#IFNAME}"}=1` - a user can redefine context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, do not fire for the 'eternal off' interfaces.)
                    
                    WARNING: if closed manually - it will not fire again on the next poll, because of .diff.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: bb4c00143a4f4cc2b445daeffdcf6b57
              name: 'Port {#SNMPINDEX}: Outgoing broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.13.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.out.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                broadcast address at this sub-layer, including those that
                were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 103385b00f6442beab10712ca42d5719
              name: 'Port {#SNMPINDEX}: Outgoing multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.12.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.out.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                multicast address at this sub-layer, including those that
                were discarded or not sent.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 08cd8a42816040d582d3192a9d8c2fb7
              name: 'Port {#SNMPINDEX}: Outgoing traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.out.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the
                interface, including framing characters.  This object is a
                64-bit version of ifOutOctets.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: df030eba0fd548d5be224e2fe120373c
              name: 'Port {#SNMPINDEX}: Outgoing unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.11.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.out.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were not addressed to a
                multicast or broadcast address at this sub-layer, including
                those that were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: cabb6da9aa3e4ae0ae6938b3f3d47138
              name: 'Port {#SNMPINDEX}: Outgoing utilization'
              type: CALCULATED
              key: 'zyxel.3500_8pd.net.if.out.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3500_8pd.net.if.out.traffic[{#SNMPINDEX}]) * (last(//zyxel.3500_8pd.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3500_8pd.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3500_8pd.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 5200e032f5f6438e8326799208072845
              name: 'Port {#SNMPINDEX}: Speed Duplex'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.24.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.net.if.speed_duplex[{#SNMPINDEX}]'
              description: |
                MIB:  ZYXEL-ES3500-8PD-MIB
                Transmission mode
              valuemap:
                name: 'ZYXEL ES3500-8PD operational mode port speed duplex'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
          graph_prototypes:
            - uuid: a4b7fd4158464655a71732de5ebc9a9d
              name: 'ZYXEL ES3500-8PD: Port {#SNMPINDEX}: Packets traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.in.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.out.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.in.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.out.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.in.broadcastpkts[{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.out.broadcastpkts[{#SNMPINDEX}]'
            - uuid: 4e20dd0297a94188a6e4032df91432dc
              name: 'ZYXEL ES3500-8PD: Port {#SNMPINDEX}: Traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.in.traffic[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.out.traffic[{#SNMPINDEX}]'
            - uuid: c57f41ad6c084a358668e4d7a57b902e
              name: 'ZYXEL ES3500-8PD: Port {#SNMPINDEX}: Utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.out.util[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.net.if.in.util[{#SNMPINDEX}]'
          overrides:
            - name: 'Don''t create triggers for matching interface'
              step: '1'
              filter:
                conditions:
                  - macro: '{#ZYXEL.IF.NAME}'
                    value: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: '.*'
                  discover: NO_DISCOVER
        - uuid: 21d6664eb56c41b388b4f4709a81d33d
          name: 'SFP with DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.WARN.MAX},1.3.6.1.4.1.890.1.5.8.72.117.2.1.5,{#ZYXEL.SFP.WARN.MIN},1.3.6.1.4.1.890.1.5.8.72.117.2.1.6,{#ZYXEL.SFP.DESCRIPTION},1.3.6.1.4.1.890.1.5.8.72.117.2.1.8]'
          key: zyxel.3500_8pd.sfp.ddm.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP DDM module discovery.'
          item_prototypes:
            - uuid: 3a93aa9a9e2e44318f08c3eff86ce7bb
              name: 'SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.117.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.sfp.ddm[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: FLOAT
              units: '!{#ZYXEL.SFP.UNIT}'
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                Transceiver module DDM data ({#ZYXEL.SFP.DESCRIPTION}).
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 8ce109a9f09b41458a4e9d8698238ad0
                  expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.sfp.ddm[{#SNMPINDEX}]) > {#ZYXEL.SFP.WARN.MAX}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION} (over {#ZYXEL.SFP.WARN.MAX}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The upper threshold value of the parameter is exceeded'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 6ecef48a1fdd4e16afe9472f59e0ad1a
                  expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.sfp.ddm[{#SNMPINDEX}]) < {#ZYXEL.SFP.WARN.MIN}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION} (less than {#ZYXEL.SFP.WARN.MIN}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The parameter values are less than the lower threshold'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: c114cc7fee5c4c8fa3301db0eb3b60f7
              name: 'ZYXEL ES3500-8PD: SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.sfp.ddm[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {
                  	'Temperature': '°C',
                  	'Voltage': 'V',
                  	'TxBias': 'mA',
                  	'TxPower': 'dbm',
                  	'RxPower': 'dbm'
                  };
                  var outArr = [];
                  inArray.forEach(function (item, i, arr) {
                  	item['{#ZYXEL.SFP.PORT}'] = item['{#SNMPINDEX}'].split('.')[0];
                  	item['{#ZYXEL.SFP.UNIT}'] = nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']] === undefined ? "" : nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']];
                  	item['{#ZYXEL.SFP.WARN.MAX}'] /= 100;
                  	item['{#ZYXEL.SFP.WARN.MIN}'] /= 100;
                  	outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: a003b7fdc07b4ac6a063379b892943fa
          name: 'SFP without DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.STATUS},1.3.6.1.4.1.890.1.5.8.72.117.1.1.2]'
          key: zyxel.3500_8pd.sfp.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP module discovery.'
          item_prototypes:
            - uuid: 12345032490f4d24aeb7bfb07eae59fb
              name: 'SFP {#SNMPINDEX}: Date code'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.117.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.sfp.datecode[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                Transceiver module vendor's manufacturing date code.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 2b30a4497cbd497886c52ae79ad03a01
              name: 'SFP {#SNMPINDEX}: Part number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.117.1.1.4.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.sfp.part[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                Part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 25aa375ed4a345e6b975bcb238cf530d
              name: 'SFP {#SNMPINDEX}: Revision'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.117.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.sfp.revision[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                Revision level for part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 3f24d3aa58624ed0ad7a137fc9b1611a
              name: 'SFP {#SNMPINDEX}: Serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.117.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.sfp.serialnumber[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                Serial number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 46739144d51b441886d544829749cf21
                  expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.sfp.serialnumber[{#SNMPINDEX}],#1)<>last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.sfp.serialnumber[{#SNMPINDEX}],#2) and length(last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.sfp.serialnumber[{#SNMPINDEX}]))>0'
                  name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced'
                  event_name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced (new serial number received)'
                  priority: INFO
                  description: 'SFP {#SNMPINDEX} serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 054942c20bca4459b26e41aca8657e4c
              name: 'SFP {#SNMPINDEX}: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.117.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.sfp.status[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                Transceiver module status.
              valuemap:
                name: 'ZYXEL ES3500-8PD SFP status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 7621973ef61b47c9bc034eec3d008957
              name: 'SFP {#SNMPINDEX}: Transceiver'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.117.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.sfp.transceiver[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                Transceiver module type names.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 715feecd140b4e9ca350b41490f7c7f9
              name: 'SFP {#SNMPINDEX}: Vendor'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.117.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.sfp.vendor[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                Transceiver module vendor name.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
        - uuid: 9c8f5212222a42bcbd42f8d848476804
          name: 'Temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.TEMP.THRESH.HIGH},1.3.6.1.4.1.890.1.5.8.72.9.2.1.5]'
          key: zyxel.3500_8pd.temp.discovery
          delay: 1h
          description: |
            An entry in tempTable.
            Index of temperature unit. 1:MAC, 2:CPU, 3:PHY
          item_prototypes:
            - uuid: f884edb984ab42ce8abffed0f66a2347
              name: 'Temperature "{#ZYXEL.TEMP.ID}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.9.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.temp[{#SNMPINDEX}]'
              units: '!°C'
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                The current temperature measured at this sensor
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 51fad2cd7daf49ad9027f44fd9ea81af
                  expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.temp[{#SNMPINDEX}])>{#ZYXEL.TEMP.THRESH.HIGH}'
                  name: 'ZYXEL: Temperature {#ZYXEL.TEMP.ID} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the temperature'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: a1931b48befb4c76a4d5a7ff6c15cbaf
              name: 'ZYXEL ES3500-8PD: Temperature "{#ZYXEL.TEMP.ID}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.temp[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {"1":"MAC", "2":"CPU", "3":"PHY"};
                  var outArr = [];
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.TEMP.ID}"] = nameMap[item["{#SNMPINDEX}"]]
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: 5cd3ac86665c459cbbee3178fca6560f
          name: 'Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.VOLT.THRESH.LOW},1.3.6.1.4.1.890.1.5.8.72.9.3.1.6,{#ZYXEL.VOLT.NOMINAL},1.3.6.1.4.1.890.1.5.8.72.9.3.1.5]'
          key: zyxel.3500_8pd.volt.discovery
          delay: 1h
          description: 'An entry in voltageTable.'
          item_prototypes:
            - uuid: 01838a79d7304d838798bd2d6b427936
              name: 'Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.72.9.3.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_8pd.volt[{#SNMPINDEX}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: ZYXEL-ES3500-8PD-MIB
                The current voltage reading.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
              trigger_prototypes:
                - uuid: 2cce1a60cfea4bb89e1b9582f6045d3c
                  expression: 'last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.volt[{#SNMPINDEX}])<{#ZYXEL.VOLT.THRESH.LOW}'
                  name: 'ZYXEL: Voltage {#ZYXEL.VOLT.NOMINAL} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the power supply'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 94ee588ae558416da5bcf4c199797d93
              name: 'ZYXEL ES3500-8PD: Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL ES3500-8PD by SNMP'
                    key: 'zyxel.3500_8pd.volt[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var outArr = []
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.VOLT.NOMINAL}"] = "+" + item["{#ZYXEL.VOLT.NOMINAL}"] / 1000 + "V";
                  item["{#ZYXEL.VOLT.THRESH.LOW}"] = item["{#ZYXEL.VOLT.THRESH.LOW}"] / 1000;
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
      tags:
        - tag: class
          value: network
        - tag: target
          value: es3500-8pd
        - tag: target
          value: switch
        - tag: target
          value: zyxel
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMORY.UTIL.MAX}'
          value: '90'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Threshold for memory utilization'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '2'
            section_name: Other
            label: 'Time interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
          config:
            type: TEXT
            priority: '1'
            section_name: Filters
            label: 'Filter for interface control (include)'
            description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable link types.
            0 - Down link
            1 - Cooper link
            2 - Fiber link
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Filter for interface link-up type (include)'
            description: |
              Filter of discoverable link types.
              0 - Down link
              1 - Cooper link
              2 - Fiber link
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by link types.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Filter for interface link-up type (exclude)'
            description: 'Filter to exclude discovered by link types.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable interface names.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for interface name (include)'
            description: 'Filter by discoverable interface names.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered interfaces by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Filter for interface name (exclude)'
            description: 'Filter to exclude discovered interfaces by name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable status.
            0 - OK with DDM
            1 - OK without DDM
            2 - nonoperational
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Filter for SFP status (include)'
            description: |
              Filter of discoverable status.
              0 - OK with DDM
              1 - OK without DDM
              2 - nonoperational
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by status.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Filter for SFP status (exclude)'
            description: 'Filter to exclude discovered by status.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable SFP modules name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Filter for SFP DDM description (include)'
            description: 'Filter by discoverable SFP modules name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
          value: N/A
          description: 'Filter to exclude discovered SFP modules by name.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Filter for SFP DDM description (exclude)'
            description: 'Filter to exclude discovered SFP modules by name.'
        - macro: '{$ZYXEL.LLD.SFP.UPDATE}'
          value: 10m
          description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'SFP data update interval'
            description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
      dashboards:
        - uuid: db61810d6deb4c68a9f3c83bdbca6f7a
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'ZYXEL ES3500-8PD by SNMP'
                        name: 'ZYXEL ES3500-8PD: Port {#SNMPINDEX}: Traffic'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
      valuemaps:
        - uuid: 494c8983c4cf453789d2f0bbbe5cbbf3
          name: 'SNMP available'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: 7cfe02e1eb224f6abe5216aaec31402c
          name: 'ZYXEL ES3500-8PD operational mode port link up type'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Cooper
            - value: '2'
              newvalue: Fiber
        - uuid: b568c9f69a1a4dd5951f1121523475c9
          name: 'ZYXEL ES3500-8PD operational mode port speed duplex'
          mappings:
            - value: '0'
              newvalue: auto
            - value: '1'
              newvalue: '10M half'
            - value: '2'
              newvalue: '10M full'
            - value: '3'
              newvalue: '100M half'
            - value: '4'
              newvalue: '100M full'
            - value: '5'
              newvalue: '1G full'
        - uuid: 4a20dd55c16b4c9082f267c532a4507a
          name: 'ZYXEL ES3500-8PD port admin status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
        - uuid: 17635045a1ee4b8bba21b7d44634c57f
          name: 'ZYXEL ES3500-8PD port operational status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
            - value: '4'
              newvalue: Unknown
            - value: '5'
              newvalue: Dormant
            - value: '6'
              newvalue: NotPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: 875833a6ca71431da2b3747c4c1e3008
          name: 'ZYXEL ES3500-8PD SFP status'
          mappings:
            - value: '1'
              newvalue: 'OK with DDM'
            - value: '2'
              newvalue: 'OK without DDM'
            - value: '3'
              newvalue: nonoperational
    - uuid: 21a95afef0e74fb19691693090403d1d
      template: 'ZYXEL MES3500-10 by SNMP'
      name: 'ZYXEL MES3500-10 by SNMP'
      description: |
        ZYXEL MES3500-10
        
        MIBs used:
        RFC1213-MIB
        HOST-RESOURCES-MIB
        ZYXEL-MES3500-10-MIB
        IF-MIB
        
        Known Issues:
        
          Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
          Version: all versions firmware
          Device: ZYXEL MES3500-10
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/422668-discussion-thread-for-official-zabbix-templates-for-zyxel
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        https://service-provider.zyxel.com/emea/en/products/carrier-and-access-switches/access-switches/mes3500-series
        
        ### Known Issues
        
        Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
        Version: all versions firmware
        Device: ZYXEL MES3500-10
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 1ec18d9656654a9e9114ba2b5ff965b1
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          valuemap:
            name: 'SNMP available'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: c33a4bffd5464934b4b9f1e7160806e1
              expression: 'max(/ZYXEL MES3500-10 by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'ZYXEL: No SNMP data collection'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'SNMP is not available for polling. Please check device connectivity and SNMP settings.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 84a1eb118ad2453ca5a5ccca6111516b
          name: Contact
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: zyxel.3500_10.contact
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The textual identification of the contact person
            for this managed node, together with information
            on how to contact this person.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: dd6585221297476885e900c54a820ae7
          name: 'CPU utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.12.7.0]'
          key: zyxel.3500_10.cpuusage
          value_type: FLOAT
          units: '%'
          description: |
            MIB: ZYXEL-MES3500-10-MIB
            Show device CPU load in %, it's the snapshot of CPU load when
            getting the values.
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 0d31c154f8f34ed18a99558f7839bbb6
              expression: 'min(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.cpuusage,5m)>{$CPU.UTIL.CRIT}'
              name: 'ZYXEL: High CPU utilization'
              event_name: 'ZYXEL: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 144931a31b2a4a52978679a6a029fc8e
          name: 'ZyNOS F/W Version'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMP.ARRAY},1.3.6.1.4.1.890.1.5.8.80.1]'
          key: zyxel.3500_10.fwversion
          delay: 1h
          value_type: CHAR
          description: 'MIB: ZYXEL-MES3500-10-MIB'
          inventory_link: SOFTWARE_FULL
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var tmpObj = {};
                  inArray.forEach(function(item, i, arr) {
                    tmpObj[item["{#SNMPINDEX}"]] = item["{#SNMP.ARRAY}"]
                  });
                  var strOut = 'V' + tmpObj["1.0"] + '.' + tmpObj["2.0"]
                    + '(' + tmpObj["3.0"] + '.' + tmpObj["4.0"] + ')_'
                    + tmpObj["7.0"] + '.' + tmpObj["6.0"] + '.' + tmpObj["5.0"];
                  return strOut;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: db567c7693b6437e89ef7a5b78c889f9
              expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.fwversion,#1)<>last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.fwversion,#2) and length(last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.fwversion))>0'
              name: 'ZYXEL: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'Firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: d0d33209ea1249e588f2e81807ae6403
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: zyxel.3500_10.hw.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized.
            Note that this is different from sysUpTime in the SNMPv2-MIB
            [RFC1907] because sysUpTime is the uptime of the
            network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 0005f568cd384734b9f21e846648cd5f
          name: Location
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: zyxel.3500_10.location
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The physical location of this node (e.g.,
            `telephone closet, 3rd floor').
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 3bc8285eebad410996c4697022038345
          name: 'MAC address'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.2.2.1.6.1]'
          key: zyxel.3500_10.mac
          delay: 1h
          value_type: CHAR
          description: |
            MIB: IF-MIB
            The interface's address at the protocol layer
            immediately `below' the network layer in the
            protocol stack.  For interfaces which do not have
            such an address (e.g., a serial line), this object
            should contain an octet string of zero length.
          inventory_link: MACADDRESS_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: b270937507f345f88421cf1825c29917
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: zyxel.3500_10.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            A textual description of the entity.  This value
            should include the full name and version
            identification of the system's hardware type,
            software operating-system, and networking
            software.  It is mandatory that this only contain
            printable ASCII characters.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 27f1cb5a297c4b1eafd4056317a37f01
              expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.model)<>"MES3500-10"'
              name: 'ZYXEL: Template does not match hardware'
              priority: INFO
              description: 'This template is for Zyxel MES3500-10, but connected to {ITEM.VALUE}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 831783fc67ab49b1be0ae5132fb2d8df
          name: 'Host name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: zyxel.3500_10.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            An administratively-assigned name for this
            managed node.  By convention, this is the node's
            fully-qualified domain name.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: d581384242074b07a4c5cd03a562827c
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: zyxel.3500_10.net.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: RFC1213-MIB
            The time (in hundredths of a second) since the
            network management portion of the system was last
            re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: a0d17f11a5624f4e8520ee5e583ad322
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.1.10.0]'
          key: zyxel.3500_10.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ZYXEL-MES3500-10-MIB
            Serial number
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: ee14abdf61b04a90adf6e2afcc3d73f4
              expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.serialnumber,#1)<>last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.serialnumber,#2) and length(last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.serialnumber))>0'
              name: 'ZYXEL: Device has been replaced'
              event_name: 'ZYXEL: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'Device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: ae66d16a5531489580d394e040950ecb
          name: 'Memory pool discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.MEMORY.NAME},1.3.6.1.4.1.890.1.5.8.80.124.1.1.2]'
          key: zyxel.3500_10.memory.discovery
          delay: 1h
          item_prototypes:
            - uuid: 20c3127430534c049073c43a039fd29d
              name: 'Memory "{#ZYXEL.MEMORY.NAME}" utilization'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.124.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.memory[{#SNMPINDEX}]'
              units: '%'
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                Utilization of memory pool in %.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
              trigger_prototypes:
                - uuid: 91609e57df4941faa9fee17051f8ac24
                  expression: 'min(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.memory[{#SNMPINDEX}],5m)>{$MEMORY.UTIL.MAX}'
                  name: 'ZYXEL: High memory utilization in "{#ZYXEL.MEMORY.NAME}" pool'
                  event_name: 'ZYXEL: High memory utilization in "{#ZYXEL.MEMORY.NAME}" pool (>{$MEMORY.UTIL.MAX}% for 5m)'
                  priority: AVERAGE
                  description: 'The system is running out of free memory.'
                  tags:
                    - tag: scope
                      value: performance
        - uuid: b8cd74eeb2b94ceeba49157ccb617bb8
          name: 'Interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.IF.NAME},1.3.6.1.4.1.890.1.5.8.80.24.1.1.3,{#ZYXEL.IF.LINKUPTYPE},1.3.6.1.4.1.890.1.5.8.80.24.1.1.5]'
          key: zyxel.3500_10.net.if.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: d300b380e4bc44f89ac7a40083d424ed
              name: 'Port {#SNMPINDEX}: Administrative status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.adminstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The desired state of the interface.  The
                testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MES3500-10 port admin status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 5a4b1c62b5834ecea8a90b71cb7c5f2e
              name: 'Port {#SNMPINDEX}: Interface name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.descr[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: IF-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: bba418acc01d4732891c775c68bad518
              name: 'Port {#SNMPINDEX}: Link speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.highspeed[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in bits per second
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 7c6f62ebe1ec48e080c0edb36cf2304c
              name: 'Port {#SNMPINDEX}: Incoming broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.9.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.in.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a broadcast
                address at this sub-layer.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 846dfcfcdd974d1e9f8ec71f54f8933b
              name: 'Port {#SNMPINDEX}: Incoming multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.in.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a multicast
                address at this sub-layer.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b1843c913e6d4f638e43da1c92807a4f
              name: 'Port {#SNMPINDEX}: Incoming traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.in.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface,
                including framing characters.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 31e8e47755804816882d2070ecfca130
              name: 'Port {#SNMPINDEX}: Incoming unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.in.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were not addressed to a multicast
                or broadcast address at this sub-layer
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: e4963aa170554edebb356515c04aaafb
              name: 'Port {#SNMPINDEX}: Incoming utilization'
              type: CALCULATED
              key: 'zyxel.3500_10.net.if.in.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3500_10.net.if.in.traffic[{#SNMPINDEX}]) * (last(//zyxel.3500_10.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3500_10.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3500_10.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 66572368d798449baa945b3985156e07
              name: 'Port {#SNMPINDEX}: Link type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.24.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.link_type[{#SNMPINDEX}]'
              description: |
                MIB:  ZYXEL-MES3500-10-MIB
                Physical connection type
              valuemap:
                name: 'ZYXEL MES3500-10 operational mode port link up type'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 4c45f11441f4450e9f310ffb1d999a68
              name: 'Port {#SNMPINDEX}: Interface description'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.24.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.name[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB:  ZYXEL-MES3500-10-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: a2269b48020a46c193830f8cc1ef3595
              name: 'Port {#SNMPINDEX}: Operational status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.operstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                The testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MES3500-10 port operational status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: fb9bb0e2ceb643f495b93bbaf04b0cc1
                  expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.net.if.operstatus[{#SNMPINDEX}])=2 and last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.net.if.operstatus[{#SNMPINDEX}],#1)<>last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.net.if.operstatus[{#SNMPINDEX}],#2)'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.net.if.operstatus[{#SNMPINDEX}])<>2'
                  name: 'ZYXEL: Port {#SNMPINDEX}: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$IFCONTROL:"{#IFNAME}"}=1` - a user can redefine context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, do not fire for the 'eternal off' interfaces.)
                    
                    WARNING: if closed manually - it will not fire again on the next poll, because of .diff.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 521a2ac2ff0c42c282380c45bd12706f
              name: 'Port {#SNMPINDEX}: Outgoing broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.13.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.out.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                broadcast address at this sub-layer, including those that
                were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 7638a07162bd4668b086f0d07d4a6513
              name: 'Port {#SNMPINDEX}: Outgoing multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.12.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.out.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                multicast address at this sub-layer, including those that
                were discarded or not sent.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: f563a76ec9ae4f62ad1601f1d91549d2
              name: 'Port {#SNMPINDEX}: Outgoing traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.out.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the
                interface, including framing characters.  This object is a
                64-bit version of ifOutOctets.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 8888c9da5191443facfec4c865181d18
              name: 'Port {#SNMPINDEX}: Outgoing unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.11.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.out.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were not addressed to a
                multicast or broadcast address at this sub-layer, including
                those that were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: dffcc1796e8b4a3c84f9d925b3644215
              name: 'Port {#SNMPINDEX}: Outgoing utilization'
              type: CALCULATED
              key: 'zyxel.3500_10.net.if.out.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3500_10.net.if.out.traffic[{#SNMPINDEX}]) * (last(//zyxel.3500_10.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3500_10.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3500_10.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: a54d1c46a1c842b88854be651c4e4caa
              name: 'Port {#SNMPINDEX}: Speed Duplex'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.24.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.net.if.speed_duplex[{#SNMPINDEX}]'
              description: |
                MIB:  ZYXEL-MES3500-10-MIB
                Transmission mode
              valuemap:
                name: 'ZYXEL MES3500-10 operational mode port speed duplex'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
          graph_prototypes:
            - uuid: 914bb954a2ef42939825074378d001bc
              name: 'ZYXEL MES3500-10: Port {#SNMPINDEX}: Packets traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.in.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.out.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.in.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.out.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.in.broadcastpkts[{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.out.broadcastpkts[{#SNMPINDEX}]'
            - uuid: 9b6213d6ab0248bd9bfd62a5af0846a7
              name: 'ZYXEL MES3500-10: Port {#SNMPINDEX}: Traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.in.traffic[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.out.traffic[{#SNMPINDEX}]'
            - uuid: c209a6e8cdb748978b90584432f0a09e
              name: 'ZYXEL MES3500-10: Port {#SNMPINDEX}: Utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.out.util[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.net.if.in.util[{#SNMPINDEX}]'
          overrides:
            - name: 'Don''t create triggers for matching interface'
              step: '1'
              filter:
                conditions:
                  - macro: '{#ZYXEL.IF.NAME}'
                    value: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: '.*'
                  discover: NO_DISCOVER
        - uuid: 1c6952a276fa454bb83f64a11424b7ec
          name: 'SFP with DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.WARN.MAX},1.3.6.1.4.1.890.1.5.8.80.117.2.1.5,{#ZYXEL.SFP.WARN.MIN},1.3.6.1.4.1.890.1.5.8.80.117.2.1.6,{#ZYXEL.SFP.DESCRIPTION},1.3.6.1.4.1.890.1.5.8.80.117.2.1.8]'
          key: zyxel.3500_10.sfp.ddm.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP DDM module discovery.'
          item_prototypes:
            - uuid: 13ddb64324c4401da5e742a93698e2f6
              name: 'SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.117.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.sfp.ddm[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: FLOAT
              units: '!{#ZYXEL.SFP.UNIT}'
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                Transceiver module DDM data ({#ZYXEL.SFP.DESCRIPTION}).
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: bc09d6c1771d4d04afe86f49dbd98852
                  expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.sfp.ddm[{#SNMPINDEX}]) > {#ZYXEL.SFP.WARN.MAX}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION} (over {#ZYXEL.SFP.WARN.MAX}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The upper threshold value of the parameter is exceeded'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: d05ae92b624347cc9a8fe1154995f3f9
                  expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.sfp.ddm[{#SNMPINDEX}]) < {#ZYXEL.SFP.WARN.MIN}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION} (less than {#ZYXEL.SFP.WARN.MIN}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The parameter values are less than the lower threshold'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 1b5db1876c0a4acf9d45ac26a9739778
              name: 'ZYXEL MES3500-10: SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.sfp.ddm[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {
                  	'Temperature': '°C',
                  	'Voltage': 'V',
                  	'TxBias': 'mA',
                  	'TxPower': 'dbm',
                  	'RxPower': 'dbm'
                  };
                  var outArr = [];
                  inArray.forEach(function (item, i, arr) {
                  	item['{#ZYXEL.SFP.PORT}'] = item['{#SNMPINDEX}'].split('.')[0];
                  	item['{#ZYXEL.SFP.UNIT}'] = nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']] === undefined ? "" : nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']];
                  	item['{#ZYXEL.SFP.WARN.MAX}'] /= 100;
                  	item['{#ZYXEL.SFP.WARN.MIN}'] /= 100;
                  	outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: fb3dea0bae0e45b0a9ca4969a7b33843
          name: 'SFP without DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.STATUS},1.3.6.1.4.1.890.1.5.8.80.117.1.1.2]'
          key: zyxel.3500_10.sfp.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP module discovery.'
          item_prototypes:
            - uuid: aab3e0e09bc64de0a2e7322cfb4da68e
              name: 'SFP {#SNMPINDEX}: Date code'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.117.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.sfp.datecode[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                Transceiver module vendor's manufacturing date code.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 2f338f7f29464e0b88ebe7d3ec69050a
              name: 'SFP {#SNMPINDEX}: Part number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.117.1.1.4.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.sfp.part[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                Part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 53582950f20e474ba4b6f46c42bc3216
              name: 'SFP {#SNMPINDEX}: Revision'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.117.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.sfp.revision[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                Revision level for part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: cecd4ba3b9014400a2d5d5b1b98f5463
              name: 'SFP {#SNMPINDEX}: Serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.117.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.sfp.serialnumber[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                Serial number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 8832e1fa622449f582218cf5a7bf6b75
                  expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.sfp.serialnumber[{#SNMPINDEX}],#1)<>last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.sfp.serialnumber[{#SNMPINDEX}],#2) and length(last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.sfp.serialnumber[{#SNMPINDEX}]))>0'
                  name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced'
                  event_name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced (new serial number received)'
                  priority: INFO
                  description: 'SFP {#SNMPINDEX} serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: b09aad7939cb4897bff413ef956bebfe
              name: 'SFP {#SNMPINDEX}: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.117.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.sfp.status[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                Transceiver module status.
              valuemap:
                name: 'ZYXEL MES3500-10 SFP status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 3878fecf990d4cb6aba13225b2bbfa59
              name: 'SFP {#SNMPINDEX}: Transceiver'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.117.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.sfp.transceiver[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                Transceiver module type names.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 3c8dfe57cab242c2ade6139e8666e621
              name: 'SFP {#SNMPINDEX}: Vendor'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.117.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.sfp.vendor[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                Transceiver module vendor name.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
        - uuid: 39ef9d256f8847fca6077524f01270c1
          name: 'Temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.TEMP.THRESH.HIGH},1.3.6.1.4.1.890.1.5.8.80.9.2.1.5]'
          key: zyxel.3500_10.temp.discovery
          delay: 1h
          description: |
            An entry in tempTable.
            Index of temperature unit. 1:MAC, 2:CPU, 3:PHY
          item_prototypes:
            - uuid: 60f580a757814d2a9b320b6810a8f65d
              name: 'Temperature "{#ZYXEL.TEMP.ID}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.9.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.temp[{#SNMPINDEX}]'
              units: '!°C'
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                The current temperature measured at this sensor
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 6970c577993343dfaa97f4317acf0f08
                  expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.temp[{#SNMPINDEX}])>{#ZYXEL.TEMP.THRESH.HIGH}'
                  name: 'ZYXEL: Temperature {#ZYXEL.TEMP.ID} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the temperature'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 0c7b7b235f174e048bd3da37d1ed0913
              name: 'ZYXEL MES3500-10: Temperature "{#ZYXEL.TEMP.ID}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.temp[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {"1":"MAC", "2":"CPU", "3":"PHY"};
                  var outArr = [];
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.TEMP.ID}"] = nameMap[item["{#SNMPINDEX}"]]
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: c78ffbc1aa2547a2a5c387ecc68cac1f
          name: 'Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.VOLT.THRESH.LOW},1.3.6.1.4.1.890.1.5.8.80.9.3.1.6,{#ZYXEL.VOLT.NOMINAL},1.3.6.1.4.1.890.1.5.8.80.9.3.1.5]'
          key: zyxel.3500_10.volt.discovery
          delay: 1h
          description: 'An entry in voltageTable.'
          item_prototypes:
            - uuid: 2f842775bf27436ab28278754594e5b9
              name: 'Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.80.9.3.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_10.volt[{#SNMPINDEX}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: ZYXEL-MES3500-10-MIB
                The current voltage reading.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
              trigger_prototypes:
                - uuid: c86b60bc2d0842e28f0718314db4cde0
                  expression: 'last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.volt[{#SNMPINDEX}])<{#ZYXEL.VOLT.THRESH.LOW}'
                  name: 'ZYXEL: Voltage {#ZYXEL.VOLT.NOMINAL} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the power supply'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 909d64e8063647de90f9fd61375c40a9
              name: 'ZYXEL MES3500-10: Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-10 by SNMP'
                    key: 'zyxel.3500_10.volt[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var outArr = []
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.VOLT.NOMINAL}"] = "+" + item["{#ZYXEL.VOLT.NOMINAL}"] / 1000 + "V";
                  item["{#ZYXEL.VOLT.THRESH.LOW}"] = item["{#ZYXEL.VOLT.THRESH.LOW}"] / 1000;
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
      tags:
        - tag: class
          value: network
        - tag: target
          value: mes3500-10
        - tag: target
          value: switch
        - tag: target
          value: zyxel
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMORY.UTIL.MAX}'
          value: '90'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Threshold for memory utilization'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Time interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
          config:
            type: TEXT
            priority: '1'
            section_name: Filters
            label: 'Filter for interface control (include)'
            description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable link types.
            0 - Down link
            1 - Cooper link
            2 - Fiber link
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Filter for interface link-up type (include)'
            description: |
              Filter of discoverable link types.
              0 - Down link
              1 - Cooper link
              2 - Fiber link
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by link types.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Filter for interface link-up type (exclude)'
            description: 'Filter to exclude discovered by link types.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable interface names.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for interface name (include)'
            description: 'Filter by discoverable interface names.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered interfaces by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Filter for interface name (exclude)'
            description: 'Filter to exclude discovered interfaces by name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable status.
            0 - OK with DDM
            1 - OK without DDM
            2 - nonoperational
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Filter for SFP status (include)'
            description: |
              Filter of discoverable status.
              0 - OK with DDM
              1 - OK without DDM
              2 - nonoperational
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by status.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Filter for SFP status (exclude)'
            description: 'Filter to exclude discovered by status.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable SFP modules name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Filter for SFP DDM description (include)'
            description: 'Filter by discoverable SFP modules name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
          value: N/A
          description: 'Filter to exclude discovered SFP modules by name.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Filter for SFP DDM description (exclude)'
            description: 'Filter to exclude discovered SFP modules by name.'
        - macro: '{$ZYXEL.LLD.SFP.UPDATE}'
          value: 10m
          description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Update inteval'
            description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
      dashboards:
        - uuid: e448f23393064910b8f1e7197da3a539
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'ZYXEL MES3500-10 by SNMP'
                        name: 'ZYXEL MES3500-10: Port {#SNMPINDEX}: Traffic'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
      valuemaps:
        - uuid: 7ad9362759b542d98a67796dd13fc5d4
          name: 'SNMP available'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: 064efc8dae8e47ae9c14713c7b31a36c
          name: 'ZYXEL MES3500-10 operational mode port link up type'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Cooper
            - value: '2'
              newvalue: Fiber
        - uuid: 4ad7b4bf94494c93bdcbf36af095d5c3
          name: 'ZYXEL MES3500-10 operational mode port speed duplex'
          mappings:
            - value: '0'
              newvalue: auto
            - value: '1'
              newvalue: '10M half'
            - value: '2'
              newvalue: '10M full'
            - value: '3'
              newvalue: '100M half'
            - value: '4'
              newvalue: '100M full'
            - value: '5'
              newvalue: '1G full'
        - uuid: e6a8dc82d4ca4b989daafd66ef1ab2ce
          name: 'ZYXEL MES3500-10 port admin status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
        - uuid: a96f6ed4d9e34a0cb79cee8bdbd672f5
          name: 'ZYXEL MES3500-10 port operational status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
            - value: '4'
              newvalue: Unknown
            - value: '5'
              newvalue: Dormant
            - value: '6'
              newvalue: NotPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: 8e9755ff129740298ab5f5497c6c17a2
          name: 'ZYXEL MES3500-10 SFP status'
          mappings:
            - value: '1'
              newvalue: 'OK with DDM'
            - value: '2'
              newvalue: 'OK without DDM'
            - value: '3'
              newvalue: nonoperational
    - uuid: 292970ad91204722b5e5cb3233fc0026
      template: 'ZYXEL MES3500-24 by SNMP'
      name: 'ZYXEL MES3500-24 by SNMP'
      description: |
        ZYXEL MES3500-24
        
        MIBs used:
        RFC1213-MIB
        HOST-RESOURCES-MIB
        ZYXEL-MES3500-24-MIB
        IF-MIB
        
        Known Issues:
        
          Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
          Version: all versions firmware
          Device: ZYXEL MES3500-24
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/422668-discussion-thread-for-official-zabbix-templates-for-zyxel
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        https://service-provider.zyxel.com/emea/en/products/carrier-and-access-switches/access-switches/mes3500-series
        
        ### Known Issues
        
        Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
        Version: all versions firmware
        Device: ZYXEL MES3500-24
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 7d30d099448e408bb7be13881e4149ed
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          valuemap:
            name: 'SNMP available'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 96435fde17384c6bb4f9811ad9ca184a
              expression: 'max(/ZYXEL MES3500-24 by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'ZYXEL: No SNMP data collection'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'SNMP is not available for polling. Please check device connectivity and SNMP settings.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 7e1745e5130f4b7cb2b31814fecd6792
          name: Contact
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: zyxel.3500_24.contact
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The textual identification of the contact person
            for this managed node, together with information
            on how to contact this person.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 31029f8a8cc541908b8f765b27254ecd
          name: 'CPU utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.12.7.0]'
          key: zyxel.3500_24.cpuusage
          value_type: FLOAT
          units: '%'
          description: |
            MIB: ZYXEL-MES3500-24-MIB
            Show device CPU load in %, it's the snapshot of CPU load when
            getting the values.
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 911d1c7e921f43af8ab3c0035be57a27
              expression: 'min(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.cpuusage,5m)>{$CPU.UTIL.CRIT}'
              name: 'ZYXEL: High CPU utilization'
              event_name: 'ZYXEL: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 53e694b360254f2896301e78cf982650
          name: 'ZyNOS F/W Version'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMP.ARRAY},1.3.6.1.4.1.890.1.5.8.68.1]'
          key: zyxel.3500_24.fwversion
          delay: 1h
          value_type: CHAR
          description: 'MIB: ZYXEL-MES3500-24-MIB'
          inventory_link: SOFTWARE_FULL
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var tmpObj = {};
                  inArray.forEach(function(item, i, arr) {
                    tmpObj[item["{#SNMPINDEX}"]] = item["{#SNMP.ARRAY}"]
                  });
                  var strOut = 'V' + tmpObj["1.0"] + '.' + tmpObj["2.0"]
                    + '(' + tmpObj["3.0"] + '.' + tmpObj["4.0"] + ')_'
                    + tmpObj["7.0"] + '.' + tmpObj["6.0"] + '.' + tmpObj["5.0"];
                  return strOut;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: f3daea29a34b4cf992d3c23ba8a64d2e
              expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.fwversion,#1)<>last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.fwversion,#2) and length(last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.fwversion))>0'
              name: 'ZYXEL: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'Firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: fb480642cad3440a8637d871add07b8f
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: zyxel.3500_24.hw.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized.
            Note that this is different from sysUpTime in the SNMPv2-MIB
            [RFC1907] because sysUpTime is the uptime of the
            network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 5aa2128d8530415f855a0d33b7fb9c7f
          name: Location
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: zyxel.3500_24.location
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The physical location of this node (e.g.,
            `telephone closet, 3rd floor').
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: a8209492e29040a3896abf35019e6cdd
          name: 'MAC address'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.2.2.1.6.1]'
          key: zyxel.3500_24.mac
          delay: 1h
          value_type: CHAR
          description: |
            MIB: IF-MIB
            The interface's address at the protocol layer
            immediately `below' the network layer in the
            protocol stack.  For interfaces which do not have
            such an address (e.g., a serial line), this object
            should contain an octet string of zero length.
          inventory_link: MACADDRESS_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 1820c7b7d903402dab0d7c8fb251f9bc
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: zyxel.3500_24.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            A textual description of the entity.  This value
            should include the full name and version
            identification of the system's hardware type,
            software operating-system, and networking
            software.  It is mandatory that this only contain
            printable ASCII characters.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: ab363c150ecd447ea4d3a3a9c311b992
              expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.model)<>"MES3500-24"'
              name: 'ZYXEL: Template does not match hardware'
              priority: INFO
              description: 'This template is for Zyxel MES3500-24, but connected to {ITEM.VALUE}'
              tags:
                - tag: scope
                  value: notice
        - uuid: b5fc886ab5b94f929e866d4a2e9c5648
          name: 'Host name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: zyxel.3500_24.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            An administratively-assigned name for this
            managed node.  By convention, this is the node's
            fully-qualified domain name.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 00c831c6cc9d415e91319b6bec15423d
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: zyxel.3500_24.net.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: RFC1213-MIB
            The time (in hundredths of a second) since the
            network management portion of the system was last
            re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: b5243eb2c7664203acb4f5e6bc8da296
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.1.10.0]'
          key: zyxel.3500_24.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ZYXEL-MES3500-24-MIB
            Serial number
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: a475d29129664eec82fc7ed85cb74df9
              expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.serialnumber,#1)<>last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.serialnumber,#2) and length(last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.serialnumber))>0'
              name: 'ZYXEL: Device has been replaced'
              event_name: 'ZYXEL: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'Device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: 263079e9c77c4539b248a5b62b5f1b0f
          name: 'Memory pool discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.MEMORY.NAME},1.3.6.1.4.1.890.1.5.8.68.124.1.1.2]'
          key: zyxel.3500_24.memory.discovery
          delay: 1h
          item_prototypes:
            - uuid: b41542121d724e1a82e72687ecce6cf2
              name: 'Memory "{#ZYXEL.MEMORY.NAME}" utilization'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.124.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.memory[{#SNMPINDEX}]'
              units: '%'
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                Utilization of memory pool in %.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
              trigger_prototypes:
                - uuid: 66802198e0764ee29cdf557378b5566b
                  expression: 'min(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.memory[{#SNMPINDEX}],5m)>{$MEMORY.UTIL.MAX}'
                  name: 'ZYXEL: High memory utilization in "{#ZYXEL.MEMORY.NAME}" pool'
                  event_name: 'ZYXEL: High memory utilization in "{#ZYXEL.MEMORY.NAME}" pool (>{$MEMORY.UTIL.MAX}% for 5m)'
                  priority: AVERAGE
                  description: 'The system is running out of free memory.'
                  tags:
                    - tag: scope
                      value: performance
        - uuid: 0f57f2a82f764b908fbc8f4d828203c6
          name: 'Interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.IF.NAME},1.3.6.1.4.1.890.1.5.8.68.24.1.1.3,{#ZYXEL.IF.LINKUPTYPE},1.3.6.1.4.1.890.1.5.8.68.24.1.1.5]'
          key: zyxel.3500_24.net.if.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 8320028ac1ca4ef8b0dce4817281887a
              name: 'Port {#SNMPINDEX}: Administrative status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.adminstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The desired state of the interface.  The
                testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MES3500-24 port admin status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 7309a7b73c2848088c282096c334d541
              name: 'Port {#SNMPINDEX}: Interface name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.descr[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: IF-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 72efe5b4f1584d438739298561b3c8ab
              name: 'Port {#SNMPINDEX}: Link speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.highspeed[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in bits per second
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: f11f5928218a4b619b31b597895a13b2
              name: 'Port {#SNMPINDEX}: Incoming broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.9.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.in.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a broadcast
                address at this sub-layer.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 22a65221bc194c03909956179180808a
              name: 'Port {#SNMPINDEX}: Incoming multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.in.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a multicast
                address at this sub-layer.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: e759a09d0f504567bd2fc0dd9c0d8395
              name: 'Port {#SNMPINDEX}: Incoming traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.in.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface,
                including framing characters.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 16df754a1ac94c0588e1b6be5e175ed7
              name: 'Port {#SNMPINDEX}: Incoming unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.in.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were not addressed to a multicast
                or broadcast address at this sub-layer
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 5051b4a19bad47a8b546fbfb6d5ea85e
              name: 'Port {#SNMPINDEX}: Incoming utilization'
              type: CALCULATED
              key: 'zyxel.3500_24.net.if.in.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3500_24.net.if.in.traffic[{#SNMPINDEX}]) * (last(//zyxel.3500_24.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3500_24.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3500_24.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 25f6b400af8a40b29bf83ac988bc3cd8
              name: 'Port {#SNMPINDEX}: Link type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.24.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.link_type[{#SNMPINDEX}]'
              description: |
                MIB:  ZYXEL-MES3500-24-MIB
                Physical connection type
              valuemap:
                name: 'ZYXEL MES3500-24 operational mode port link up type'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 6d860666d83b4886b04bb1ff2ecb19d9
              name: 'Port {#SNMPINDEX}: Interface description'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.24.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.name[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB:  ZYXEL-MES3500-24-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: adf6ce16961240a9a7775de2e41df3d1
              name: 'Port {#SNMPINDEX}: Operational status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.operstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                The testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MES3500-24 port operational status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 5a9faa35f7d547a987e78075832cf38e
                  expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.net.if.operstatus[{#SNMPINDEX}])=2 and last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.net.if.operstatus[{#SNMPINDEX}],#1)<>last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.net.if.operstatus[{#SNMPINDEX}],#2)'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.net.if.operstatus[{#SNMPINDEX}])<>2'
                  name: 'ZYXEL: Port {#SNMPINDEX}: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$IFCONTROL:"{#IFNAME}"}=1` - a user can redefine context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, do not fire for the 'eternal off' interfaces.)
                    
                    WARNING: if closed manually - it will not fire again on the next poll, because of .diff.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 9119a0ba755e426580310376d6a70b5f
              name: 'Port {#SNMPINDEX}: Outgoing broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.13.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.out.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                broadcast address at this sub-layer, including those that
                were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b13b8fecada34eed8f40ee79e2a12295
              name: 'Port {#SNMPINDEX}: Outgoing multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.12.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.out.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                multicast address at this sub-layer, including those that
                were discarded or not sent.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: d15d6b6ab8af4d5d8501784bb590af08
              name: 'Port {#SNMPINDEX}: Outgoing traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.out.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the
                interface, including framing characters.  This object is a
                64-bit version of ifOutOctets.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 08e0d078c5224b0885ea8c03af9328e4
              name: 'Port {#SNMPINDEX}: Outgoing unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.11.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.out.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were not addressed to a
                multicast or broadcast address at this sub-layer, including
                those that were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 40b0f81094014f6cb667c143b5345795
              name: 'Port {#SNMPINDEX}: Outgoing utilization'
              type: CALCULATED
              key: 'zyxel.3500_24.net.if.out.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3500_24.net.if.out.traffic[{#SNMPINDEX}]) * (last(//zyxel.3500_24.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3500_24.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3500_24.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: a814c27268e648f18ac9c82d5a5f78cb
              name: 'Port {#SNMPINDEX}: Speed Duplex'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.24.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.net.if.speed_duplex[{#SNMPINDEX}]'
              description: |
                MIB:  ZYXEL-MES3500-24-MIB
                Transmission mode
              valuemap:
                name: 'ZYXEL MES3500-24 operational mode port speed duplex'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
          graph_prototypes:
            - uuid: 2b07fe7c9bd14177b8cc8c05e3975ac9
              name: 'ZYXEL MES3500-24: Port {#SNMPINDEX}: Packets traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.in.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.out.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.in.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.out.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.in.broadcastpkts[{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.out.broadcastpkts[{#SNMPINDEX}]'
            - uuid: b4c385f72ca243c8a7681c8220229d8d
              name: 'ZYXEL MES3500-24: Port {#SNMPINDEX}: Traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.in.traffic[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.out.traffic[{#SNMPINDEX}]'
            - uuid: ae845a9a10204c40a1a044002f5b1a72
              name: 'ZYXEL MES3500-24: Port {#SNMPINDEX}: Utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.out.util[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.net.if.in.util[{#SNMPINDEX}]'
          overrides:
            - name: 'Don''t create triggers for matching interface'
              step: '1'
              filter:
                conditions:
                  - macro: '{#ZYXEL.IF.NAME}'
                    value: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: '.*'
                  discover: NO_DISCOVER
        - uuid: 302fdabe174e425d9f32d36694453331
          name: 'SFP with DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.WARN.MAX},1.3.6.1.4.1.890.1.5.8.68.117.2.1.5,{#ZYXEL.SFP.WARN.MIN},1.3.6.1.4.1.890.1.5.8.68.117.2.1.6,{#ZYXEL.SFP.DESCRIPTION},1.3.6.1.4.1.890.1.5.8.68.117.2.1.8]'
          key: zyxel.3500_24.sfp.ddm.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP DDM module discovery.'
          item_prototypes:
            - uuid: 096d50d830f144079fe0231bae2528e5
              name: 'SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.117.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.sfp.ddm[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: FLOAT
              units: '!{#ZYXEL.SFP.UNIT}'
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                Transceiver module DDM data ({#ZYXEL.SFP.DESCRIPTION}).
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: ef830e34f83347bebba87a72208d805b
                  expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.sfp.ddm[{#SNMPINDEX}]) > {#ZYXEL.SFP.WARN.MAX}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION} (over {#ZYXEL.SFP.WARN.MAX}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The upper threshold value of the parameter is exceeded'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 229f44666e6043a1a8e34437ad24e3ae
                  expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.sfp.ddm[{#SNMPINDEX}]) < {#ZYXEL.SFP.WARN.MIN}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION} (less than {#ZYXEL.SFP.WARN.MIN}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The parameter values are less than the lower threshold'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 14b916383368427cad794b92d5d706e9
              name: 'ZYXEL MES3500-24: SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.sfp.ddm[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {
                  	'Temperature': '°C',
                  	'Voltage': 'V',
                  	'TxBias': 'mA',
                  	'TxPower': 'dbm',
                  	'RxPower': 'dbm'
                  };
                  var outArr = [];
                  inArray.forEach(function (item, i, arr) {
                  	item['{#ZYXEL.SFP.PORT}'] = item['{#SNMPINDEX}'].split('.')[0];
                  	item['{#ZYXEL.SFP.UNIT}'] = nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']] === undefined ? "" : nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']];
                  	item['{#ZYXEL.SFP.WARN.MAX}'] /= 100;
                  	item['{#ZYXEL.SFP.WARN.MIN}'] /= 100;
                  	outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: 998d08685c72456b959b47adabf48f3f
          name: 'SFP without DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.STATUS},1.3.6.1.4.1.890.1.5.8.68.117.1.1.2]'
          key: zyxel.3500_24.sfp.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP module discovery.'
          item_prototypes:
            - uuid: f17e1f42abda43c7974afb415fa1544d
              name: 'SFP {#SNMPINDEX}: Date code'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.117.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.sfp.datecode[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                Transceiver module vendor's manufacturing date code.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b8b4d20515d748ac9bc77f8223294861
              name: 'SFP {#SNMPINDEX}: Part number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.117.1.1.4.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.sfp.part[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                Part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 380d4a1f3aa041fea4108c08d7108344
              name: 'SFP {#SNMPINDEX}: Revision'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.117.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.sfp.revision[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                Revision level for part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 24dc72b317284f568e962b461bbb33de
              name: 'SFP {#SNMPINDEX}: Serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.117.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.sfp.serialnumber[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                Serial number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: f84b378d79b74174842cc49af29c2a0c
                  expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.sfp.serialnumber[{#SNMPINDEX}],#1)<>last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.sfp.serialnumber[{#SNMPINDEX}],#2) and length(last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.sfp.serialnumber[{#SNMPINDEX}]))>0'
                  name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced'
                  event_name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced (new serial number received)'
                  priority: INFO
                  description: 'SFP {#SNMPINDEX} serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 0b8041b750ed4734b70cce707c4782ad
              name: 'SFP {#SNMPINDEX}: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.117.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.sfp.status[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                Transceiver module status.
              valuemap:
                name: 'ZYXEL MES3500-24 SFP status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: cf254d7b5d0d4525b8f871863a1ced2d
              name: 'SFP {#SNMPINDEX}: Transceiver'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.117.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.sfp.transceiver[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                Transceiver module type names.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: cda45fc5cf1d44779e1a5eda3f120df2
              name: 'SFP {#SNMPINDEX}: Vendor'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.117.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.sfp.vendor[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                Transceiver module vendor name.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
        - uuid: 034f5965d39940d29ac58641f3b01183
          name: 'Temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.TEMP.THRESH.HIGH},1.3.6.1.4.1.890.1.5.8.68.9.2.1.5]'
          key: zyxel.3500_24.temp.discovery
          delay: 1h
          description: |
            An entry in tempTable.
            Index of temperature unit. 1:MAC, 2:CPU, 3:PHY
          item_prototypes:
            - uuid: 0ab57df406f64806a6ad93660258f08c
              name: 'Temperature "{#ZYXEL.TEMP.ID}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.9.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.temp[{#SNMPINDEX}]'
              units: '!°C'
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                The current temperature measured at this sensor
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 9963d3848c774563881689da1bcddefc
                  expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.temp[{#SNMPINDEX}])>{#ZYXEL.TEMP.THRESH.HIGH}'
                  name: 'ZYXEL: Temperature {#ZYXEL.TEMP.ID} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the temperature'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 5e06e88aca5b492aa9c623e4ef727b5d
              name: 'ZYXEL MES3500-24: Temperature "{#ZYXEL.TEMP.ID}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.temp[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {"1":"MAC", "2":"CPU", "3":"PHY"};
                  var outArr = [];
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.TEMP.ID}"] = nameMap[item["{#SNMPINDEX}"]]
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: 2197368f67d548b7a7c6b0fe5edb5a2d
          name: 'Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.VOLT.THRESH.LOW},1.3.6.1.4.1.890.1.5.8.68.9.3.1.6,{#ZYXEL.VOLT.NOMINAL},1.3.6.1.4.1.890.1.5.8.68.9.3.1.5]'
          key: zyxel.3500_24.volt.discovery
          delay: 1h
          description: 'An entry in voltageTable.'
          item_prototypes:
            - uuid: fc5ca0139747408aa65d960577bd4dbc
              name: 'Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.68.9.3.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_24.volt[{#SNMPINDEX}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: ZYXEL-MES3500-24-MIB
                The current voltage reading.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
              trigger_prototypes:
                - uuid: 2eef8cabb2e141dd8b6d1868ebc79db4
                  expression: 'last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.volt[{#SNMPINDEX}])<{#ZYXEL.VOLT.THRESH.LOW}'
                  name: 'ZYXEL: Voltage {#ZYXEL.VOLT.NOMINAL} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the power supply'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 40f7ab2435d345279b8a7a52bad06dcd
              name: 'ZYXEL MES3500-24: Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24 by SNMP'
                    key: 'zyxel.3500_24.volt[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var outArr = []
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.VOLT.NOMINAL}"] = "+" + item["{#ZYXEL.VOLT.NOMINAL}"] / 1000 + "V";
                  item["{#ZYXEL.VOLT.THRESH.LOW}"] = item["{#ZYXEL.VOLT.THRESH.LOW}"] / 1000;
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
      tags:
        - tag: class
          value: network
        - tag: target
          value: mes3500-24
        - tag: target
          value: switch
        - tag: target
          value: zyxel
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMORY.UTIL.MAX}'
          value: '90'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Threshold for memory utilization'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Time interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
          config:
            type: TEXT
            priority: '1'
            section_name: Filters
            label: 'Filter for interface control (include)'
            description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable link types.
            0 - Down link
            1 - Cooper link
            2 - Fiber link
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Filter for interface link-up type (include)'
            description: |
              Filter of discoverable link types.
              0 - Down link
              1 - Cooper link
              2 - Fiber link
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by link types.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Filter for interface link-up type (exclude)'
            description: 'Filter to exclude discovered by link types.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable interface names.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for interface name (include)'
            description: 'Filter by discoverable interface names.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered interfaces by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Filter for interface name (exclude)'
            description: 'Filter to exclude discovered interfaces by name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable status.
            0 - OK with DDM
            1 - OK without DDM
            2 - nonoperational
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Filter for SFP status (include)'
            description: |
              Filter of discoverable status.
              0 - OK with DDM
              1 - OK without DDM
              2 - nonoperational
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by status.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Filter for SFP status (exclude)'
            description: 'Filter to exclude discovered by status.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable SFP modules name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Filter for SFP DDM description (include)'
            description: 'Filter by discoverable SFP modules name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
          value: N/A
          description: 'Filter to exclude discovered SFP modules by name.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Filter for SFP DDM description (exclude)'
            description: 'Filter to exclude discovered SFP modules by name.'
        - macro: '{$ZYXEL.LLD.SFP.UPDATE}'
          value: 10m
          description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Update inteval'
            description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
      dashboards:
        - uuid: 4fd9d55bded94d53811920d5247e07a2
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'ZYXEL MES3500-24 by SNMP'
                        name: 'ZYXEL MES3500-24: Port {#SNMPINDEX}: Traffic'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
      valuemaps:
        - uuid: dbb03955eb7043dda4dea1a9d7e8e043
          name: 'SNMP available'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: c0f699295af740e2aabbb06c6718e8f8
          name: 'ZYXEL MES3500-24 operational mode port link up type'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Cooper
            - value: '2'
              newvalue: Fiber
        - uuid: f94441e46ffe4908a8a57089cbdaeaa7
          name: 'ZYXEL MES3500-24 operational mode port speed duplex'
          mappings:
            - value: '0'
              newvalue: auto
            - value: '1'
              newvalue: '10M half'
            - value: '2'
              newvalue: '10M full'
            - value: '3'
              newvalue: '100M half'
            - value: '4'
              newvalue: '100M full'
            - value: '5'
              newvalue: '1G full'
        - uuid: df2213aff9984b3f837f99944f3c9bc0
          name: 'ZYXEL MES3500-24 port admin status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
        - uuid: 679674c6b9364083a1eb1c9c9be136a2
          name: 'ZYXEL MES3500-24 port operational status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
            - value: '4'
              newvalue: Unknown
            - value: '5'
              newvalue: Dormant
            - value: '6'
              newvalue: NotPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: f12de6ba6b4c4556b276f9d5d509ffcf
          name: 'ZYXEL MES3500-24 SFP status'
          mappings:
            - value: '1'
              newvalue: 'OK with DDM'
            - value: '2'
              newvalue: 'OK without DDM'
            - value: '3'
              newvalue: nonoperational
    - uuid: 89eef2fe23964f44bf9aec6d00e39efd
      template: 'ZYXEL MES3500-24S by SNMP'
      name: 'ZYXEL MES3500-24S by SNMP'
      description: |
        ZYXEL MES3500-24S
        
        MIBs used:
        ZYXEL-TRANSCEIVER-MIB
        IF-MIB
        RFC1213-MIB
        HOST-RESOURCES-MIB
        ZYXEL-HW-MONITOR-MIB
        ZYXEL-PORT-MIB
        ZYXEL-ES-COMMON
        
        Known Issues:
        
          Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
          Version: all versions firmware
          Device: ZYXEL MGS3520-28
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/422668-discussion-thread-for-official-zabbix-templates-for-zyxel
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        https://service-provider.zyxel.com/emea/en/products/carrier-and-access-switches/access-switches/mes3500-series
        
        ### Known Issues
        
        Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
        Version: all versions firmware
        Device: ZYXEL MGS3520-28
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 4b5994ccefe5492b8ee81c88f4871efe
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          valuemap:
            name: 'SNMP available'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: d80bc493096b4da4857651e7e28829e7
              expression: 'max(/ZYXEL MES3500-24S by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'ZYXEL: No SNMP data collection'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'SNMP is not available for polling. Please check device connectivity and SNMP settings.'
              tags:
                - tag: scope
                  value: availability
        - uuid: aa2cb34bb8a24ea883d13039175e7955
          name: Contact
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: zyxel.3500_24s.contact
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The textual identification of the contact person
            for this managed node, together with information
            on how to contact this person.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 6fccaef6a6f84d97b825d46b62955b76
          name: 'CPU utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.2.4.0]'
          key: zyxel.3500_24s.cpuusage
          value_type: FLOAT
          units: '%'
          description: |
            MIB: ZYXEL-ES-COMMON
            Show device CPU load in %, it's the snapshot of CPU load when
            getting the values.
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 7bf51ce2b7a64f3f8151edc224c601e8
              expression: 'min(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.cpuusage,5m)>{$CPU.UTIL.CRIT}'
              name: 'ZYXEL: High CPU utilization'
              event_name: 'ZYXEL: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 37410c60fd224987920640313a0b229b
          name: 'ZyNOS F/W Version'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.1.6.0]'
          key: zyxel.3500_24s.fwversion
          delay: 1h
          value_type: CHAR
          description: 'MIB: ZYXEL-ES-COMMON'
          inventory_link: SOFTWARE_FULL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 182e8b14935445268c096a3e4fdb5795
              expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.fwversion,#1)<>last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.fwversion,#2) and length(last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.fwversion))>0'
              name: 'ZYXEL: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'Firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: feff31efc5b04b14bf19ec256a6660fb
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: zyxel.3500_24s.hw.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized.
            Note that this is different from sysUpTime in the SNMPv2-MIB
            [RFC1907] because sysUpTime is the uptime of the
            network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: a2ee7e4d0dbc463aa9fc997f14740d0b
          name: Location
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: zyxel.3500_24s.location
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The physical location of this node (e.g.,
            `telephone closet, 3rd floor').
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 082f2005c90d4edebdddedd1ee946793
          name: 'MAC address'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.2.2.1.6.1]'
          key: zyxel.3500_24s.mac
          delay: 1h
          value_type: CHAR
          description: |
            MIB: IF-MIB
            The interface's address at the protocol layer
            immediately `below' the network layer in the
            protocol stack.  For interfaces which do not have
            such an address (e.g., a serial line), this object
            should contain an octet string of zero length.
          inventory_link: MACADDRESS_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 1e8654e4f9ba487f971f5dc4c1fd5c9d
          name: 'Memory utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.2.5.0]'
          key: zyxel.3500_24s.memusage
          description: |
            MIB: ZYXEL-ES-COMMON
            Show device memory usage in %.
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: d3a4dca93ad946589b1b83e0fe647dde
              expression: 'min(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.memusage,5m)>{$MEMORY.UTIL.MAX}'
              name: 'ZYXEL: High memory utilization'
              event_name: 'ZYXEL: High memory utilization (>{$MEMORY.UTIL.MAX}% for 5m)'
              priority: AVERAGE
              description: 'The system is running out of free memory.'
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: a7d255bd093744ef853335e1b961bef7
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: zyxel.3500_24s.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            A textual description of the entity.  This value
            should include the full name and version
            identification of the system's hardware type,
            software operating-system, and networking
            software.  It is mandatory that this only contain
            printable ASCII characters.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 96c011542d5b4473934e0de9e442479c
              expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.model)<>"MES3500-24S"'
              name: 'ZYXEL: Template does not match hardware'
              priority: INFO
              description: 'This template is for Zyxel MES3500-24S series, but connected to {ITEM.VALUE}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 9225792a06444aabb120c390c68c2a06
          name: 'Host name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: zyxel.3500_24s.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            An administratively-assigned name for this
            managed node.  By convention, this is the node's
            fully-qualified domain name.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: b3f7ffa22b174e2c8ed8bf0deeb62b42
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: zyxel.3500_24s.net.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: RFC1213-MIB
            The time (in hundredths of a second) since the
            network management portion of the system was last
            re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: a9e8c7ae033b4f7e95aadd663f3656d9
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.1.12.0]'
          key: zyxel.3500_24s.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ZYXEL-ES-COMMON
            Serial number
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 90268ffbf33049d6adc6ed96badd67ec
              expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.serialnumber,#1)<>last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.serialnumber,#2) and length(last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.serialnumber))>0'
              name: 'ZYXEL: Device has been replaced'
              event_name: 'ZYXEL: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'Device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: a76d8952c6424abe926a5b9453bbc75d
          name: 'Fan discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.FANRPM.THRESH.LOW},1.3.6.1.4.1.890.1.15.3.26.1.1.1.6,{#ZYXEL.FAN.DESCRIPTION},1.3.6.1.4.1.890.1.15.3.26.1.1.1.2]'
          key: zyxel.3500_24s.fan.discovery
          delay: 1h
          description: 'An entry in fanRpmTable.'
          item_prototypes:
            - uuid: 4f8bcd1fc9b54f3e94009c5a098ca4e0
              name: '{#ZYXEL.FAN.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.26.1.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.fan[{#SNMPINDEX}]'
              units: '!rpm'
              description: |
                MIB: ZYXEL-HW-MONITOR-MIB
                Current speed in Revolutions Per Minute (RPM) on the fan.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: sensor
              trigger_prototypes:
                - uuid: 19846f8e671945c68b065ac53ebb2d38
                  expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.fan[{#SNMPINDEX}])<{#ZYXEL.FANRPM.THRESH.LOW}'
                  name: 'ZYXEL: {#ZYXEL.FAN.DESCRIPTION} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the fan unit'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: ed81cba771d34db3b50262ff0bbc73b4
              name: 'ZYXEL MES3500-24S: Fan #{#SNMPINDEX}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.fan[{#SNMPINDEX}]'
        - uuid: 75336fa715834ade8a5434520543bf1c
          name: 'Interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.IF.NAME},1.3.6.1.4.1.890.1.15.3.61.1.1.1.3,{#ZYXEL.IF.LINKUPTYPE},1.3.6.1.4.1.890.1.15.3.61.2.1.1.2]'
          key: zyxel.3500_24s.net.if.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 40967a08563e4f62b56d0f3983a5b76a
              name: 'Port {#SNMPINDEX}: Administrative status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.adminstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The desired state of the interface.  The
                testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MES3500-24S port admin status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: d4f846a781f543539e05bc139e01a462
              name: 'Port {#SNMPINDEX}: Interface name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.descr[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: IF-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 27ac6ebffd2e47ecb9ebbece3ef3bb68
              name: 'Port {#SNMPINDEX}: Link speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.highspeed[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in bits per second
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: e406bba0c87a4607bc36d4be74ac5abb
              name: 'Port {#SNMPINDEX}: Incoming broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.9.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.in.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a broadcast
                address at this sub-layer.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 18a759f3be5247b282fe7f685ae4d18b
              name: 'Port {#SNMPINDEX}: Incoming multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.in.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a multicast
                address at this sub-layer.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 6b87de872fa84ec8bc9c1058716617ff
              name: 'Port {#SNMPINDEX}: Incoming traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.in.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface,
                including framing characters.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 6e04ed7c0b154deeb1a32150aff18b26
              name: 'Port {#SNMPINDEX}: Incoming unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.in.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were not addressed to a multicast
                or broadcast address at this sub-layer
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 197cf5fd63d541439b282e154bcd4ef1
              name: 'Port {#SNMPINDEX}: Incoming utilization'
              type: CALCULATED
              key: 'zyxel.3500_24s.net.if.in.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3500_24s.net.if.in.traffic[{#SNMPINDEX}]) * (last(//zyxel.3500_24s.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3500_24s.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3500_24s.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: f357ac3f816d4232a2ba6ff571d95773
              name: 'Port {#SNMPINDEX}: Link type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.61.2.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.link_type[{#SNMPINDEX}]'
              description: |
                MIB: ZYXEL-PORT-MIB
                The entry shows the linkUp cable type (copper, fiber, xfp or cx4) for the combo ports.
              valuemap:
                name: 'ZYXEL MES3500-24S operational mode port link up type'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 5a6debce6aa6420e8c76f50c24fb541e
              name: 'Port {#SNMPINDEX}: Interface description'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.61.1.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.name[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: ZYXEL-PORT-MIB
                Descriptive name that identifies this port.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 419b897845244642a84a1bd224ec72a6
              name: 'Port {#SNMPINDEX}: Operational status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.operstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                The testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MES3500-24S port operational status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 60f1b7c76a6b410db3f3a2ae40c3b74c
                  expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.net.if.operstatus[{#SNMPINDEX}])=2 and last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.net.if.operstatus[{#SNMPINDEX}],#1)<>last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.net.if.operstatus[{#SNMPINDEX}],#2)'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.net.if.operstatus[{#SNMPINDEX}])<>2'
                  name: 'ZYXEL: Port {#SNMPINDEX}: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$IFCONTROL:"{#IFNAME}"}=1` - a user can redefine context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, do not fire for the 'eternal off' interfaces.)
                    
                    WARNING: if closed manually - it will not fire again on the next poll, because of .diff.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 2ca954bd5d90447288da9ac4d75ec976
              name: 'Port {#SNMPINDEX}: Outgoing broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.13.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.out.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                broadcast address at this sub-layer, including those that
                were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b229348293cd47b39e826f5be1285928
              name: 'Port {#SNMPINDEX}: Outgoing multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.12.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.out.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                multicast address at this sub-layer, including those that
                were discarded or not sent.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 445163f587b24339adc9155bff798f7d
              name: 'Port {#SNMPINDEX}: Outgoing traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.out.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the
                interface, including framing characters.  This object is a
                64-bit version of ifOutOctets.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 8f080d3c0bd045e59d22585878bccbff
              name: 'Port {#SNMPINDEX}: Outgoing unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.11.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.out.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were not addressed to a
                multicast or broadcast address at this sub-layer, including
                those that were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 43b466a87757484dae36abe07e946bff
              name: 'Port {#SNMPINDEX}: Outgoing utilization'
              type: CALCULATED
              key: 'zyxel.3500_24s.net.if.out.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3500_24s.net.if.out.traffic[{#SNMPINDEX}]) * (last(//zyxel.3500_24s.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3500_24s.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3500_24s.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: ff93002a2b5341a8a287fdc78c7e9c6d
              name: 'Port {#SNMPINDEX}: Speed Duplex'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.61.1.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.net.if.speed_duplex[{#SNMPINDEX}]'
              description: |
                MIB: ZYXEL-PORT-MIB
                Select The speed and the duplex mode of the Ethernet connection on this port. Selecting Auto
                (auto-negotiation) allows one port to negotiate with a peer port automatically to obtain the
                connection speed and duplex mode that both ends support. When auto-negotiation is turned on,
                a port on the Switch negotiates with the peer automatically to determine the connection speed
                and duplex mode. If the peer port does not support auto-negotiation or turns off this feature,
                the Switch determines the connection speed by detecting the signal on the cable and using half
                duplex mode. Thus requiring you to make sure that the settings of the peer port are the same in
                order to connect.
              valuemap:
                name: 'ZYXEL MES3500-24S operational mode port speed duplex'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
          graph_prototypes:
            - uuid: 86f5f836fba94de9aed70cf58c6cf1d4
              name: 'ZYXEL MES3500-24S: Port {#SNMPINDEX}: Packets traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.in.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.out.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.in.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.out.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.in.broadcastpkts[{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.out.broadcastpkts[{#SNMPINDEX}]'
            - uuid: f9f04b1fffeb49d3995957c026a5de5b
              name: 'ZYXEL MES3500-24S: Port {#SNMPINDEX}: Traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.in.traffic[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.out.traffic[{#SNMPINDEX}]'
            - uuid: a9d922236e12416a85f07c7caff3e3cb
              name: 'ZYXEL MES3500-24S: Port {#SNMPINDEX}: Utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.out.util[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.net.if.in.util[{#SNMPINDEX}]'
          overrides:
            - name: 'Don''t create triggers for matching interface'
              step: '1'
              filter:
                conditions:
                  - macro: '{#ZYXEL.IF.NAME}'
                    value: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: '.*'
                  discover: NO_DISCOVER
        - uuid: f90783a6170c4802a1833ae25008b618
          name: 'SFP with DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.WARN.MAX},1.3.6.1.4.1.890.1.15.3.84.1.2.1.4,{#ZYXEL.SFP.WARN.MIN},1.3.6.1.4.1.890.1.15.3.84.1.2.1.5,{#ZYXEL.SFP.DESCRIPTION},1.3.6.1.4.1.890.1.15.3.84.1.2.1.7]'
          key: zyxel.3500_24s.sfp.ddm.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP DDM module discovery.'
          item_prototypes:
            - uuid: 69d7fcbc7e3242c99737ef98efbac0a7
              name: 'SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.2.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.sfp.ddm[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: FLOAT
              units: '!{#ZYXEL.SFP.UNIT}'
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module DDM data ({#ZYXEL.SFP.DESCRIPTION}).
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 2a75ca5b7ef444d0a96dcf2d7c824f03
                  expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.sfp.ddm[{#SNMPINDEX}]) > {#ZYXEL.SFP.WARN.MAX}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION} (over {#ZYXEL.SFP.WARN.MAX}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The upper threshold value of the parameter is exceeded'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: f2989317c3f847da84979dde3b4f4db4
                  expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.sfp.ddm[{#SNMPINDEX}]) < {#ZYXEL.SFP.WARN.MIN}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION} (less than {#ZYXEL.SFP.WARN.MIN}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The parameter values are less than the lower threshold'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: e5e5d83e9f9e429fb51ff79245335065
              name: 'ZYXEL MES3500-24S: SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.sfp.ddm[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {
                  	'Temperature': '°C',
                  	'Voltage': 'V',
                  	'TxBias': 'mA',
                  	'TxPower': 'dbm',
                  	'RxPower': 'dbm'
                  };
                  var outArr = [];
                  inArray.forEach(function (item, i, arr) {
                  	item['{#ZYXEL.SFP.PORT}'] = item['{#SNMPINDEX}'].split('.')[0];
                  	item['{#ZYXEL.SFP.UNIT}'] = nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']] === undefined ? "" : nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']];
                  	item['{#ZYXEL.SFP.WARN.MAX}'] /= 100;
                  	item['{#ZYXEL.SFP.WARN.MIN}'] /= 100;
                  	outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: 98536d7e95c145e6ba5d3a5531c570ce
          name: 'SFP without DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.STATUS},1.3.6.1.4.1.890.1.15.3.84.1.1.1.1]'
          key: zyxel.3500_24s.sfp.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP module discovery.'
          item_prototypes:
            - uuid: 7232bba1aed34b5aaeb2d4ce3ad8250f
              name: 'SFP {#SNMPINDEX}: Date code'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.sfp.datecode[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module vendor's manufacturing date code.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 745310ab6da449aa8150956c076a2223
              name: 'SFP {#SNMPINDEX}: Part number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.sfp.part[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 4565c91a0641405ba4e3d853b5db86e5
              name: 'SFP {#SNMPINDEX}: Revision'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.sfp.revision[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Revision level for part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b0fa1b76a33041bcab473b17b7b74eef
              name: 'SFP {#SNMPINDEX}: Serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.4.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.sfp.serialnumber[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Serial number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: f6533a3fe07c4f0290e7758ac4183a1f
                  expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.sfp.serialnumber[{#SNMPINDEX}],#1)<>last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.sfp.serialnumber[{#SNMPINDEX}],#2) and length(last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.sfp.serialnumber[{#SNMPINDEX}]))>0'
                  name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced'
                  event_name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced (new serial number received)'
                  priority: INFO
                  description: 'SFP {#SNMPINDEX} serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 80aa0e87f7b24dfe9b525be735aa1ec3
              name: 'SFP {#SNMPINDEX}: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.sfp.status[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module type.
              valuemap:
                name: 'ZYXEL MES3500-24S SFP status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 5175fe53ba2d4bb6a3ad1aa673b67777
              name: 'SFP {#SNMPINDEX}: Transceiver'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.sfp.transceiver[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module type names.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 17c99b32a9674426807fdf5d469b324a
              name: 'SFP {#SNMPINDEX}: Vendor'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.sfp.vendor[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module vendor name.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
        - uuid: 774dd069aeb948569d21396dd8dceea1
          name: 'Temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.TEMP.THRESH.HIGH},1.3.6.1.4.1.890.1.15.3.26.1.2.1.6,{#ZYXEL.TEMPDESCRIPTION},1.3.6.1.4.1.890.1.15.3.26.1.2.1.2]'
          key: zyxel.3500_24s.temp.discovery
          delay: 1h
          description: 'An entry in tempTable.'
          item_prototypes:
            - uuid: 64975a8449d7457c84715f27eb5018fc
              name: 'Temperature "{#ZYXEL.TEMPDESCRIPTION}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.26.1.2.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.temp[{#SNMPINDEX}]'
              units: '!°C'
              description: |
                MIB: ZYXEL-HW-MONITOR-MIB
                The current temperature measured at this sensor
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: c6db10ac3bec446e9152545119b555bc
                  expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.temp[{#SNMPINDEX}])>{#ZYXEL.TEMP.THRESH.HIGH}'
                  name: 'ZYXEL: Temperature {#ZYXEL.TEMPDESCRIPTION} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the temperature'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: c238ae64f1ca4e948b36cb423669c864
              name: 'ZYXEL MES3500-24S: Temperature "{#ZYXEL.TEMPDESCRIPTION}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.temp[{#SNMPINDEX}]'
        - uuid: e8a886916c37490f9ba6b29c57d7331e
          name: 'Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.VOLT.THRESH.LOW},1.3.6.1.4.1.890.1.15.3.26.1.3.1.7,{#ZYXEL.DESCRIPTION},1.3.6.1.4.1.890.1.15.3.26.1.3.1.2]'
          key: zyxel.3500_24s.volt.discovery
          delay: 1h
          description: 'An entry in voltageTable.'
          item_prototypes:
            - uuid: 6134a567c193489aa1ca32d03c0c2c42
              name: 'Nominal "{#ZYXEL.DESCRIPTION}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.26.1.3.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3500_24s.volt[{#SNMPINDEX}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: ZYXEL-HW-MONITOR-MIB
                The current voltage reading.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
              trigger_prototypes:
                - uuid: 52ac34f156aa434dace3447bb5745b34
                  expression: 'last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.volt[{#SNMPINDEX}])<{#ZYXEL.VOLT.THRESH.LOW}'
                  name: 'ZYXEL: Voltage {#ZYXEL.DESCRIPTION} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the power supply'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: a94a590eed624cac8ece4ff2956419d8
              name: 'ZYXEL MES3500-24S: Nominal "{#ZYXEL.DESCRIPTION}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MES3500-24S by SNMP'
                    key: 'zyxel.3500_24s.volt[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var outArr = []
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.VOLT.THRESH.LOW}"] /= 1000;
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
      tags:
        - tag: class
          value: network
        - tag: target
          value: mes3500-24s
        - tag: target
          value: switch
        - tag: target
          value: zyxel
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMORY.UTIL.MAX}'
          value: '90'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Threshold for memory utilization'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Time interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
          config:
            type: TEXT
            priority: '1'
            section_name: Filters
            label: 'Filter for interface control (include)'
            description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
          value: 1|2|3|4
          description: |
            Filter of discoverable link types.
            0 - Down link
            1 - Cooper link
            2 - Fiber link
            3 - XFP
            4 - CX4
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Filter for interface link-up type (include)'
            description: |
              Filter of discoverable link types.
              0 - Down link
              1 - Cooper link
              2 - Fiber link
              3 - XFP
              4 - CX4
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by link types.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Filter for interface link-up type (exclude)'
            description: 'Filter to exclude discovered by link types.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable interface names.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for interface name (include)'
            description: 'Filter by discoverable interface names.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered interfaces by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Filter for interface name (exclude)'
            description: 'Filter to exclude discovered interfaces by name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable status.
            0 - OK with DDM
            1 - OK without DDM
            2 - nonoperational
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Filter for SFP status (include)'
            description: |
              Filter of discoverable status.
              0 - OK with DDM
              1 - OK without DDM
              2 - nonoperational
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by status.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Filter for SFP status (exclude)'
            description: 'Filter to exclude discovered by status.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable SFP modules name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Filter for SFP DDM description (include)'
            description: 'Filter by discoverable SFP modules name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
          value: N/A
          description: 'Filter to exclude discovered SFP modules by name.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Filter for SFP DDM description (exclude)'
            description: 'Filter to exclude discovered SFP modules by name.'
        - macro: '{$ZYXEL.LLD.SFP.UPDATE}'
          value: 10m
          description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Update inteval'
            description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
      dashboards:
        - uuid: 577773197a9e48a184be6186a868de87
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'ZYXEL MES3500-24S by SNMP'
                        name: 'ZYXEL MES3500-24S: Port {#SNMPINDEX}: Traffic'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
      valuemaps:
        - uuid: 9e4265c1129d482fa12a09e657a7cda3
          name: 'SNMP available'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: 615d399b1a6045359dfc262b364b4c55
          name: 'ZYXEL MES3500-24S operational mode port link up type'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Cooper
            - value: '2'
              newvalue: Fiber
            - value: '3'
              newvalue: XFP
            - value: '4'
              newvalue: CX4
        - uuid: 4217cd5f5c1f4b438cd4701c023da375
          name: 'ZYXEL MES3500-24S operational mode port speed duplex'
          mappings:
            - value: '0'
              newvalue: auto
            - value: '1'
              newvalue: '10M half'
            - value: '2'
              newvalue: '10M full'
            - value: '3'
              newvalue: '100M half'
            - value: '4'
              newvalue: '100M full'
            - value: '5'
              newvalue: '1G full'
            - value: '6'
              newvalue: '10G full'
            - value: '7'
              newvalue: '12G full'
            - value: '8'
              newvalue: '40G full'
            - value: '9'
              newvalue: '1G auto'
        - uuid: 7e705fdb791341b8a1c86ee7d85fbfea
          name: 'ZYXEL MES3500-24S port admin status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
        - uuid: 08e22f2eac034c9db9bba73040cea453
          name: 'ZYXEL MES3500-24S port operational status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
            - value: '4'
              newvalue: Unknown
            - value: '5'
              newvalue: Dormant
            - value: '6'
              newvalue: NotPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: 161770392cdb4dcd92c3596b5ad6d06a
          name: 'ZYXEL MES3500-24S SFP status'
          mappings:
            - value: '1'
              newvalue: 'OK with DDM'
            - value: '2'
              newvalue: 'OK without DDM'
            - value: '3'
              newvalue: nonoperational
    - uuid: 8ea7299983f24d0a913606e334f0e526
      template: 'ZYXEL MGS-3712 by SNMP'
      name: 'ZYXEL MGS-3712 by SNMP'
      description: |
        ZYXEL MGS-3712
        
        MIBs used:
        RFC1213-MIB
        HOST-RESOURCES-MIB
        ZYXEL-MGS3712F-MIB
        IF-MIB
        
        Known Issues:
        
          Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
          Version: all versions firmware
          Device: ZYXEL MGS-3712
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/422668-discussion-thread-for-official-zabbix-templates-for-zyxel
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        https://service-provider.zyxel.com/global/en/products/carrier-and-access-switches/access-switches/MGS-3712f
        
        ### Known Issues
        
        Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
        Version: all versions firmware
        Device: ZYXEL MGS-3712
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 8777bb95a4b64fd293e96b25febf3915
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          valuemap:
            name: 'SNMP available'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 60787fd1204b42bfb515b1b204c1d14f
              expression: 'max(/ZYXEL MGS-3712 by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'ZYXEL: No SNMP data collection'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'SNMP is not available for polling. Please check device connectivity and SNMP settings.'
              tags:
                - tag: scope
                  value: availability
        - uuid: b93b020818034096a973d8e171a099b2
          name: Contact
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: zyxel.3712.contact
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The textual identification of the contact person
            for this managed node, together with information
            on how to contact this person.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 4d13bad4f29f41b1890fa9e2709dd461
          name: 'CPU utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.11.7.0]'
          key: zyxel.3712.cpuusage
          value_type: FLOAT
          units: '%'
          description: |
            MIB: ZYXEL-MGS3712F-MIB
            Show device CPU load in %, it's the snapshot of CPU load when
            getting the values.
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: b1ca06637dbe4c9ca84e2811e780d5d5
              expression: 'min(/ZYXEL MGS-3712 by SNMP/zyxel.3712.cpuusage,5m)>{$CPU.UTIL.CRIT}'
              name: 'ZYXEL: High CPU utilization'
              event_name: 'ZYXEL: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: efc31527c7af48729c1d5a229b115c55
          name: 'ZyNOS F/W Version'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMP.ARRAY},1.3.6.1.4.1.890.1.5.8.47.1]'
          key: zyxel.3712.fwversion
          delay: 1h
          value_type: CHAR
          description: 'MIB: ZYXEL-MGS3712F-MIB'
          inventory_link: SOFTWARE_FULL
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var tmpObj = {};
                  inArray.forEach(function(item, i, arr) {
                    tmpObj[item["{#SNMPINDEX}"]] = item["{#SNMP.ARRAY}"]
                  });
                  var strOut = 'V' + tmpObj["1.0"] + '.' + tmpObj["2.0"]
                    + '(' + tmpObj["3.0"] + '.' + tmpObj["4.0"] + ')_'
                    + tmpObj["7.0"] + '.' + tmpObj["6.0"] + '.' + tmpObj["5.0"];
                  return strOut;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: de7d7e7d976c4b9894259c4e7fb5a4dd
              expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.fwversion,#1)<>last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.fwversion,#2) and length(last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.fwversion))>0'
              name: 'ZYXEL: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'Firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 801ba0a2d20f440d822eb042146b8d16
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: zyxel.3712.hw.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized.
            Note that this is different from sysUpTime in the SNMPv2-MIB
            [RFC1907] because sysUpTime is the uptime of the
            network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: a52f578cc57448f0a43641c75be89ce9
          name: Location
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: zyxel.3712.location
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The physical location of this node (e.g.,
            `telephone closet, 3rd floor').
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 26236c6667c9411393fb45af2324e318
          name: 'MAC address'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.2.2.1.6.1]'
          key: zyxel.3712.mac
          delay: 1h
          value_type: CHAR
          description: |
            MIB: IF-MIB
            The interface's address at the protocol layer
            immediately `below' the network layer in the
            protocol stack.  For interfaces which do not have
            such an address (e.g., a serial line), this object
            should contain an octet string of zero length.
          inventory_link: MACADDRESS_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: fc5d5cfb35a14ed597623db67433dcac
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: zyxel.3712.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            A textual description of the entity.  This value
            should include the full name and version
            identification of the system's hardware type,
            software operating-system, and networking
            software.  It is mandatory that this only contain
            printable ASCII characters.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: e0b4c4f09f6f496cb035af320fcf96a0
              expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.model)<>"MGS-3712"'
              name: 'ZYXEL: Template does not match hardware'
              priority: INFO
              description: 'This template is for Zyxel MGS-3712, but connected to {ITEM.VALUE}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 409fb8c9b315474db7602fba18702a1d
          name: 'Host name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: zyxel.3712.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            An administratively-assigned name for this
            managed node.  By convention, this is the node's
            fully-qualified domain name.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 692e0384fcf44ec1ac6df0d8925358e3
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: zyxel.3712.net.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: RFC1213-MIB
            The time (in hundredths of a second) since the
            network management portion of the system was last
            re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 91afb18daedc403a866302ef943beef7
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.1.10.0]'
          key: zyxel.3712.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ZYXEL-MGS3712F-MIB
            Serial number
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 4a9495748e09477ca5f12443fff533c9
              expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.serialnumber,#1)<>last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.serialnumber,#2) and length(last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.serialnumber))>0'
              name: 'ZYXEL: Device has been replaced'
              event_name: 'ZYXEL: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'Device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: 8402d05803ff481497a5e6f95874e983
          name: 'Fan discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.FANRPM.THRESH.LOW},1.3.6.1.4.1.890.1.5.8.47.8.1.1.5]'
          key: zyxel.3712.fan.discovery
          delay: 1h
          description: 'An entry in fanRpmTable.'
          item_prototypes:
            - uuid: 568dd120eb8b409dbc8c19d5869c6978
              name: 'Fan #{#SNMPINDEX}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.8.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712.fan[{#SNMPINDEX}]'
              units: '!rpm'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Current speed in Revolutions Per Minute (RPM) on the fan.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: sensor
              trigger_prototypes:
                - uuid: edc0057dbdb64fd584cc968c5d8bb41f
                  expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.fan[{#SNMPINDEX}])<{#ZYXEL.FANRPM.THRESH.LOW}'
                  name: 'ZYXEL: FAN{#SNMPINDEX} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the fan unit'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 06d4f886b788464fad9f0da91d78b0e4
              name: 'ZYXEL MGS-3712: Fan #{#SNMPINDEX}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.fan[{#SNMPINDEX}]'
        - uuid: 1568af5125ee4005abc1860e0610f7c4
          name: 'Interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.IF.NAME},1.3.6.1.4.1.890.1.5.8.47.22.1.1.3,{#ZYXEL.IF.LINKUPTYPE},1.3.6.1.4.1.890.1.5.8.47.22.1.1.5]'
          key: zyxel.3712.net.if.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 9a97d9e95dba4ba88e08ccbd48acce07
              name: 'Port {#SNMPINDEX}: Administrative status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.adminstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The desired state of the interface.  The
                testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MGS-3712 port admin status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: f6e2db1bdfd0451a9ca896ade8df790f
              name: 'Port {#SNMPINDEX}: Interface name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.descr[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: IF-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: ae4776dea7aa44e7a403aa8bab391a30
              name: 'Port {#SNMPINDEX}: Link speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.highspeed[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in bits per second
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 5c48f1894ae449528d0ef9844c22dee2
              name: 'Port {#SNMPINDEX}: Incoming broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.9.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.in.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a broadcast
                address at this sub-layer.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 83b692f16c7f40899fb802686dccffb5
              name: 'Port {#SNMPINDEX}: Incoming multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.in.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a multicast
                address at this sub-layer.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: a9880181229d44e0a60f173820eb5d67
              name: 'Port {#SNMPINDEX}: Incoming traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.in.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface,
                including framing characters.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 2555e749de034c2db2c7a800a8785695
              name: 'Port {#SNMPINDEX}: Incoming unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.in.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were not addressed to a multicast
                or broadcast address at this sub-layer
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: ca42c0b40bf74f03b544b9d0dd678223
              name: 'Port {#SNMPINDEX}: Incoming utilization'
              type: CALCULATED
              key: 'zyxel.3712.net.if.in.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3712.net.if.in.traffic[{#SNMPINDEX}]) * (last(//zyxel.3712.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3712.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3712.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 4a4c54e3736246e1a534afa93303b481
              name: 'Port {#SNMPINDEX}: Link type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.22.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.link_type[{#SNMPINDEX}]'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Physical connection type
              valuemap:
                name: 'ZYXEL MGS-3712 operational mode port link up type'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 2b4c245972454f24b703d4cb29581dfc
              name: 'Port {#SNMPINDEX}: Interface description'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.22.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.name[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: e12e5d4b36db44c38968652a048f1a26
              name: 'Port {#SNMPINDEX}: Operational status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.operstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                The testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MGS-3712 port operational status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: e21751b08fe740f2ad9ad6bde6b879c4
                  expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.net.if.operstatus[{#SNMPINDEX}])=2 and last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.net.if.operstatus[{#SNMPINDEX}],#1)<>last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.net.if.operstatus[{#SNMPINDEX}],#2)'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.net.if.operstatus[{#SNMPINDEX}])<>2'
                  name: 'ZYXEL: Port {#SNMPINDEX}: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$IFCONTROL:"{#IFNAME}"}=1` - a user can redefine context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, do not fire for the 'eternal off' interfaces.)
                    
                    WARNING: if closed manually - it will not fire again on the next poll, because of .diff.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: a28bbd54c2e54e90b7280f84e964c681
              name: 'Port {#SNMPINDEX}: Outgoing broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.13.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.out.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                broadcast address at this sub-layer, including those that
                were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 1f6f7e4f23ee4208a5288dd6eaf0aed8
              name: 'Port {#SNMPINDEX}: Outgoing multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.12.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.out.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                multicast address at this sub-layer, including those that
                were discarded or not sent.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 2e5d50c95f4942e08f54feb989058cd0
              name: 'Port {#SNMPINDEX}: Outgoing traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.out.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the
                interface, including framing characters.  This object is a
                64-bit version of ifOutOctets.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 8580f10654ea4020ae08d2917fdb8b17
              name: 'Port {#SNMPINDEX}: Outgoing unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.11.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.out.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were not addressed to a
                multicast or broadcast address at this sub-layer, including
                those that were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: d8b945fc71534a00ba35867d62bc8703
              name: 'Port {#SNMPINDEX}: Outgoing utilization'
              type: CALCULATED
              key: 'zyxel.3712.net.if.out.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3712.net.if.out.traffic[{#SNMPINDEX}]) * (last(//zyxel.3712.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3712.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3712.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b8c053a89b32400595d4a0673cfa1e81
              name: 'Port {#SNMPINDEX}: Speed Duplex'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.22.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.3712.net.if.speed_duplex[{#SNMPINDEX}]'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transmission mode
              valuemap:
                name: 'ZYXEL MGS-3712 operational mode port speed duplex'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
          graph_prototypes:
            - uuid: b2bed2a4ab7b42119009f4aabd979656
              name: 'ZYXEL MGS-3712: Port {#SNMPINDEX}: Packets traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.in.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.out.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.in.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.out.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.in.broadcastpkts[{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.out.broadcastpkts[{#SNMPINDEX}]'
            - uuid: 489edc6b24844d8cb5c718a8a4d45a3c
              name: 'ZYXEL MGS-3712: Port {#SNMPINDEX}: Traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.in.traffic[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.out.traffic[{#SNMPINDEX}]'
            - uuid: 1466f28d9f014bb39396cda181630fc4
              name: 'ZYXEL MGS-3712: Port {#SNMPINDEX}: Utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.out.util[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.net.if.in.util[{#SNMPINDEX}]'
          overrides:
            - name: 'Don''t create triggers for matching interface'
              step: '1'
              filter:
                conditions:
                  - macro: '{#ZYXEL.IF.NAME}'
                    value: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: '.*'
                  discover: NO_DISCOVER
        - uuid: 65477e8c3f8948aea5f6101b08e307cc
          name: 'SFP with DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.WARN.MAX},1.3.6.1.4.1.890.1.5.8.47.117.2.1.5,{#ZYXEL.SFP.WARN.MIN},1.3.6.1.4.1.890.1.5.8.47.117.2.1.6,{#ZYXEL.SFP.DESCRIPTION},1.3.6.1.4.1.890.1.5.8.47.117.2.1.8]'
          key: zyxel.3712.sfp.ddm.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP DDM module discovery.'
          item_prototypes:
            - uuid: cd2434237f264fd0aa57a9816eb9cdb1
              name: 'SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.117.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3712.sfp.ddm[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: FLOAT
              units: '!{#ZYXEL.SFP.UNIT}'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module DDM data ({#ZYXEL.SFP.DESCRIPTION}).
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: e9d242819d7345a0b44cc14a392f05fa
                  expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.sfp.ddm[{#SNMPINDEX}]) > {#ZYXEL.SFP.WARN.MAX}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION} (over {#ZYXEL.SFP.WARN.MAX}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The upper threshold value of the parameter is exceeded'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 177c2fe88ec24e3d9a5ea9f6b3f346d9
                  expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.sfp.ddm[{#SNMPINDEX}]) < {#ZYXEL.SFP.WARN.MIN}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION} (less than {#ZYXEL.SFP.WARN.MIN}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The parameter values are less than the lower threshold'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 2d432abf28354f4193d93b21bc5f1507
              name: 'ZYXEL MGS-3712: SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.sfp.ddm[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {
                  	'Temperature': '°C',
                  	'Voltage': 'V',
                  	'TxBias': 'mA',
                  	'TxPower': 'dbm',
                  	'RxPower': 'dbm'
                  };
                  var outArr = [];
                  inArray.forEach(function (item, i, arr) {
                  	item['{#ZYXEL.SFP.PORT}'] = item['{#SNMPINDEX}'].split('.')[0];
                  	item['{#ZYXEL.SFP.UNIT}'] = nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']] === undefined ? "" : nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']];
                  	item['{#ZYXEL.SFP.WARN.MAX}'] /= 100;
                  	item['{#ZYXEL.SFP.WARN.MIN}'] /= 100;
                  	outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: e780a6c3b3db45d9b539bba14ca89ef9
          name: 'SFP without DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.STATUS},1.3.6.1.4.1.890.1.5.8.47.117.1.1.2]'
          key: zyxel.3712.sfp.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP module discovery.'
          item_prototypes:
            - uuid: 434d614d231d41c49810342cb3d09797
              name: 'SFP {#SNMPINDEX}: Date code'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.117.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3712.sfp.datecode[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module vendor's manufacturing date code.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 184be2048cf64e7abf703cb16e1e128b
              name: 'SFP {#SNMPINDEX}: Part number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.117.1.1.4.{#SNMPINDEX}]'
              key: 'zyxel.3712.sfp.part[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 80d2606b4d644993b13f7efd001ed096
              name: 'SFP {#SNMPINDEX}: Revision'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.117.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3712.sfp.revision[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Revision level for part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 2d974479665844ae86511d471e190d51
              name: 'SFP {#SNMPINDEX}: Serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.117.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3712.sfp.serialnumber[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Serial number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: aaa3492aa0c64e8a973d1a755fd24f50
                  expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.sfp.serialnumber[{#SNMPINDEX}],#1)<>last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.sfp.serialnumber[{#SNMPINDEX}],#2) and length(last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.sfp.serialnumber[{#SNMPINDEX}]))>0'
                  name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced'
                  event_name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced (new serial number received)'
                  priority: INFO
                  description: 'SFP {#SNMPINDEX} serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 46e11863a74f481aaea204148fe8b5b7
              name: 'SFP {#SNMPINDEX}: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.117.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712.sfp.status[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module status.
              valuemap:
                name: 'ZYXEL MGS-3712 SFP status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: e2e07835d3ef431ea6c5559151dee258
              name: 'SFP {#SNMPINDEX}: Transceiver'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.117.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3712.sfp.transceiver[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module type names.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 18f798a7ca0d4ea4a24a58c3bcdb9edd
              name: 'SFP {#SNMPINDEX}: Vendor'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.117.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3712.sfp.vendor[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module vendor name.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
        - uuid: 6a39668b647f49f19591451cc977cc92
          name: 'Temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.TEMP.THRESH.HIGH},1.3.6.1.4.1.890.1.5.8.47.8.2.1.5]'
          key: zyxel.3712.temp.discovery
          delay: 1h
          description: |
            An entry in tempTable.
            Index of temperature unit. 1:MAC, 2:CPU, 3:PHY
          item_prototypes:
            - uuid: e1703024fdee4c6c812e9c0204510705
              name: 'Temperature "{#ZYXEL.TEMP.ID}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.8.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712.temp[{#SNMPINDEX}]'
              units: '!°C'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                The current temperature measured at this sensor
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: b5ba7daf05204f2b987b879a3d44fac2
                  expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.temp[{#SNMPINDEX}])>{#ZYXEL.TEMP.THRESH.HIGH}'
                  name: 'ZYXEL: Temperature {#ZYXEL.TEMP.ID} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the temperature'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 952122594bf14cad9ce00e202209388a
              name: 'ZYXEL MGS-3712: Temperature "{#ZYXEL.TEMP.ID}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.temp[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {"1":"MAC", "2":"CPU", "3":"PHY"};
                  var outArr = [];
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.TEMP.ID}"] = nameMap[item["{#SNMPINDEX}"]]
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: fdaa0461127c489fac83161e9d388e8f
          name: 'Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.VOLT.THRESH.LOW},1.3.6.1.4.1.890.1.5.8.47.8.3.1.6,{#ZYXEL.VOLT.NOMINAL},1.3.6.1.4.1.890.1.5.8.47.8.3.1.5]'
          key: zyxel.3712.volt.discovery
          delay: 1h
          description: 'An entry in voltageTable.'
          item_prototypes:
            - uuid: 5ef499ecbada4691a5598d99c2a362eb
              name: 'Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.47.8.3.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712.volt[{#SNMPINDEX}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                The current voltage reading.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
              trigger_prototypes:
                - uuid: 02a7a32af7a440b6a7199b425305fdde
                  expression: 'last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.volt[{#SNMPINDEX}])<{#ZYXEL.VOLT.THRESH.LOW}'
                  name: 'ZYXEL: Voltage {#ZYXEL.VOLT.NOMINAL} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the power supply'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 67b6c6c6085e45cbbb58fb93c1b6eb2f
              name: 'ZYXEL MGS-3712: Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712 by SNMP'
                    key: 'zyxel.3712.volt[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var outArr = []
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.VOLT.NOMINAL}"] = "+" + item["{#ZYXEL.VOLT.NOMINAL}"] / 1000 + "V";
                  item["{#ZYXEL.VOLT.THRESH.LOW}"] = item["{#ZYXEL.VOLT.THRESH.LOW}"] / 1000;
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
      tags:
        - tag: class
          value: network
        - tag: target
          value: mgs-3712
        - tag: target
          value: switch
        - tag: target
          value: zyxel
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Time interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
          config:
            type: TEXT
            priority: '1'
            section_name: Filters
            label: 'Filter for interface control (include)'
            description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable link types.
            0 - Down link
            1 - Cooper link
            2 - Fiber link
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Filter for interface link-up type (include)'
            description: |
              Filter of discoverable link types.
              0 - Down link
              1 - Cooper link
              2 - Fiber link
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by link types.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Filter for interface link-up type (exclude)'
            description: 'Filter to exclude discovered by link types.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable interface names.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Filter for interface name (include)'
            description: 'Filter by discoverable interface names.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered interfaces by name.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for interface name (exclude)'
            description: 'Filter to exclude discovered interfaces by name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable status.
            0 - OK with DDM
            1 - OK without DDM
            2 - nonoperational
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Filter for SFP status (include)'
            description: |
              Filter of discoverable status.
              0 - OK with DDM
              1 - OK without DDM
              2 - nonoperational
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by status.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Filter for SFP status (exclude)'
            description: 'Filter to exclude discovered by status.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable SFP modules name.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Filter for SFP DDM description (include)'
            description: 'Filter by discoverable SFP modules name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
          value: N/A
          description: 'Filter to exclude discovered SFP modules by name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Filter for SFP DDM description (exclude)'
            description: 'Filter to exclude discovered SFP modules by name.'
        - macro: '{$ZYXEL.LLD.SFP.UPDATE}'
          value: 10m
          description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
          config:
            type: TEXT
            priority: '12'
            section_name: Other
            label: 'Update inteval'
            description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
      dashboards:
        - uuid: 03dc93374fae4d94821303539a651047
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'ZYXEL MGS-3712 by SNMP'
                        name: 'ZYXEL MGS-3712: Port {#SNMPINDEX}: Traffic'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
      valuemaps:
        - uuid: 6e923e1e3ed34b8f87357b5fd7407c54
          name: 'SNMP available'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: 7c5d7efbd17f48619a3f4211a269b38d
          name: 'ZYXEL MGS-3712 operational mode port link up type'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Cooper
            - value: '2'
              newvalue: Fiber
        - uuid: da42da17340044ea83521107ac4dee04
          name: 'ZYXEL MGS-3712 operational mode port speed duplex'
          mappings:
            - value: '0'
              newvalue: auto
            - value: '1'
              newvalue: '10M half'
            - value: '2'
              newvalue: '10M full'
            - value: '3'
              newvalue: '100M half'
            - value: '4'
              newvalue: '100M full'
            - value: '5'
              newvalue: '1G full'
        - uuid: 7e107b2d754945dbaf833955fcae7f48
          name: 'ZYXEL MGS-3712 port admin status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
        - uuid: ed71a5038bf34198a3a56b0020ad728e
          name: 'ZYXEL MGS-3712 port operational status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
            - value: '4'
              newvalue: Unknown
            - value: '5'
              newvalue: Dormant
            - value: '6'
              newvalue: NotPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: b89570749c5d4dcb9378b7951803b8e4
          name: 'ZYXEL MGS-3712 SFP status'
          mappings:
            - value: '1'
              newvalue: 'OK with DDM'
            - value: '2'
              newvalue: 'OK without DDM'
            - value: '3'
              newvalue: nonoperational
    - uuid: 01deb47efa1f4a9092de67fd61820a7d
      template: 'ZYXEL MGS-3712F by SNMP'
      name: 'ZYXEL MGS-3712F by SNMP'
      description: |
        ZYXEL MGS-3712F
        
        MIBs used:
        RFC1213-MIB
        HOST-RESOURCES-MIB
        ZYXEL-MGS3712F-MIB
        IF-MIB
        
        Known Issues:
        
          Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
          Version: all versions firmware
          Device: ZYXEL MGS-3712F
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/422668-discussion-thread-for-official-zabbix-templates-for-zyxel
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        https://service-provider.zyxel.com/global/en/products/carrier-and-access-switches/access-switches/mgs-3712f
        
        ### Known Issues
        
        Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
        Version: all versions firmware
        Device: ZYXEL MGS-3712F
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 2bd320c5d71d471e8b68a5f30e1aa5d9
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          valuemap:
            name: 'SNMP available'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: c4244d60e8aa4cc380442992c031b2fd
              expression: 'max(/ZYXEL MGS-3712F by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'ZYXEL: No SNMP data collection'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'SNMP is not available for polling. Please check device connectivity and SNMP settings.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 71ba1c991114432c9dca4f39b30e7872
          name: Contact
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: zyxel.3712f.contact
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The textual identification of the contact person
            for this managed node, together with information
            on how to contact this person.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 69432e1306ae46eab178082cb5ed7bc3
          name: 'CPU utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.11.7.0]'
          key: zyxel.3712f.cpuusage
          value_type: FLOAT
          units: '%'
          description: |
            MIB: ZYXEL-MGS3712F-MIB
            Show device CPU load in %, it's the snapshot of CPU load when
            getting the values.
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 084cf3c89c9c48eeac9131d831a4f71b
              expression: 'min(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.cpuusage,5m)>{$CPU.UTIL.CRIT}'
              name: 'ZYXEL: High CPU utilization'
              event_name: 'ZYXEL: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 4ced5f4185284f32b767036ffe41302c
          name: 'ZyNOS F/W Version'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMP.ARRAY},1.3.6.1.4.1.890.1.5.8.48.1]'
          key: zyxel.3712f.fwversion
          delay: 1h
          value_type: CHAR
          description: 'MIB: ZYXEL-MGS3712F-MIB'
          inventory_link: SOFTWARE_FULL
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var tmpObj = {};
                  inArray.forEach(function(item, i, arr) {
                    tmpObj[item["{#SNMPINDEX}"]] = item["{#SNMP.ARRAY}"]
                  });
                  var strOut = 'V' + tmpObj["1.0"] + '.' + tmpObj["2.0"]
                    + '(' + tmpObj["3.0"] + '.' + tmpObj["4.0"] + ')_'
                    + tmpObj["7.0"] + '.' + tmpObj["6.0"] + '.' + tmpObj["5.0"];
                  return strOut;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: fbf62d3f9ce54baab9a16f3e123811ef
              expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.fwversion,#1)<>last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.fwversion,#2) and length(last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.fwversion))>0'
              name: 'ZYXEL: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'Firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 29bc66a7a2c949549fc2e4c6fa841ab0
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: zyxel.3712f.hw.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized.
            Note that this is different from sysUpTime in the SNMPv2-MIB
            [RFC1907] because sysUpTime is the uptime of the
            network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 98c18ebb978448098922d7930e2ed00b
          name: Location
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: zyxel.3712f.location
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The physical location of this node (e.g.,
            `telephone closet, 3rd floor').
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: bfd1233a36e94dfe93cd02ac95a7218e
          name: 'MAC address'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.2.2.1.6.1]'
          key: zyxel.3712f.mac
          delay: 1h
          value_type: CHAR
          description: |
            MIB: IF-MIB
            The interface's address at the protocol layer
            immediately `below' the network layer in the
            protocol stack.  For interfaces which do not have
            such an address (e.g., a serial line), this object
            should contain an octet string of zero length.
          inventory_link: MACADDRESS_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: e734e8fe661043ac84d55a2497a50cf5
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: zyxel.3712f.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            A textual description of the entity.  This value
            should include the full name and version
            identification of the system's hardware type,
            software operating-system, and networking
            software.  It is mandatory that this only contain
            printable ASCII characters.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: bf3d28b088db48a59aaa9e88f6b13cb8
              expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.model)<>"MGS-3712F"'
              name: 'ZYXEL: Template does not match hardware'
              priority: INFO
              description: 'This template is for Zyxel MGS-3712F, but connected to {ITEM.VALUE}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 026c51d2e28943e98056a934355a0161
          name: 'Host name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: zyxel.3712f.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            An administratively-assigned name for this
            managed node.  By convention, this is the node's
            fully-qualified domain name.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: e5e21fdb6dae4dc49038f0801c87a5c6
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: zyxel.3712f.net.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: RFC1213-MIB
            The time (in hundredths of a second) since the
            network management portion of the system was last
            re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 97eaf488887c42b89a4e6f6103ceeef6
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.1.10.0]'
          key: zyxel.3712f.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ZYXEL-MGS3712F-MIB
            Serial number
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: ccb3fe676cd742af954b8c5e7898e5f0
              expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.serialnumber,#1)<>last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.serialnumber,#2) and length(last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.serialnumber))>0'
              name: 'ZYXEL: Device has been replaced'
              event_name: 'ZYXEL: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'Device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: 0f15b0a5b34d4849800ea65b1f5e0916
          name: 'Fan discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.FANRPM.THRESH.LOW},1.3.6.1.4.1.890.1.5.8.48.8.1.1.5]'
          key: zyxel.3712f.fan.discovery
          delay: 1h
          description: 'An entry in fanRpmTable.'
          item_prototypes:
            - uuid: 12073ba0a2894561bfa130aeca7c8aba
              name: 'Fan #{#SNMPINDEX}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.8.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712f.fan[{#SNMPINDEX}]'
              units: '!rpm'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Current speed in Revolutions Per Minute (RPM) on the fan.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: sensor
              trigger_prototypes:
                - uuid: 4672af40f7434a419d063c6f00f4f9f8
                  expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.fan[{#SNMPINDEX}])<{#ZYXEL.FANRPM.THRESH.LOW}'
                  name: 'ZYXEL: FAN{#SNMPINDEX} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the fan unit'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 09b10e607e14466d8c49512955f6f30e
              name: 'ZYXEL MGS-3712F: Fan #{#SNMPINDEX}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.fan[{#SNMPINDEX}]'
        - uuid: 4e39a7b918fd44a1bd3986380d116e9f
          name: 'Interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.IF.NAME},1.3.6.1.4.1.890.1.5.8.48.22.1.1.3,{#ZYXEL.IF.LINKUPTYPE},1.3.6.1.4.1.890.1.5.8.48.22.1.1.5]'
          key: zyxel.3712f.net.if.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 84b7463fd2ff40f4b854ad5331fbf0da
              name: 'Port {#SNMPINDEX}: Administrative status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.adminstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The desired state of the interface.  The
                testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MGS-3712F port admin status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: ba54ef4ceafd4445bab7f2365c6c4404
              name: 'Port {#SNMPINDEX}: Interface name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.descr[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: IF-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 1955d72ae95a4c53922a4a209c48af45
              name: 'Port {#SNMPINDEX}: Link speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.highspeed[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in bits per second
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 8971f0814f9f4a90a9163b83804665f1
              name: 'Port {#SNMPINDEX}: Incoming broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.9.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.in.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a broadcast
                address at this sub-layer.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b3f54f3b51474b608ae5f4cec6990b1a
              name: 'Port {#SNMPINDEX}: Incoming multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.in.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a multicast
                address at this sub-layer.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: a4a13a2309d94ea7a6f935796c1f4623
              name: 'Port {#SNMPINDEX}: Incoming traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.in.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface,
                including framing characters.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: a1b595cd244340aea0dd9343a36619b6
              name: 'Port {#SNMPINDEX}: Incoming unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.in.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were not addressed to a multicast
                or broadcast address at this sub-layer
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 13f394481ad045ed8db3693be14ed2f1
              name: 'Port {#SNMPINDEX}: Incoming utilization'
              type: CALCULATED
              key: 'zyxel.3712f.net.if.in.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3712f.net.if.in.traffic[{#SNMPINDEX}]) * (last(//zyxel.3712f.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3712f.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3712f.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: c173d9fb0e4645f8b1b5cdd70881ea0a
              name: 'Port {#SNMPINDEX}: Link type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.22.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.link_type[{#SNMPINDEX}]'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Physical connection type
              valuemap:
                name: 'ZYXEL MGS-3712F operational mode port link up type'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b0dc3f51f7f544e6ac7c14d4aaf5b7a6
              name: 'Port {#SNMPINDEX}: Interface description'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.22.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.name[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 0c940b9948f043b5a58e59cfd1e3f585
              name: 'Port {#SNMPINDEX}: Operational status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.operstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                The testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MGS-3712F port operational status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: d92c1f55c21e4780ada69269d95c5f45
                  expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.net.if.operstatus[{#SNMPINDEX}])=2 and last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.net.if.operstatus[{#SNMPINDEX}],#1)<>last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.net.if.operstatus[{#SNMPINDEX}],#2)'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.net.if.operstatus[{#SNMPINDEX}])<>2'
                  name: 'ZYXEL: Port {#SNMPINDEX}: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$IFCONTROL:"{#IFNAME}"}=1` - a user can redefine context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, do not fire for the 'eternal off' interfaces.)
                    
                    WARNING: if closed manually - it will not fire again on the next poll, because of .diff.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 759ec75f1155444187f970e3141e219b
              name: 'Port {#SNMPINDEX}: Outgoing broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.13.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.out.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                broadcast address at this sub-layer, including those that
                were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 9cfa5cdeb08c403ea487107303fb52c9
              name: 'Port {#SNMPINDEX}: Outgoing multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.12.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.out.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                multicast address at this sub-layer, including those that
                were discarded or not sent.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 44c57404960045998f6b11129c5c9e74
              name: 'Port {#SNMPINDEX}: Outgoing traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.out.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the
                interface, including framing characters.  This object is a
                64-bit version of ifOutOctets.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: d618cdab510147dba8781669b62535d5
              name: 'Port {#SNMPINDEX}: Outgoing unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.11.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.out.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were not addressed to a
                multicast or broadcast address at this sub-layer, including
                those that were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 4ae2370776ea425095a8856ac4a51868
              name: 'Port {#SNMPINDEX}: Outgoing utilization'
              type: CALCULATED
              key: 'zyxel.3712f.net.if.out.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3712f.net.if.out.traffic[{#SNMPINDEX}]) * (last(//zyxel.3712f.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3712f.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3712f.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 9dabada8160e47138c2416002346fc2d
              name: 'Port {#SNMPINDEX}: Speed Duplex'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.22.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.3712f.net.if.speed_duplex[{#SNMPINDEX}]'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transmission mode
              valuemap:
                name: 'ZYXEL MGS-3712F operational mode port speed duplex'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
          graph_prototypes:
            - uuid: 6d6da920b3b841d2a348016bfa4fd529
              name: 'ZYXEL MGS-3712F: Port {#SNMPINDEX}: Packets traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.in.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.out.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.in.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.out.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.in.broadcastpkts[{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.out.broadcastpkts[{#SNMPINDEX}]'
            - uuid: 337c2059cb87491fbacae5690da55ca7
              name: 'ZYXEL MGS-3712F: Port {#SNMPINDEX}: Traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.in.traffic[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.out.traffic[{#SNMPINDEX}]'
            - uuid: 3e75d1f6271943eaaf19644716fe4e40
              name: 'ZYXEL MGS-3712F: Port {#SNMPINDEX}: Utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.out.util[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.net.if.in.util[{#SNMPINDEX}]'
          overrides:
            - name: 'Don''t create triggers for matching interface'
              step: '1'
              filter:
                conditions:
                  - macro: '{#ZYXEL.IF.NAME}'
                    value: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: '.*'
                  discover: NO_DISCOVER
        - uuid: d48eedbbb8ad448da866d11d6f40ce91
          name: 'SFP with DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.WARN.MAX},1.3.6.1.4.1.890.1.5.8.48.117.2.1.5,{#ZYXEL.SFP.WARN.MIN},1.3.6.1.4.1.890.1.5.8.48.117.2.1.6,{#ZYXEL.SFP.DESCRIPTION},1.3.6.1.4.1.890.1.5.8.48.117.2.1.8]'
          key: zyxel.3712f.sfp.ddm.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP DDM module discovery.'
          item_prototypes:
            - uuid: d9accdfbf4e44ef28a191f6c9fd864b1
              name: 'SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.117.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3712f.sfp.ddm[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: FLOAT
              units: '!{#ZYXEL.SFP.UNIT}'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module DDM data ({#ZYXEL.SFP.DESCRIPTION}).
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 1ef8b878bd334f1eac9d9c4258d1f4f2
                  expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.sfp.ddm[{#SNMPINDEX}]) > {#ZYXEL.SFP.WARN.MAX}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION} (over {#ZYXEL.SFP.WARN.MAX}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The upper threshold value of the parameter is exceeded'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 6605455fa4764a578feff4ce12a20883
                  expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.sfp.ddm[{#SNMPINDEX}]) < {#ZYXEL.SFP.WARN.MIN}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION} (less than {#ZYXEL.SFP.WARN.MIN}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The parameter values are less than the lower threshold'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 1ea36937222d40b0a714b47fb0fceb36
              name: 'ZYXEL MGS-3712F: SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.sfp.ddm[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {
                  	'Temperature': '°C',
                  	'Voltage': 'V',
                  	'TxBias': 'mA',
                  	'TxPower': 'dbm',
                  	'RxPower': 'dbm'
                  };
                  var outArr = [];
                  inArray.forEach(function (item, i, arr) {
                  	item['{#ZYXEL.SFP.PORT}'] = item['{#SNMPINDEX}'].split('.')[0];
                  	item['{#ZYXEL.SFP.UNIT}'] = nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']] === undefined ? "" : nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']];
                  	item['{#ZYXEL.SFP.WARN.MAX}'] /= 100;
                  	item['{#ZYXEL.SFP.WARN.MIN}'] /= 100;
                  	outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: b3d39eb65ab547de92862c93ca9ea2b0
          name: 'SFP without DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.STATUS},1.3.6.1.4.1.890.1.5.8.48.117.1.1.2]'
          key: zyxel.3712f.sfp.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP module discovery.'
          item_prototypes:
            - uuid: 430c8c876a974a0f8df8d79222bb7dcd
              name: 'SFP {#SNMPINDEX}: Date code'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.117.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3712f.sfp.datecode[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module vendor's manufacturing date code.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 519c8737de814a6aabce25ea8ef52c1a
              name: 'SFP {#SNMPINDEX}: Part number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.117.1.1.4.{#SNMPINDEX}]'
              key: 'zyxel.3712f.sfp.part[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: ea54a5a49aa4447ba77a28b4b110a77a
              name: 'SFP {#SNMPINDEX}: Revision'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.117.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3712f.sfp.revision[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Revision level for part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: bb97e6edd8574888b6892a0d49849406
              name: 'SFP {#SNMPINDEX}: Serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.117.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3712f.sfp.serialnumber[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Serial number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 8fc46b61f7854893839a307700627d18
                  expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.sfp.serialnumber[{#SNMPINDEX}],#1)<>last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.sfp.serialnumber[{#SNMPINDEX}],#2) and length(last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.sfp.serialnumber[{#SNMPINDEX}]))>0'
                  name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced'
                  event_name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced (new serial number received)'
                  priority: INFO
                  description: 'SFP {#SNMPINDEX} serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: b0a81abdecad42788715ad879c2d03fa
              name: 'SFP {#SNMPINDEX}: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.117.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712f.sfp.status[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module status.
              valuemap:
                name: 'ZYXEL MGS-3712F SFP status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: db78a10438534c53bc0bc7ce09d784cd
              name: 'SFP {#SNMPINDEX}: Transceiver'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.117.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3712f.sfp.transceiver[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module type names.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 536d22ea7a654bf99b26eeaa8e6761f7
              name: 'SFP {#SNMPINDEX}: Vendor'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.117.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3712f.sfp.vendor[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                Transceiver module vendor name.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
        - uuid: a6e733335bb24801bf006586185ffaff
          name: 'Temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.TEMP.THRESH.HIGH},1.3.6.1.4.1.890.1.5.8.48.8.2.1.5]'
          key: zyxel.3712f.temp.discovery
          delay: 1h
          description: |
            An entry in tempTable.
            Index of temperature unit. 1:MAC, 2:CPU, 3:PHY
          item_prototypes:
            - uuid: 02ba756962cf4ab3b3c90817e4c5f053
              name: 'Temperature "{#ZYXEL.TEMP.ID}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.8.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712f.temp[{#SNMPINDEX}]'
              units: '!°C'
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                The current temperature measured at this sensor
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: b0d3093a36984493a7ffe87c7c4d408e
                  expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.temp[{#SNMPINDEX}])>{#ZYXEL.TEMP.THRESH.HIGH}'
                  name: 'ZYXEL: Temperature {#ZYXEL.TEMP.ID} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the temperature'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 75294455e2ce4c2cb902c6b58549c8d8
              name: 'ZYXEL MGS-3712F: Temperature "{#ZYXEL.TEMP.ID}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.temp[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {"1":"MAC", "2":"CPU", "3":"PHY"};
                  var outArr = [];
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.TEMP.ID}"] = nameMap[item["{#SNMPINDEX}"]]
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: 4ccedd9f504346eda12af79b21362322
          name: 'Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.VOLT.THRESH.LOW},1.3.6.1.4.1.890.1.5.8.48.8.3.1.6,{#ZYXEL.VOLT.NOMINAL},1.3.6.1.4.1.890.1.5.8.48.8.3.1.5]'
          key: zyxel.3712f.volt.discovery
          delay: 1h
          description: 'An entry in voltageTable.'
          item_prototypes:
            - uuid: d1f0e62a6fad4d578c0d524278c7ad3d
              name: 'Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.48.8.3.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3712f.volt[{#SNMPINDEX}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: ZYXEL-MGS3712F-MIB
                The current voltage reading.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
              trigger_prototypes:
                - uuid: 9a15b78bae564c879a5c95290cde63fe
                  expression: 'last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.volt[{#SNMPINDEX}])<{#ZYXEL.VOLT.THRESH.LOW}'
                  name: 'ZYXEL: Voltage {#ZYXEL.VOLT.NOMINAL} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the power supply'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: fd954391176a47728eec01caed2234b5
              name: 'ZYXEL MGS-3712F: Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS-3712F by SNMP'
                    key: 'zyxel.3712f.volt[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var outArr = []
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.VOLT.NOMINAL}"] = "+" + item["{#ZYXEL.VOLT.NOMINAL}"] / 1000 + "V";
                  item["{#ZYXEL.VOLT.THRESH.LOW}"] = item["{#ZYXEL.VOLT.THRESH.LOW}"] / 1000;
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
      tags:
        - tag: class
          value: network
        - tag: target
          value: mgs-3712f
        - tag: target
          value: switch
        - tag: target
          value: zyxel
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Time interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
          config:
            type: TEXT
            priority: '1'
            section_name: Filters
            label: 'Filter for interface control (include)'
            description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable link types.
            0 - Down link
            1 - Cooper link
            2 - Fiber link
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Filter for interface link-up type (include)'
            description: |
              Filter of discoverable link types.
              0 - Down link
              1 - Cooper link
              2 - Fiber link
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by link types.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Filter for interface link-up type (exclude)'
            description: 'Filter to exclude discovered by link types.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable interface names.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Filter for interface name (include)'
            description: 'Filter by discoverable interface names.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered interfaces by name.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for interface name (exclude)'
            description: 'Filter to exclude discovered interfaces by name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable status.
            0 - OK with DDM
            1 - OK without DDM
            2 - nonoperational
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Filter for SFP status (include)'
            description: |
              Filter of discoverable status.
              0 - OK with DDM
              1 - OK without DDM
              2 - nonoperational
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by status.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Filter for SFP status (exclude)'
            description: 'Filter to exclude discovered by status.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable SFP modules name.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Filter for SFP DDM description (include)'
            description: 'Filter by discoverable SFP modules name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
          value: N/A
          description: 'Filter to exclude discovered SFP modules by name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Filter for SFP DDM description (exclude)'
            description: 'Filter to exclude discovered SFP modules by name.'
        - macro: '{$ZYXEL.LLD.SFP.UPDATE}'
          value: 10m
          description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
          config:
            type: TEXT
            priority: '12'
            section_name: Other
            label: 'Update inteval'
            description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
      dashboards:
        - uuid: 42acb2b1e0794607b68140124eee22a1
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'ZYXEL MGS-3712F by SNMP'
                        name: 'ZYXEL MGS-3712F: Port {#SNMPINDEX}: Traffic'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
      valuemaps:
        - uuid: bf6cbe819fb94c85becf4364c47ef1c4
          name: 'SNMP available'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: 2695f35dedcf41e1aade2037e931c57e
          name: 'ZYXEL MGS-3712F operational mode port link up type'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Cooper
            - value: '2'
              newvalue: Fiber
        - uuid: c2b235ab2e6042568c096fdfb466f7dc
          name: 'ZYXEL MGS-3712F operational mode port speed duplex'
          mappings:
            - value: '0'
              newvalue: auto
            - value: '1'
              newvalue: '10M half'
            - value: '2'
              newvalue: '10M full'
            - value: '3'
              newvalue: '100M half'
            - value: '4'
              newvalue: '100M full'
            - value: '5'
              newvalue: '1G full'
        - uuid: d145d8ee5ad2423f906335d30bfef592
          name: 'ZYXEL MGS-3712F port admin status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
        - uuid: 655823ba854540c78a8078d4e7594bf9
          name: 'ZYXEL MGS-3712F port operational status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
            - value: '4'
              newvalue: Unknown
            - value: '5'
              newvalue: Dormant
            - value: '6'
              newvalue: NotPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: bf0d94784c404b209d4c75c8f582a5c6
          name: 'ZYXEL MGS-3712F SFP status'
          mappings:
            - value: '1'
              newvalue: 'OK with DDM'
            - value: '2'
              newvalue: 'OK without DDM'
            - value: '3'
              newvalue: nonoperational
    - uuid: 9cc843a085bb4ee5af0dc4d764a7eee9
      template: 'ZYXEL MGS3520-28x by SNMP'
      name: 'ZYXEL MGS3520-28x by SNMP'
      description: |
        ZYXEL MGS3520-28x
        
        MIBs used:
        ZYXEL-TRANSCEIVER-MIB
        IF-MIB
        RFC1213-MIB
        HOST-RESOURCES-MIB
        ZYXEL-HW-MONITOR-MIB
        ZYXEL-PORT-MIB
        ZYXEL-ES-COMMON
        
        Known Issues:
        
          Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
          Version: all versions firmware
          Device: ZYXEL MGS3520-28
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/422668-discussion-thread-for-official-zabbix-templates-for-zyxel
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        https://service-provider.zyxel.com/emea/en/products/carrier-and-access-switches/access-switches/mgs3520-series
        
        ### Known Issues
        
        Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
        Version: all versions firmware
        Device: ZYXEL MGS3520-28
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: dd305c07637b49c985aef490fb237359
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          valuemap:
            name: 'SNMP available'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 3bf5d80d383e4e98853caa02063d69c9
              expression: 'max(/ZYXEL MGS3520-28x by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'ZYXEL: No SNMP data collection'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'SNMP is not available for polling. Please check device connectivity and SNMP settings.'
              tags:
                - tag: scope
                  value: availability
        - uuid: be1d951beb564638a6102fe4b35fede0
          name: Contact
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: zyxel.3520_28.contact
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The textual identification of the contact person
            for this managed node, together with information
            on how to contact this person.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: abdb31aeb0034998b91ab8f9b475409f
          name: 'CPU utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.2.4.0]'
          key: zyxel.3520_28.cpuusage
          value_type: FLOAT
          units: '%'
          description: |
            MIB: ZYXEL-ES-COMMON
            Show device CPU load in %, it's the snapshot of CPU load when
            getting the values.
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 96ed7ee3906541ea9cb2c95cf4da1a62
              expression: 'min(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.cpuusage,5m)>{$CPU.UTIL.CRIT}'
              name: 'ZYXEL: High CPU utilization'
              event_name: 'ZYXEL: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: dd0ab3fa502b43969eec05ffd687450e
          name: 'ZyNOS F/W Version'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.1.6.0]'
          key: zyxel.3520_28.fwversion
          delay: 1h
          value_type: CHAR
          description: 'MIB: ZYXEL-ES-COMMON'
          inventory_link: SOFTWARE_FULL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 3785991565b948c2a1e1a2a140c42df4
              expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.fwversion,#1)<>last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.fwversion,#2) and length(last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.fwversion))>0'
              name: 'ZYXEL: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'Firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 8f050b29d1eb43e4a150383c9edd2467
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: zyxel.3520_28.hw.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized.
            Note that this is different from sysUpTime in the SNMPv2-MIB
            [RFC1907] because sysUpTime is the uptime of the
            network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: d9923ed59ef14cbebfe2f6d24c0d8414
          name: Location
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: zyxel.3520_28.location
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The physical location of this node (e.g.,
            `telephone closet, 3rd floor').
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 65116a646d734290926de9444a58ff2d
          name: 'MAC address'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.2.2.1.6.1]'
          key: zyxel.3520_28.mac
          delay: 1h
          value_type: CHAR
          description: |
            MIB: IF-MIB
            The interface's address at the protocol layer
            immediately `below' the network layer in the
            protocol stack.  For interfaces which do not have
            such an address (e.g., a serial line), this object
            should contain an octet string of zero length.
          inventory_link: MACADDRESS_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 89d6942524f84e6d80d02a80be25ce57
          name: 'Memory utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.2.5.0]'
          key: zyxel.3520_28.memusage
          description: |
            MIB: ZYXEL-ES-COMMON
            Show device memory usage in %.
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 1a999dff1dd9481083681741e71aba76
              expression: 'min(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.memusage,5m)>{$MEMORY.UTIL.MAX}'
              name: 'ZYXEL: High memory utilization'
              event_name: 'ZYXEL: High memory utilization (>{$MEMORY.UTIL.MAX}% for 5m)'
              priority: AVERAGE
              description: 'The system is running out of free memory.'
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: 2dced10921704f8a9ccaabb2f951af15
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: zyxel.3520_28.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            A textual description of the entity.  This value
            should include the full name and version
            identification of the system's hardware type,
            software operating-system, and networking
            software.  It is mandatory that this only contain
            printable ASCII characters.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: d72bc70a67014d818d593d6c484fc9ee
              expression: 'not(last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.model)="MGS3520-28" or last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.model)="MGS3520-28F")'
              name: 'ZYXEL: Template does not match hardware'
              priority: INFO
              description: 'This template is for Zyxel MGS3520-28x series, but connected to {ITEM.VALUE}'
              tags:
                - tag: scope
                  value: notice
        - uuid: bccc98beb7ea45d6a7463de339e8877e
          name: 'Host name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: zyxel.3520_28.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            An administratively-assigned name for this
            managed node.  By convention, this is the node's
            fully-qualified domain name.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 78959009721a453c8b8a2c49eb26c90c
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: zyxel.3520_28.net.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: RFC1213-MIB
            The time (in hundredths of a second) since the
            network management portion of the system was last
            re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 095d82b3c92340debb324844a6c7f8a8
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.1.12.0]'
          key: zyxel.3520_28.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ZYXEL-ES-COMMON
            Serial number
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: e953886c5a464fc18bb1e221d801901c
              expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.serialnumber,#1)<>last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.serialnumber,#2) and length(last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.serialnumber))>0'
              name: 'ZYXEL: Device has been replaced'
              event_name: 'ZYXEL: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'Device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: e56b6958ca184f549d86502ad9aa10bc
          name: 'Fan discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.FANRPM.THRESH.LOW},1.3.6.1.4.1.890.1.15.3.26.1.1.1.6,{#ZYXEL.FAN.DESCRIPTION},1.3.6.1.4.1.890.1.15.3.26.1.1.1.2]'
          key: zyxel.3520_28.fan.discovery
          delay: 1h
          description: 'An entry in fanRpmTable.'
          item_prototypes:
            - uuid: dd26e2542d174248af94102230e3b590
              name: '{#ZYXEL.FAN.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.26.1.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.fan[{#SNMPINDEX}]'
              units: '!rpm'
              description: |
                MIB: ZYXEL-HW-MONITOR-MIB
                Current speed in Revolutions Per Minute (RPM) on the fan.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: sensor
              trigger_prototypes:
                - uuid: 9eedeb7aaba943c0947896cd50b39c7f
                  expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.fan[{#SNMPINDEX}])<{#ZYXEL.FANRPM.THRESH.LOW}'
                  name: 'ZYXEL: {#ZYXEL.FAN.DESCRIPTION} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the fan unit'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 8599554de97e46e2bb7d3575d97f9453
              name: 'ZYXEL MGS3520-28x: Fan #{#SNMPINDEX}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.fan[{#SNMPINDEX}]'
        - uuid: 800ea9596e6f4fa0b59966f9e9e7cf74
          name: 'Interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.IF.NAME},1.3.6.1.4.1.890.1.15.3.61.1.1.1.3,{#ZYXEL.IF.LINKUPTYPE},1.3.6.1.4.1.890.1.15.3.61.2.1.1.2]'
          key: zyxel.3520_28.net.if.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 43cf7ba65c39475b9614ed4b95e9b398
              name: 'Port {#SNMPINDEX}: Administrative status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.adminstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The desired state of the interface.  The
                testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MGS3520-28x port admin status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: de6bab43bf544489976261919ae52e98
              name: 'Port {#SNMPINDEX}: Interface name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.descr[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: IF-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 01f3cc6551bb4703b199e6c996ad48ce
              name: 'Port {#SNMPINDEX}: Link speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.highspeed[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in bits per second
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 68b987f900c0467ea77a8c8eb661f6d0
              name: 'Port {#SNMPINDEX}: Incoming broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.9.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.in.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a broadcast
                address at this sub-layer.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: ddcef9809ee34de5bec1acbdc8abc162
              name: 'Port {#SNMPINDEX}: Incoming multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.in.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a multicast
                address at this sub-layer.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: e8c2a3a8ba654311bc90901502983b7a
              name: 'Port {#SNMPINDEX}: Incoming traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.in.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface,
                including framing characters.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 003eb52b5fe44f509b3c04eef9cc2aa7
              name: 'Port {#SNMPINDEX}: Incoming unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.in.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were not addressed to a multicast
                or broadcast address at this sub-layer
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 8e060cde0fae44d792080fbc7da5a2a1
              name: 'Port {#SNMPINDEX}: Incoming utilization'
              type: CALCULATED
              key: 'zyxel.3520_28.net.if.in.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3520_28.net.if.in.traffic[{#SNMPINDEX}]) * (last(//zyxel.3520_28.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3520_28.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3520_28.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 15a2c17e0bba4f0d824790c3caa9840f
              name: 'Port {#SNMPINDEX}: Link type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.61.2.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.link_type[{#SNMPINDEX}]'
              description: |
                MIB: ZYXEL-PORT-MIB
                The entry shows the linkUp cable type (copper, fiber, xfp or cx4) for the combo ports.
              valuemap:
                name: 'ZYXEL MGS3520-28x operational mode port link up type'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: f42c5604726d4d21a840418e5668287c
              name: 'Port {#SNMPINDEX}: Interface description'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.61.1.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.name[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: ZYXEL-PORT-MIB
                Descriptive name that identifies this port.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: cfd32eee855647b79c95d6f151f13407
              name: 'Port {#SNMPINDEX}: Operational status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.operstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                The testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL MGS3520-28x port operational status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: abb9d47ee9624d6f9805e6eedd5532c5
                  expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.net.if.operstatus[{#SNMPINDEX}])=2 and last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.net.if.operstatus[{#SNMPINDEX}],#1)<>last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.net.if.operstatus[{#SNMPINDEX}],#2)'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.net.if.operstatus[{#SNMPINDEX}])<>2'
                  name: 'ZYXEL: Port {#SNMPINDEX}: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$IFCONTROL:"{#IFNAME}"}=1` - a user can redefine context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, do not fire for the 'eternal off' interfaces.)
                    
                    WARNING: if closed manually - it will not fire again on the next poll, because of .diff.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 26f87786719c4192949536c74c146b4d
              name: 'Port {#SNMPINDEX}: Outgoing broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.13.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.out.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                broadcast address at this sub-layer, including those that
                were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 4227a6eb8cce4dd8ab582ffce2788e6e
              name: 'Port {#SNMPINDEX}: Outgoing multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.12.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.out.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                multicast address at this sub-layer, including those that
                were discarded or not sent.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 9a7eb0b7569d4111a33d84d03b5018e4
              name: 'Port {#SNMPINDEX}: Outgoing traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.out.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the
                interface, including framing characters.  This object is a
                64-bit version of ifOutOctets.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 768be526caa345b2b23996016a19e217
              name: 'Port {#SNMPINDEX}: Outgoing unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.11.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.out.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were not addressed to a
                multicast or broadcast address at this sub-layer, including
                those that were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: e2b22f4c39974628a4476120b310a6fb
              name: 'Port {#SNMPINDEX}: Outgoing utilization'
              type: CALCULATED
              key: 'zyxel.3520_28.net.if.out.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.3520_28.net.if.out.traffic[{#SNMPINDEX}]) * (last(//zyxel.3520_28.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.3520_28.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.3520_28.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 285f30d057f8438ab0d94367bcd6bdfc
              name: 'Port {#SNMPINDEX}: Speed Duplex'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.61.1.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.net.if.speed_duplex[{#SNMPINDEX}]'
              description: |
                MIB: ZYXEL-PORT-MIB
                Select The speed and the duplex mode of the Ethernet connection on this port. Selecting Auto
                (auto-negotiation) allows one port to negotiate with a peer port automatically to obtain the
                connection speed and duplex mode that both ends support. When auto-negotiation is turned on,
                a port on the Switch negotiates with the peer automatically to determine the connection speed
                and duplex mode. If the peer port does not support auto-negotiation or turns off this feature,
                the Switch determines the connection speed by detecting the signal on the cable and using half
                duplex mode. Thus requiring you to make sure that the settings of the peer port are the same in
                order to connect.
              valuemap:
                name: 'ZYXEL MGS3520-28x operational mode port speed duplex'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
          graph_prototypes:
            - uuid: a7a2aec27f0045eba26e86e8cb08853a
              name: 'ZYXEL MGS3520-28x: Port {#SNMPINDEX}: Packets traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.in.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.out.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.in.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.out.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.in.broadcastpkts[{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.out.broadcastpkts[{#SNMPINDEX}]'
            - uuid: b5446d1f3394422d81ca94dd617d6e95
              name: 'ZYXEL MGS3520-28x: Port {#SNMPINDEX}: Traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.in.traffic[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.out.traffic[{#SNMPINDEX}]'
            - uuid: 7314e57ea54c42d2ac6a341943204c04
              name: 'ZYXEL MGS3520-28x: Port {#SNMPINDEX}: Utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.out.util[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.net.if.in.util[{#SNMPINDEX}]'
          overrides:
            - name: 'Don''t create triggers for matching interface'
              step: '1'
              filter:
                conditions:
                  - macro: '{#ZYXEL.IF.NAME}'
                    value: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: '.*'
                  discover: NO_DISCOVER
        - uuid: c313274b317c42cab5b7dd3c88d0c14b
          name: 'SFP with DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.WARN.MAX},1.3.6.1.4.1.890.1.15.3.84.1.2.1.4,{#ZYXEL.SFP.WARN.MIN},1.3.6.1.4.1.890.1.15.3.84.1.2.1.5,{#ZYXEL.SFP.DESCRIPTION},1.3.6.1.4.1.890.1.15.3.84.1.2.1.7]'
          key: zyxel.3520_28.sfp.ddm.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP DDM module discovery.'
          item_prototypes:
            - uuid: f3f9077d771544bfa666f58b6ae59e9c
              name: 'SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.2.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.sfp.ddm[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: FLOAT
              units: '!{#ZYXEL.SFP.UNIT}'
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module DDM data ({#ZYXEL.SFP.DESCRIPTION}).
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 27cd25ea30fa4f1c9b7b431218241d0c
                  expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.sfp.ddm[{#SNMPINDEX}]) > {#ZYXEL.SFP.WARN.MAX}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION} (over {#ZYXEL.SFP.WARN.MAX}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The upper threshold value of the parameter is exceeded'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 1188909e81c14c23aa9eefbb25a4c367
                  expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.sfp.ddm[{#SNMPINDEX}]) < {#ZYXEL.SFP.WARN.MIN}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION} (less than {#ZYXEL.SFP.WARN.MIN}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The parameter values are less than the lower threshold'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 5d6e873606684351a68d649a8f7cd5d4
              name: 'ZYXEL MGS3520-28x: SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.sfp.ddm[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {
                  	'Temperature': '°C',
                  	'Voltage': 'V',
                  	'TxBias': 'mA',
                  	'TxPower': 'dbm',
                  	'RxPower': 'dbm'
                  };
                  var outArr = [];
                  inArray.forEach(function (item, i, arr) {
                  	item['{#ZYXEL.SFP.PORT}'] = item['{#SNMPINDEX}'].split('.')[0];
                  	item['{#ZYXEL.SFP.UNIT}'] = nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']] === undefined ? "" : nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']];
                  	item['{#ZYXEL.SFP.WARN.MAX}'] /= 100;
                  	item['{#ZYXEL.SFP.WARN.MIN}'] /= 100;
                  	outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: f7ab574d01c848f3a46eed870c5099a4
          name: 'SFP without DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.STATUS},1.3.6.1.4.1.890.1.15.3.84.1.1.1.1]'
          key: zyxel.3520_28.sfp.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP module discovery.'
          item_prototypes:
            - uuid: da89b981488d4a71b1a4c70032669ddc
              name: 'SFP {#SNMPINDEX}: Date code'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.sfp.datecode[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module vendor's manufacturing date code.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 743a5eaf2c1049d4bf517c7e6f1f350d
              name: 'SFP {#SNMPINDEX}: Part number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.sfp.part[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: e40f07be73ca4e15acc109f8565f491b
              name: 'SFP {#SNMPINDEX}: Revision'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.sfp.revision[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Revision level for part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 42db7a2affe54f059015adeae188efea
              name: 'SFP {#SNMPINDEX}: Serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.4.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.sfp.serialnumber[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Serial number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: b9c3894fed8140c684be7c1fe2bbca8d
                  expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.sfp.serialnumber[{#SNMPINDEX}],#1)<>last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.sfp.serialnumber[{#SNMPINDEX}],#2) and length(last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.sfp.serialnumber[{#SNMPINDEX}]))>0'
                  name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced'
                  event_name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced (new serial number received)'
                  priority: INFO
                  description: 'SFP {#SNMPINDEX} serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 8ff52d1298f74fa0a211c80373c25f9b
              name: 'SFP {#SNMPINDEX}: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.sfp.status[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module type.
              valuemap:
                name: 'ZYXEL MGS3520-28x SFP status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b11f1d31e3a04b39b6e9ec40a800a7d5
              name: 'SFP {#SNMPINDEX}: Transceiver'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.sfp.transceiver[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module type names.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 2656c166a30d4ee19465c8e9b2986a10
              name: 'SFP {#SNMPINDEX}: Vendor'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.84.1.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.sfp.vendor[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-TRANSCEIVER-MIB
                Transceiver module vendor name.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
        - uuid: 0fa2bd401cc14847a8fd366b895a6a51
          name: 'Temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.TEMP.THRESH.HIGH},1.3.6.1.4.1.890.1.15.3.26.1.2.1.6,{#ZYXEL.TEMPDESCRIPTION},1.3.6.1.4.1.890.1.15.3.26.1.2.1.2]'
          key: zyxel.3520_28.temp.discovery
          delay: 1h
          description: 'An entry in tempTable.'
          item_prototypes:
            - uuid: bbdae35cdac341ce8f092b693ced4210
              name: 'Temperature "{#ZYXEL.TEMPDESCRIPTION}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.26.1.2.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.temp[{#SNMPINDEX}]'
              units: '!°C'
              description: |
                MIB: ZYXEL-HW-MONITOR-MIB
                The current temperature measured at this sensor
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: c2d4142fb8934eb7b66f5a5e4fa04398
                  expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.temp[{#SNMPINDEX}])>{#ZYXEL.TEMP.THRESH.HIGH}'
                  name: 'ZYXEL: Temperature {#ZYXEL.TEMPDESCRIPTION} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the temperature'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 96fcc6df9a324347a550dd0df84ac15a
              name: 'ZYXEL MGS3520-28x: Temperature "{#ZYXEL.TEMPDESCRIPTION}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.temp[{#SNMPINDEX}]'
        - uuid: b390ed15aca64c49b654734ef35a9d60
          name: 'Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.VOLT.THRESH.LOW},1.3.6.1.4.1.890.1.15.3.26.1.3.1.7,{#ZYXEL.DESCRIPTION},1.3.6.1.4.1.890.1.15.3.26.1.3.1.2]'
          key: zyxel.3520_28.volt.discovery
          delay: 1h
          description: 'An entry in voltageTable.'
          item_prototypes:
            - uuid: 2b00ed37531f4dfc81aa2669cf227854
              name: 'Nominal "{#ZYXEL.DESCRIPTION}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.15.3.26.1.3.1.3.{#SNMPINDEX}]'
              key: 'zyxel.3520_28.volt[{#SNMPINDEX}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: ZYXEL-HW-MONITOR-MIB
                The current voltage reading.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
              trigger_prototypes:
                - uuid: 22b6f2f48eae4167b31c8fe3ccbc138a
                  expression: 'last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.volt[{#SNMPINDEX}])<{#ZYXEL.VOLT.THRESH.LOW}'
                  name: 'ZYXEL: Voltage {#ZYXEL.DESCRIPTION} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the power supply'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 74f0c4aba0db42869c1797c0631b7d03
              name: 'ZYXEL MGS3520-28x: Nominal "{#ZYXEL.DESCRIPTION}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL MGS3520-28x by SNMP'
                    key: 'zyxel.3520_28.volt[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var outArr = []
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.VOLT.THRESH.LOW}"] /= 1000;
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
      tags:
        - tag: class
          value: network
        - tag: target
          value: mgs3520-28
        - tag: target
          value: mgs3520-28f
        - tag: target
          value: switch
        - tag: target
          value: zyxel
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMORY.UTIL.MAX}'
          value: '90'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Threshold for memory utilization'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Time interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
          config:
            type: TEXT
            priority: '1'
            section_name: Filters
            label: 'Filter for interface control (include)'
            description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
          value: 1|2|3|4
          description: |
            Filter of discoverable link types.
            0 - Down link
            1 - Cooper link
            2 - Fiber link
            3 - XFP
            4 - CX4
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Filter for interface link-up type (include)'
            description: |
              Filter of discoverable link types.
              0 - Down link
              1 - Cooper link
              2 - Fiber link
              3 - XFP
              4 - CX4
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by link types.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Filter for interface link-up type (exclude)'
            description: 'Filter to exclude discovered by link types.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable interface names.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for interface name (include)'
            description: 'Filter by discoverable interface names.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered interfaces by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Filter for interface name (exclude)'
            description: 'Filter to exclude discovered interfaces by name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable status.
            0 - OK with DDM
            1 - OK without DDM
            2 - nonoperational
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Filter for SFP status (include)'
            description: |
              Filter of discoverable status.
              0 - OK with DDM
              1 - OK without DDM
              2 - nonoperational
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by status.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Filter for SFP status (exclude)'
            description: 'Filter to exclude discovered by status.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable SFP modules name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Filter for SFP DDM description (include)'
            description: 'Filter by discoverable SFP modules name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
          value: N/A
          description: 'Filter to exclude discovered SFP modules by name.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Filter for SFP DDM description (exclude)'
            description: 'Filter to exclude discovered SFP modules by name.'
        - macro: '{$ZYXEL.LLD.SFP.UPDATE}'
          value: 10m
          description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Update inteval'
            description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
      dashboards:
        - uuid: 49d9e51af89b42759fc2443d3d465f19
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'ZYXEL MGS3520-28x by SNMP'
                        name: 'ZYXEL MGS3520-28x: Port {#SNMPINDEX}: Traffic'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
      valuemaps:
        - uuid: 5c5037a96f084a8182a5fb00f49ff285
          name: 'SNMP available'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: 2b38ddd0e1a34cfab7dd6af9ebf28aca
          name: 'ZYXEL MGS3520-28x operational mode port link up type'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Cooper
            - value: '2'
              newvalue: Fiber
            - value: '3'
              newvalue: XFP
            - value: '4'
              newvalue: CX4
        - uuid: f23ebe496cfc4e659a09eff530b81a24
          name: 'ZYXEL MGS3520-28x operational mode port speed duplex'
          mappings:
            - value: '0'
              newvalue: auto
            - value: '1'
              newvalue: '10M half'
            - value: '2'
              newvalue: '10M full'
            - value: '3'
              newvalue: '100M half'
            - value: '4'
              newvalue: '100M full'
            - value: '5'
              newvalue: '1G full'
            - value: '6'
              newvalue: '10G full'
            - value: '7'
              newvalue: '12G full'
            - value: '8'
              newvalue: '40G full'
            - value: '9'
              newvalue: '1G auto'
        - uuid: 3e0566598e394d80988fb49cd3215922
          name: 'ZYXEL MGS3520-28x port admin status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
        - uuid: 2ffe41460977466cb09bc241b8d22739
          name: 'ZYXEL MGS3520-28x port operational status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
            - value: '4'
              newvalue: Unknown
            - value: '5'
              newvalue: Dormant
            - value: '6'
              newvalue: NotPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: 4443c6780c8f4d16a5f1efd5426db02e
          name: 'ZYXEL MGS3520-28x SFP status'
          mappings:
            - value: '1'
              newvalue: 'OK with DDM'
            - value: '2'
              newvalue: 'OK without DDM'
            - value: '3'
              newvalue: nonoperational
    - uuid: ab18a5665b7d4bed876881b5c4e8ce51
      template: 'ZYXEL XGS-4728F by SNMP'
      name: 'ZYXEL XGS-4728F by SNMP'
      description: |
        ZYXEL XGS-4728F
        
        MIBs used:
        RFC1213-MIB
        HOST-RESOURCES-MIB
        ZYXEL-XGS4728F-MIB
        IF-MIB
        
        Known Issues:
        
          Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
          Version: all versions firmware
          Device: ZYXEL XGS-4728F
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/422668-discussion-thread-for-official-zabbix-templates-for-zyxel
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        https://www.zyxel.com/products_services/xgs_4728f.shtml
        
        ### Known Issues
        
        Description: Incorrect handling of SNMP bulk requests. Disable the use of bulk requests in the SNMP interface settings.
        Version: all versions firmware
        Device: ZYXEL XGS-4728F
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 8b2b855bc92447dda391d251db268dc9
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          valuemap:
            name: 'SNMP available'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: fd9a321842544253896e5a4c1a58ced3
              expression: 'max(/ZYXEL XGS-4728F by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'ZYXEL: No SNMP data collection'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'SNMP is not available for polling. Please check device connectivity and SNMP settings.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 23ae05ce4d5c4022a716ed9e8e701ae9
          name: Contact
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: zyxel.4728f.contact
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The textual identification of the contact person
            for this managed node, together with information
            on how to contact this person.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 1cccb7e7616944aa8747508e96f54968
          name: 'CPU utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.12.7.0]'
          key: zyxel.4728f.cpuusage
          value_type: FLOAT
          units: '%'
          description: |
            MIB: ZYXEL-XGS4728F-MIB
            Show device CPU load in %, it's the snapshot of CPU load when
            getting the values.
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 20f368f955f74fc9b8380b1bbff7e057
              expression: 'min(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.cpuusage,5m)>{$CPU.UTIL.CRIT}'
              name: 'ZYXEL: High CPU utilization'
              event_name: 'ZYXEL: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 222a051f0b84433faa6f29237b6d1552
          name: 'ZyNOS F/W Version'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMP.ARRAY},1.3.6.1.4.1.890.1.5.8.46.1]'
          key: zyxel.4728f.fwversion
          delay: 1h
          value_type: CHAR
          description: 'MIB: ZYXEL-XGS4728F-MIB'
          inventory_link: SOFTWARE_FULL
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var tmpObj = {};
                  inArray.forEach(function(item, i, arr) {
                    tmpObj[item["{#SNMPINDEX}"]] = item["{#SNMP.ARRAY}"]
                  });
                  var strOut = 'V' + tmpObj["1.0"] + '.' + tmpObj["2.0"]
                    + '(' + tmpObj["3.0"] + '.' + tmpObj["4.0"] + ')_'
                    + tmpObj["7.0"] + '.' + tmpObj["6.0"] + '.' + tmpObj["5.0"];
                  return strOut;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 5da304609e8c45d980c46579f6848f0a
              expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.fwversion,#1)<>last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.fwversion,#2) and length(last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.fwversion))>0'
              name: 'ZYXEL: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'Firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 17bdc70663744ede94d7b94602eb881c
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: zyxel.4728f.hw.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized.
            Note that this is different from sysUpTime in the SNMPv2-MIB
            [RFC1907] because sysUpTime is the uptime of the
            network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: cc5065f635bc486cb90898f842fa8a61
          name: Location
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: zyxel.4728f.location
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The physical location of this node (e.g.,
            `telephone closet, 3rd floor').
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 9a646e8e82c844c08754c7e72e161712
          name: 'MAC address'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.2.2.1.6.1]'
          key: zyxel.4728f.mac
          delay: 1h
          value_type: CHAR
          description: |
            MIB: IF-MIB
            The interface's address at the protocol layer
            immediately `below' the network layer in the
            protocol stack.  For interfaces which do not have
            such an address (e.g., a serial line), this object
            should contain an octet string of zero length.
          inventory_link: MACADDRESS_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: a152c262c465441da0f1924bc7614a23
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: zyxel.4728f.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            A textual description of the entity.  This value
            should include the full name and version
            identification of the system's hardware type,
            software operating-system, and networking
            software.  It is mandatory that this only contain
            printable ASCII characters.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 0329f3f5aa6a4315a4f3611ad662103e
              expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.model)<>"XGS-4728F"'
              name: 'ZYXEL: Template does not match hardware'
              priority: INFO
              description: 'This template is for Zyxel XGS-4728F, but connected to {ITEM.VALUE}'
              tags:
                - tag: scope
                  value: notice
        - uuid: 49e365a43809409f8d4636f88e4d64a9
          name: 'Host name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: zyxel.4728f.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            An administratively-assigned name for this
            managed node.  By convention, this is the node's
            fully-qualified domain name.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: b3302cbfbae64d55a638240ffb368b9c
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: zyxel.4728f.net.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: RFC1213-MIB
            The time (in hundredths of a second) since the
            network management portion of the system was last
            re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 79c80ac11d854edea93a598c4b28ffc0
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.1.10.0]'
          key: zyxel.4728f.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ZYXEL-XGS4728F-MIB
            Serial number
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 4df7c31c3079411baabd4ae66e580652
              expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.serialnumber,#1)<>last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.serialnumber,#2) and length(last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.serialnumber))>0'
              name: 'ZYXEL: Device has been replaced'
              event_name: 'ZYXEL: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'Device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: bc0d797343b240bdbd5765dc2e7821fd
          name: 'Fan discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.FANRPM.THRESH.LOW},1.3.6.1.4.1.890.1.5.8.46.9.1.1.5]'
          key: zyxel.4728f.fan.discovery
          delay: 1h
          description: 'An entry in fanRpmTable.'
          item_prototypes:
            - uuid: 6ac1481e18bd419d884a556306e57f18
              name: 'Fan #{#SNMPINDEX}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.9.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.4728f.fan[{#SNMPINDEX}]'
              units: '!rpm'
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Current speed in Revolutions Per Minute (RPM) on the fan.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: sensor
              trigger_prototypes:
                - uuid: 012219b8b16941b59d1f9a3f685e9f38
                  expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.fan[{#SNMPINDEX}])<{#ZYXEL.FANRPM.THRESH.LOW}'
                  name: 'ZYXEL: FAN{#SNMPINDEX} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the fan unit'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 96aed516a0254866b0d0b43095b8a5b7
              name: 'ZYXEL XGS-4728F: Fan #{#SNMPINDEX}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.fan[{#SNMPINDEX}]'
        - uuid: 06f0e151e2a146028f80e60031d49b48
          name: 'Memory pool discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.MEMORY.NAME},1.3.6.1.4.1.890.1.5.8.46.124.1.1.2]'
          key: zyxel.4728f.memory.discovery
          delay: 1h
          item_prototypes:
            - uuid: ead18ee81f074ab68e4104345e5b4b2b
              name: 'Memory "{#ZYXEL.MEMORY.NAME}" utilization'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.124.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.4728f.memory[{#SNMPINDEX}]'
              units: '%'
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Utilization of memory pool in %.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
              trigger_prototypes:
                - uuid: 90b328c3b56c417eb938091338bd07fc
                  expression: 'min(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.memory[{#SNMPINDEX}],5m)>{$MEMORY.UTIL.MAX}'
                  name: 'ZYXEL: High memory utilization in "{#ZYXEL.MEMORY.NAME}" pool'
                  event_name: 'ZYXEL: High memory utilization in "{#ZYXEL.MEMORY.NAME}" pool (>{$MEMORY.UTIL.MAX}% for 5m)'
                  priority: AVERAGE
                  description: 'The system is running out of free memory.'
                  tags:
                    - tag: scope
                      value: performance
        - uuid: 75a0f2676e134b6e8ab9e8c11ac17d57
          name: 'Interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.IF.NAME},1.3.6.1.4.1.890.1.5.8.46.23.1.1.3,{#ZYXEL.IF.LINKUPTYPE},1.3.6.1.4.1.890.1.5.8.46.23.1.1.5]'
          key: zyxel.4728f.net.if.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
              - macro: '{#ZYXEL.IF.LINKUPTYPE}'
                value: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
              - macro: '{#ZYXEL.IF.NAME}'
                value: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 36f7fdbfa4164677ad91351be394f050
              name: 'Port {#SNMPINDEX}: Administrative status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.adminstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The desired state of the interface.  The
                testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL XGS-4728F port admin status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: dbc94a6eabd64eefbe97f57f8831e834
              name: 'Port {#SNMPINDEX}: Interface name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.descr[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: IF-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 840096d5a418425c851ea7d236b7e34e
              name: 'Port {#SNMPINDEX}: Link speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.highspeed[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in bits per second
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 0105dea3226d46f8868aa07aa3f416a2
              name: 'Port {#SNMPINDEX}: Incoming broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.9.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.in.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a broadcast
                address at this sub-layer.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: de7b202e7240422dbdbc40e78689e6fe
              name: 'Port {#SNMPINDEX}: Incoming multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.in.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a multicast
                address at this sub-layer.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 075b04bdaff54a2cafc1b177e59df3be
              name: 'Port {#SNMPINDEX}: Incoming traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.in.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface,
                including framing characters.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: c2a8e3985ed1414789b1bfe226de6d37
              name: 'Port {#SNMPINDEX}: Incoming unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.in.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were not addressed to a multicast
                or broadcast address at this sub-layer
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 72f7ee1e5099452aa4804d988adfb7a5
              name: 'Port {#SNMPINDEX}: Incoming utilization'
              type: CALCULATED
              key: 'zyxel.4728f.net.if.in.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.4728f.net.if.in.traffic[{#SNMPINDEX}]) * (last(//zyxel.4728f.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.4728f.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.4728f.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: db488317d10e43eea21ecaa74d7a58dc
              name: 'Port {#SNMPINDEX}: Link type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.23.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.link_type[{#SNMPINDEX}]'
              description: |
                MIB:  ZYXEL-XGS4728F-MIB
                Physical connection type
              valuemap:
                name: 'ZYXEL XGS-4728F operational mode port link up type'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 8877747043f94216b92ef7f097925d8e
              name: 'Port {#SNMPINDEX}: Interface description'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.23.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.name[{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB:  ZYXEL-XGS4728F-MIB
                A textual string containing information about the interface
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b091be1b0a8f415b82d73b3537cf6187
              name: 'Port {#SNMPINDEX}: Operational status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.operstatus[{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                The testing(3) state indicates that no operational
                packets can be passed.
              valuemap:
                name: 'ZYXEL XGS-4728F port operational status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 3f3ce5111d47490382cb0c18e2d36f77
                  expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.net.if.operstatus[{#SNMPINDEX}])=2 and last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.net.if.operstatus[{#SNMPINDEX}],#1)<>last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.net.if.operstatus[{#SNMPINDEX}],#2)'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.net.if.operstatus[{#SNMPINDEX}])<>2'
                  name: 'ZYXEL: Port {#SNMPINDEX}: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$IFCONTROL:"{#IFNAME}"}=1` - a user can redefine context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, do not fire for the 'eternal off' interfaces.)
                    
                    WARNING: if closed manually - it will not fire again on the next poll, because of .diff.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: ad7378144b254962aad0a73fb151e097
              name: 'Port {#SNMPINDEX}: Outgoing broadcast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.13.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.out.broadcastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                broadcast address at this sub-layer, including those that
                were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 67b776b7f51e4b24bad3b616979d7f98
              name: 'Port {#SNMPINDEX}: Outgoing multicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.12.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.out.multicastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                multicast address at this sub-layer, including those that
                were discarded or not sent.  For a MAC layer protocol, this
                includes both Group and Functional addresses.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 4afef8d3601646f1bfc81090b090c11c
              name: 'Port {#SNMPINDEX}: Outgoing traffic'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.out.traffic[{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the
                interface, including framing characters.  This object is a
                64-bit version of ifOutOctets.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '8'
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: ba1b314aacd0449fa0c9730fdb8ee3f9
              name: 'Port {#SNMPINDEX}: Outgoing unicast packages'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.11.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.out.ucastpkts[{#SNMPINDEX}]'
              units: packets/s
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were not addressed to a
                multicast or broadcast address at this sub-layer, including
                those that were discarded or not sent.
              preprocessing:
                - type: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 7941df5f5b884b33bcda9951e4b0158d
              name: 'Port {#SNMPINDEX}: Outgoing utilization'
              type: CALCULATED
              key: 'zyxel.4728f.net.if.out.util[{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: 'last(//zyxel.4728f.net.if.out.traffic[{#SNMPINDEX}]) * (last(//zyxel.4728f.net.if.highspeed[{#SNMPINDEX}]) <> 0) / ( last(//zyxel.4728f.net.if.highspeed[{#SNMPINDEX}]) + (last(//zyxel.4728f.net.if.highspeed[{#SNMPINDEX}]) = 0) ) * 100'
              description: 'Interface utilization percentage'
              preprocessing:
                - type: IN_RANGE
                  parameters:
                    - '0'
                    - '100'
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - 'return +parseFloat(value).toFixed(0);'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: f56f1c0cf5d34435895ea489eb71b84a
              name: 'Port {#SNMPINDEX}: Speed Duplex'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.23.1.1.1.{#SNMPINDEX}]'
              key: 'zyxel.4728f.net.if.speed_duplex[{#SNMPINDEX}]'
              description: |
                MIB:  ZYXEL-XGS4728F-MIB
                Transmission mode
              valuemap:
                name: 'ZYXEL XGS-4728F operational mode port speed duplex'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
          graph_prototypes:
            - uuid: 18c2bd830caa49308459d64ef85cfc71
              name: 'ZYXEL XGS-4728F: Port {#SNMPINDEX}: Packets traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.in.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.out.ucastpkts[{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.in.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.out.multicastpkts[{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.in.broadcastpkts[{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.out.broadcastpkts[{#SNMPINDEX}]'
            - uuid: a8c07b7801d64c24bfedf10ea193f697
              name: 'ZYXEL XGS-4728F: Port {#SNMPINDEX}: Traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.in.traffic[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.out.traffic[{#SNMPINDEX}]'
            - uuid: 37e8454c3fa04f88be36d875638110c6
              name: 'ZYXEL XGS-4728F: Port {#SNMPINDEX}: Utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.out.util[{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.net.if.in.util[{#SNMPINDEX}]'
          overrides:
            - name: 'Don''t create triggers for matching interface'
              step: '1'
              filter:
                conditions:
                  - macro: '{#ZYXEL.IF.NAME}'
                    value: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
                    operator: NOT_MATCHES_REGEX
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: REGEXP
                  value: '.*'
                  discover: NO_DISCOVER
        - uuid: 6e0b5b991865448780e042d98168d72c
          name: 'SFP with DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.WARN.MAX},1.3.6.1.4.1.890.1.5.8.46.117.2.1.5,{#ZYXEL.SFP.WARN.MIN},1.3.6.1.4.1.890.1.5.8.46.117.2.1.6,{#ZYXEL.SFP.DESCRIPTION},1.3.6.1.4.1.890.1.5.8.46.117.2.1.8]'
          key: zyxel.4728f.sfp.ddm.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
              - macro: '{#ZYXEL.SFP.DESCRIPTION}'
                value: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP DDM module discovery.'
          item_prototypes:
            - uuid: 0071554e36064f7ea40d680a0c310b27
              name: 'SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.117.2.1.7.{#SNMPINDEX}]'
              key: 'zyxel.4728f.sfp.ddm[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: FLOAT
              units: '!{#ZYXEL.SFP.UNIT}'
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Transceiver module DDM data ({#ZYXEL.SFP.DESCRIPTION}).
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 409c52cfed074352810bacfd52aa89f0
                  expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.sfp.ddm[{#SNMPINDEX}]) > {#ZYXEL.SFP.WARN.MAX}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: High {#ZYXEL.SFP.DESCRIPTION} (over {#ZYXEL.SFP.WARN.MAX}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The upper threshold value of the parameter is exceeded'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: a2c40df40a334f6da00a438eb70f8374
                  expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.sfp.ddm[{#SNMPINDEX}]) < {#ZYXEL.SFP.WARN.MIN}'
                  name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION}'
                  event_name: 'ZYXEL: SFP {#ZYXEL.SFP.PORT}: Low {#ZYXEL.SFP.DESCRIPTION} (less than {#ZYXEL.SFP.WARN.MIN}{#ZYXEL.SFP.UNIT})'
                  priority: WARNING
                  description: 'The parameter values are less than the lower threshold'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 109ff7d258524b82bdbf4662e612795b
              name: 'ZYXEL XGS-4728F: SFP {#ZYXEL.SFP.PORT}: {#ZYXEL.SFP.DESCRIPTION}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.sfp.ddm[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {
                  	'Temperature': '°C',
                  	'Voltage': 'V',
                  	'TxBias': 'mA',
                  	'TxPower': 'dbm',
                  	'RxPower': 'dbm'
                  };
                  var outArr = [];
                  inArray.forEach(function (item, i, arr) {
                  	item['{#ZYXEL.SFP.PORT}'] = item['{#SNMPINDEX}'].split('.')[0];
                  	item['{#ZYXEL.SFP.UNIT}'] = nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']] === undefined ? "" : nameMap[item['{#ZYXEL.SFP.DESCRIPTION}']];
                  	item['{#ZYXEL.SFP.WARN.MAX}'] /= 100;
                  	item['{#ZYXEL.SFP.WARN.MIN}'] /= 100;
                  	outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: f8112c4b07ed4bb1b918f58dbb9ec294
          name: 'SFP without DDM discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.SFP.STATUS},1.3.6.1.4.1.890.1.5.8.46.117.1.1.2]'
          key: zyxel.4728f.sfp.discovery
          delay: 12h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
              - macro: '{#ZYXEL.SFP.STATUS}'
                value: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'SFP module discovery.'
          item_prototypes:
            - uuid: 59c000d4324d4e8ca07203843bbea7b5
              name: 'SFP {#SNMPINDEX}: Date code'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.117.1.1.7.{#SNMPINDEX}]'
              key: 'zyxel.4728f.sfp.datecode[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Transceiver module vendor's manufacturing date code.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: c585762763604f83a9d14b7df21188ee
              name: 'SFP {#SNMPINDEX}: Part number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.117.1.1.4.{#SNMPINDEX}]'
              key: 'zyxel.4728f.sfp.part[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 33395170c38043828cedbfbedea959cc
              name: 'SFP {#SNMPINDEX}: Revision'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.117.1.1.6.{#SNMPINDEX}]'
              key: 'zyxel.4728f.sfp.revision[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Revision level for part number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 175f4200563549a0ae1ebaed18eeb636
              name: 'SFP {#SNMPINDEX}: Serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.117.1.1.5.{#SNMPINDEX}]'
              key: 'zyxel.4728f.sfp.serialnumber[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Serial number provided by transceiver module vendor.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
              trigger_prototypes:
                - uuid: 632be557ffed439e98425eaa59361e50
                  expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.sfp.serialnumber[{#SNMPINDEX}],#1)<>last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.sfp.serialnumber[{#SNMPINDEX}],#2) and length(last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.sfp.serialnumber[{#SNMPINDEX}]))>0'
                  name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced'
                  event_name: 'ZYXEL: SFP {#SNMPINDEX} has been replaced (new serial number received)'
                  priority: INFO
                  description: 'SFP {#SNMPINDEX} serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 5d3d0c6135924b2088b2f97d30a743cb
              name: 'SFP {#SNMPINDEX}: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.117.1.1.2.{#SNMPINDEX}]'
              key: 'zyxel.4728f.sfp.status[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Transceiver module status.
              valuemap:
                name: 'ZYXEL XGS-4728F SFP status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: b16f7fe769a74ea99aafaa60a97d286c
              name: 'SFP {#SNMPINDEX}: Transceiver'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.117.1.1.8.{#SNMPINDEX}]'
              key: 'zyxel.4728f.sfp.transceiver[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Transceiver module type names.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
            - uuid: 5abb9b467e934873808b4b49bdd74f5f
              name: 'SFP {#SNMPINDEX}: Vendor'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.117.1.1.3.{#SNMPINDEX}]'
              key: 'zyxel.4728f.sfp.vendor[{#SNMPINDEX}]'
              delay: '{$ZYXEL.LLD.SFP.UPDATE}'
              value_type: CHAR
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                Transceiver module vendor name.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#ZYXEL.IF.NAME}'
                - tag: interface
                  value: '{#SNMPINDEX}'
        - uuid: fa0881c21d834db1b421ae727254bff9
          name: 'Temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.TEMP.THRESH.HIGH},1.3.6.1.4.1.890.1.5.8.46.9.2.1.5]'
          key: zyxel.4728f.temp.discovery
          delay: 1h
          description: |
            An entry in tempTable.
            Index of temperature unit. 1:MAC, 2:CPU, 3:PHY
          item_prototypes:
            - uuid: db030cd64cdc471cb5298ceb9973155a
              name: 'Temperature "{#ZYXEL.TEMP.ID}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.9.2.1.2.{#SNMPINDEX}]'
              key: 'zyxel.4728f.temp[{#SNMPINDEX}]'
              units: '!°C'
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                The current temperature measured at this sensor
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 6181f094ae4c4cf4ae4b2e198e2f9b6e
                  expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.temp[{#SNMPINDEX}])>{#ZYXEL.TEMP.THRESH.HIGH}'
                  name: 'ZYXEL: Temperature {#ZYXEL.TEMP.ID} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the temperature'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 1068300241bb430b8c51048303922e55
              name: 'ZYXEL XGS-4728F: Temperature "{#ZYXEL.TEMP.ID}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.temp[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var nameMap = {"1":"MAC", "2":"CPU", "3":"PHY"};
                  var outArr = [];
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.TEMP.ID}"] = nameMap[item["{#SNMPINDEX}"]]
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
        - uuid: 1fa3870c99d6408dbf78c7f2ad87341d
          name: 'Voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#ZYXEL.VOLT.THRESH.LOW},1.3.6.1.4.1.890.1.5.8.46.9.3.1.6,{#ZYXEL.VOLT.NOMINAL},1.3.6.1.4.1.890.1.5.8.46.9.3.1.5]'
          key: zyxel.4728f.volt.discovery
          delay: 1h
          description: 'An entry in voltageTable.'
          item_prototypes:
            - uuid: 2999674cc176471887c1878b881b8422
              name: 'Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.890.1.5.8.46.9.3.1.2.{#SNMPINDEX}]'
              key: 'zyxel.4728f.volt[{#SNMPINDEX}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: ZYXEL-XGS4728F-MIB
                The current voltage reading.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
              trigger_prototypes:
                - uuid: 631202a132dc44afa90b0537f9957ee1
                  expression: 'last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.volt[{#SNMPINDEX}])<{#ZYXEL.VOLT.THRESH.LOW}'
                  name: 'ZYXEL: Voltage {#ZYXEL.VOLT.NOMINAL} is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the power supply'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 560c37d174e741a6a2590d17574123ed
              name: 'ZYXEL XGS-4728F: Nominal "{#ZYXEL.VOLT.NOMINAL}"'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'ZYXEL XGS-4728F by SNMP'
                    key: 'zyxel.4728f.volt[{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var inArray = JSON.parse(value);
                  var outArr = []
                  inArray.forEach(function(item, i, arr) {
                  item["{#ZYXEL.VOLT.NOMINAL}"] = "+" + item["{#ZYXEL.VOLT.NOMINAL}"] / 1000 + "V";
                  item["{#ZYXEL.VOLT.THRESH.LOW}"] = item["{#ZYXEL.VOLT.THRESH.LOW}"] / 1000;
                  outArr.push(item)
                  });
                  return JSON.stringify(outArr);
      tags:
        - tag: class
          value: network
        - tag: target
          value: switch
        - tag: target
          value: xgs-4728f
        - tag: target
          value: zyxel
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMORY.UTIL.MAX}'
          value: '90'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Threshold for memory utilization'
            description: 'In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Time interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.CONTROL.MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
          config:
            type: TEXT
            priority: '1'
            section_name: Filters
            label: 'Filter for interface control (include)'
            description: 'Triggers will be created only for interfaces whose description contains the value of this macro'
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable link types.
            0 - Down link
            1 - Cooper link
            2 - Fiber link
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Filter for interface link-up type (include)'
            description: |
              Filter of discoverable link types.
              0 - Down link
              1 - Cooper link
              2 - Fiber link
        - macro: '{$ZYXEL.LLD.FILTER.IF.LINKUPTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by link types.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Filter for interface link-up type (exclude)'
            description: 'Filter to exclude discovered by link types.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable interface names.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for interface name (include)'
            description: 'Filter by discoverable interface names.'
        - macro: '{$ZYXEL.LLD.FILTER.IF.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered interfaces by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Filter for interface name (exclude)'
            description: 'Filter to exclude discovered interfaces by name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.MATCHES}'
          value: 1|2
          description: |
            Filter of discoverable status.
            0 - OK with DDM
            1 - OK without DDM
            2 - nonoperational
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Filter for SFP status (include)'
            description: |
              Filter of discoverable status.
              0 - OK with DDM
              1 - OK without DDM
              2 - nonoperational
        - macro: '{$ZYXEL.LLD.FILTER.SFP.STATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by status.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Filter for SFP status (exclude)'
            description: 'Filter to exclude discovered by status.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.MATCHES}'
          value: '.*'
          description: 'Filter by discoverable SFP modules name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Filter for SFP DDM description (include)'
            description: 'Filter by discoverable SFP modules name.'
        - macro: '{$ZYXEL.LLD.FILTER.SFPDDM.DESC.NOT_MATCHES}'
          value: N/A
          description: 'Filter to exclude discovered SFP modules by name.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Filter for SFP DDM description (exclude)'
            description: 'Filter to exclude discovered SFP modules by name.'
        - macro: '{$ZYXEL.LLD.SFP.UPDATE}'
          value: 10m
          description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Update inteval'
            description: 'Receiving data from the SFP module is slow, we do not recommend setting the interval less than 10 minutes.'
      dashboards:
        - uuid: d3ba728ed3e142619d86208285ce16af
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'ZYXEL XGS-4728F by SNMP'
                        name: 'ZYXEL XGS-4728F: Port {#SNMPINDEX}: Traffic'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
      valuemaps:
        - uuid: a7acf3b0ac684d4e80c560bcd3dd2dc6
          name: 'SNMP available'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: 042ccfb45b0a4ef7bc8842f731dd8c4f
          name: 'ZYXEL XGS-4728F operational mode port link up type'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Cooper
            - value: '2'
              newvalue: Fiber
            - value: '3'
              newvalue: XFP
            - value: '4'
              newvalue: CX4
        - uuid: d466ff32531d4eaea989c07aa5989d6b
          name: 'ZYXEL XGS-4728F operational mode port speed duplex'
          mappings:
            - value: '0'
              newvalue: auto
            - value: '1'
              newvalue: '10M half'
            - value: '2'
              newvalue: '10M full'
            - value: '3'
              newvalue: '100M half'
            - value: '4'
              newvalue: '100M full'
            - value: '5'
              newvalue: '1G full'
        - uuid: 250f228ead4b433f987d42014255a617
          name: 'ZYXEL XGS-4728F port admin status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
        - uuid: ed13145eeefd44dda083716080725e60
          name: 'ZYXEL XGS-4728F port operational status'
          mappings:
            - value: '1'
              newvalue: Up
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Testing
            - value: '4'
              newvalue: Unknown
            - value: '5'
              newvalue: Dormant
            - value: '6'
              newvalue: NotPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: 49b0a85b7da947ab91e47ed2f2123907
          name: 'ZYXEL XGS-4728F SFP status'
          mappings:
            - value: '1'
              newvalue: 'OK with DDM'
            - value: '2'
              newvalue: 'OK without DDM'
            - value: '3'
              newvalue: nonoperational
  triggers:
    - uuid: c45583928d204c04ad8884115e1e35c5
      expression: 'min(/Etcd by HTTP/etcd.open.fds,5m)/last(/Etcd by HTTP/etcd.max.fds)*100>{$ETCD.OPEN.FDS.MAX.WARN}'
      name: 'Etcd: Current number of open files is too high'
      event_name: 'Etcd: Current number of open files is too high (over {$ETCD.OPEN.FDS.MAX.WARN}% for 5m)'
      priority: WARNING
      description: |
        Heavy usage of a file descriptor (i.e., near the limit of the process's file descriptor) indicates a potential file descriptor exhaustion issue.
        If the file descriptors are exhausted, `etcd` may panic because it cannot create new WAL files.
      tags:
        - tag: scope
          value: capacity
    - uuid: 2bd6d99edd0f4b2d8045e43e4586b637
      expression: |
        last(/Hikvision camera by HTTP/hikvision_cam.get_info.login_status)=1 or
        last(/Hikvision camera by HTTP/hikvision_cam.get_streaming.login_status)=1 or
        last(/Hikvision camera by HTTP/hikvision_cam.get_status.login_status)=1
      name: 'Hikvision: Authorisation error'
      priority: WARNING
      description: 'Check the correctness of the authorization data'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: 58b5d210fe24434b9aaa365fba764742
      expression: |
        last(/Hikvision camera by HTTP/hikvision_cam.get_info.login_status)=2 or
        last(/Hikvision camera by HTTP/hikvision_cam.get_streaming.login_status)=2 or
        last(/Hikvision camera by HTTP/hikvision_cam.get_status.login_status)=2
      name: 'Hikvision: Error receiving data'
      priority: WARNING
      description: 'Check the availability of the HTTP port'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: ca65a39c019046c29a522a6ca93ceb75
      expression: '(last(/Morningstar ProStar MPPT by SNMP/status.hw.uptime)>0 and last(/Morningstar ProStar MPPT by SNMP/status.hw.uptime)<10m) or (last(/Morningstar ProStar MPPT by SNMP/status.hw.uptime)=0 and last(/Morningstar ProStar MPPT by SNMP/status.net.uptime)<10m)'
      name: 'Morningstar ProStar MPPT: Status: Device has been restarted'
      event_name: 'Morningstar ProStar MPPT: Status: Device has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: dea364bf454746bca6be38d7e0759d06
      expression: '(last(/Morningstar ProStar PWM by SNMP/status.hw.uptime)>0 and last(/Morningstar ProStar PWM by SNMP/status.hw.uptime)<10m) or (last(/Morningstar ProStar PWM by SNMP/status.hw.uptime)=0 and last(/Morningstar ProStar PWM by SNMP/status.net.uptime)<10m)'
      name: 'Morningstar ProStar PWM: Status: Device has been restarted'
      event_name: 'Morningstar ProStar PWM: Status: Device has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: 5393dee9b39d438a8c1553a0be0fb0f2
      expression: '(last(/Morningstar TriStar MPPT 600V by SNMP/status.hw.uptime)>0 and last(/Morningstar TriStar MPPT 600V by SNMP/status.hw.uptime)<10m) or (last(/Morningstar TriStar MPPT 600V by SNMP/status.hw.uptime)=0 and last(/Morningstar TriStar MPPT 600V by SNMP/status.net.uptime)<10m)'
      name: 'Morningstar TriStar MPPT 600V: Status: Device has been restarted'
      event_name: 'Morningstar TriStar MPPT 600V: Status: Device has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: eb7a268bfa324366953221e3c1788127
      expression: '(last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.hw.uptime)>0 and last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.hw.uptime)<10m) or (last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.hw.uptime)=0 and last(/ZYXEL ES3500-8PD by SNMP/zyxel.3500_8pd.net.uptime)<10m)'
      name: 'ZYXEL: Host has been restarted'
      event_name: 'ZYXEL: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: 9899ada82b0e4507948a8a0068e5640d
      expression: '(last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.hw.uptime)>0 and last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.hw.uptime)<10m) or (last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.hw.uptime)=0 and last(/ZYXEL MES3500-10 by SNMP/zyxel.3500_10.net.uptime)<10m)'
      name: 'ZYXEL: Host has been restarted'
      event_name: 'ZYXEL: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: c389b0db83bc404e8cb84ce65db79700
      expression: '(last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.hw.uptime)>0 and last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.hw.uptime)<10m) or (last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.hw.uptime)=0 and last(/ZYXEL MES3500-24 by SNMP/zyxel.3500_24.net.uptime)<10m)'
      name: 'ZYXEL: Host has been restarted'
      event_name: 'ZYXEL: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: 6c8fce36fd9c49569be0ba2bfb70f478
      expression: '(last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.hw.uptime)>0 and last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.hw.uptime)<10m) or (last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.hw.uptime)=0 and last(/ZYXEL MES3500-24S by SNMP/zyxel.3500_24s.net.uptime)<10m)'
      name: 'ZYXEL: Host has been restarted'
      event_name: 'ZYXEL: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: eefe29ad784d40d3980a4cb1118dd816
      expression: '(last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.hw.uptime)>0 and last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.hw.uptime)<10m) or (last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.hw.uptime)=0 and last(/ZYXEL MGS-3712 by SNMP/zyxel.3712.net.uptime)<10m)'
      name: 'ZYXEL: Host has been restarted'
      event_name: 'ZYXEL: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: 6a31fdd61b9f4aa99c8ad15ff243c6b2
      expression: '(last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.hw.uptime)>0 and last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.hw.uptime)<10m) or (last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.hw.uptime)=0 and last(/ZYXEL MGS-3712F by SNMP/zyxel.3712f.net.uptime)<10m)'
      name: 'ZYXEL: Host has been restarted'
      event_name: 'ZYXEL: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: 308761b6dffb44c7b827f6ca76312233
      expression: '(last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.hw.uptime)>0 and last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.hw.uptime)<10m) or (last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.hw.uptime)=0 and last(/ZYXEL MGS3520-28x by SNMP/zyxel.3520_28.net.uptime)<10m)'
      name: 'ZYXEL: Host has been restarted'
      event_name: 'ZYXEL: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
    - uuid: 36b9a7d3d3fb45f782a5ea05de6816f9
      expression: '(last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.hw.uptime)>0 and last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.hw.uptime)<10m) or (last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.hw.uptime)=0 and last(/ZYXEL XGS-4728F by SNMP/zyxel.4728f.net.uptime)<10m)'
      name: 'ZYXEL: Host has been restarted'
      event_name: 'ZYXEL: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: INFO
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      tags:
        - tag: scope
          value: notice
  graphs:
    - uuid: 0662dc480c2b487e9f9afc389166a15b
      name: 'Array: Voltage'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar ProStar MPPT by SNMP'
            key: 'array.sweep_vmp[arrayVmp.0]'
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Morningstar ProStar MPPT by SNMP'
            key: 'array.sweep_voc[arrayVoc.0]'
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Morningstar ProStar MPPT by SNMP'
            key: 'array.voltage[arrayVoltage.0]'
    - uuid: 730d1e1e43224d1ea7b08f53988a7a60
      name: 'Array: Voltage'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar ProStar PWM by SNMP'
            key: 'array.voltage[arrayVoltage.0]'
    - uuid: 6627675fc86645a88d7be9a80c91a8b4
      name: 'Array: Voltage'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar TriStar MPPT 600V by SNMP'
            key: 'array.sweep_vmp[arrayVmpLastSweep.0]'
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Morningstar TriStar MPPT 600V by SNMP'
            key: 'array.sweep_voc[arrayVocLastSweep.0]'
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Morningstar TriStar MPPT 600V by SNMP'
            key: 'array.voltage[arrayVoltage.0]'
    - uuid: 92b561a0aee24da9a7d9875f2293316d
      name: 'Asterisk: Calls stats'
      graph_items:
        - color: 199C0D
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.active_channels
        - sortorder: '1'
          color: F63100
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.active_calls
        - sortorder: '2'
          color: 00611C
          yaxisside: RIGHT
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.calls_processed.rate
    - uuid: 0e5d56155a1240108a4ffc2f3dc041be
      name: 'Asterisk: IAX peers'
      graph_items:
        - color: 199C0D
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.iax.active_channels
        - sortorder: '1'
          color: F63100
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.iax.online
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.iax.offline
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.iax.unmonitored
    - uuid: fd5b051daaf64df89856bec400bbc3a0
      name: 'Asterisk: PJSIP peers'
      graph_items:
        - color: 199C0D
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.pjsip.active_channels
        - sortorder: '1'
          color: F63100
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.pjsip.available
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.pjsip.unavailable
    - uuid: 2781590218fe4cc9ade68446e5d11aa2
      name: 'Asterisk: SIP peers'
      graph_items:
        - color: 199C0D
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.sip.active_channels
        - sortorder: '1'
          color: F63100
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.sip.monitored_online
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.sip.monitored_offline
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.sip.unmonitored_online
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Asterisk by HTTP'
            key: asterisk.sip.unmonitored_offline
    - uuid: 711c5f397c5e4031b36070d20debcc13
      name: 'Battery: Current'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar TriStar MPPT 600V by SNMP'
            key: 'charge.current[batteryCurrent.0]'
    - uuid: 12163228805449dcb48116a1a0b470d9
      name: 'Battery: Output Power (Watts)'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar TriStar MPPT 600V by SNMP'
            key: 'charge.output_power[ outputPower.0]'
    - uuid: 94bbfd8a60a8412998ff617011db9372
      name: 'Current: Charge/Load'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar ProStar MPPT by SNMP'
            key: 'charge.current[chargeCurrent.0]'
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Morningstar ProStar MPPT by SNMP'
            key: 'load.current[loadCurrent.0]'
    - uuid: 252a40cfba4242deac69f8ed77a04b84
      name: 'Current: Charge/Load'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar ProStar PWM by SNMP'
            key: 'charge.current[chargeCurrent.0]'
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Morningstar ProStar PWM by SNMP'
            key: 'load.current[loadCurrent.0]'
    - uuid: 9cf06c8169944ee2974499a4f2764903
      name: 'Envoy Proxy: Clusters'
      graph_items:
        - color: 199C0D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.cluster_manager.active_clusters
        - sortorder: '1'
          color: F63100
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.cluster_manager.warming_clusters
    - uuid: 6453eec1ce9141b0a505d278f842ea1c
      name: 'Envoy Proxy: Clusters operations'
      graph_items:
        - color: 199C0D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.cluster_manager.cluster_removed.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.cluster_manager.cluster_updated.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.cluster_manager.cluster_modified.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.cluster_manager.cluster_added.rate
    - uuid: 0ac65256c79e4eb992afae8fdb7035c9
      name: 'Envoy Proxy: Connections'
      graph_items:
        - color: 199C0D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.server.parent_connections
        - sortorder: '1'
          color: F63100
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.server.memory_heap_size
    - uuid: d06a958289aa4c7a84851f5c9333e746
      name: 'Envoy Proxy: Filesystem operations'
      graph_items:
        - color: 199C0D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.filesystem.reopen_failed.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.filesystem.flushed_by_timer.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.filesystem.write_completed.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.filesystem.write_failed.rate
    - uuid: d3d8733f333942849eadabb86049b5bf
      name: 'Envoy Proxy: Listener manager'
      graph_items:
        - color: 199C0D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.listener_manager.total_listeners_warming
        - sortorder: '1'
          color: F63100
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.listener_manager.total_listeners_draining
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.listener_manager.total_listeners_active
    - uuid: 90ef97d5dfd44349bc08c89acc0b7ec3
      name: 'Envoy Proxy: Listeners operations'
      graph_items:
        - color: 199C0D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.listener_manager.listener_create_failure.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.listener_manager.listener_create_success.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.listener_manager.listener_added.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.listener_manager.listener_stopped.rate
    - uuid: ca3646c18e79468d884af478afab7b0e
      name: 'Envoy Proxy: Memory usage'
      graph_items:
        - color: 199C0D
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.server.memory_physical_size
        - sortorder: '1'
          color: F63100
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.server.memory_heap_size
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Envoy Proxy by HTTP'
            key: envoy.server.memory_allocated
    - uuid: 18baccd03c0f4814a42d32b51334787d
      name: 'Etcd: File descriptors'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Etcd by HTTP'
            key: etcd.open.fds
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'Etcd by HTTP'
            key: etcd.max.fds
    - uuid: eefd07cf30d84cc4b84f802468363200
      name: 'Etcd: gRPC client traffic'
      graph_items:
        - color: 199C0D
          item:
            host: 'Etcd by HTTP'
            key: etcd.network.grpc.received.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Etcd by HTTP'
            key: etcd.network.grpc.sent.rate
    - uuid: c53ee0dba42d4a1f8afedbe0f6e42785
      name: 'Etcd: gRPC requests rate'
      graph_items:
        - color: 199C0D
          item:
            host: 'Etcd by HTTP'
            key: etcd.grpc.received.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Etcd by HTTP'
            key: etcd.grpc.sent.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Etcd by HTTP'
            key: etcd.grpc.started.rate
    - uuid: 520ff92815d84e0f84e9296d249c04ae
      name: 'Etcd: HTTP requests rate'
      graph_items:
        - color: 199C0D
          item:
            host: 'Etcd by HTTP'
            key: etcd.http.requests.4xx.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Etcd by HTTP'
            key: etcd.http.requests.5xx.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Etcd by HTTP'
            key: etcd.http.requests.rate
    - uuid: 90af5b2f75b7402693bad7a8f371ab8e
      name: 'Etcd: Memory usage'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Etcd by HTTP'
            key: etcd.res.bytes
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Etcd by HTTP'
            key: etcd.virtual.bytes
    - uuid: 59cd15292ad04ebd902a7d3080b53838
      name: 'Etcd: Proposals rate'
      graph_items:
        - color: 199C0D
          item:
            host: 'Etcd by HTTP'
            key: etcd.proposals.failed.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Etcd by HTTP'
            key: etcd.proposals.committed.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Etcd by HTTP'
            key: etcd.proposals.applied.rate
        - sortorder: '3'
          drawtype: BOLD_LINE
          color: F7941D
          yaxisside: RIGHT
          item:
            host: 'Etcd by HTTP'
            key: etcd.proposals.pending
    - uuid: b374fab55bcc452e9279214ddb2c8024
      name: 'Etcd: Read/Write rate'
      graph_items:
        - color: 199C0D
          item:
            host: 'Etcd by HTTP'
            key: etcd.reads.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Etcd by HTTP'
            key: etcd.writes.rate
    - uuid: 30cfa75b2afb490f8448a63366577144
      name: 'Hikvision camera: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 1A7C11
          item:
            host: 'Hikvision camera by HTTP'
            key: hikvision_cam.cpu.util
    - uuid: 0cd19b0f8f57435e8b3e1284574e4b79
      name: 'Hikvision camera: Memory'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - color: 1A7C11
          item:
            host: 'Hikvision camera by HTTP'
            key: hikvision_cam.memory.usage
    - uuid: 46bd62563ab9414b868818271a8715ee
      name: 'Nextcloud: Active users'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 81C784
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.active_users.last5m
        - sortorder: '1'
          color: FFD54F
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.active_users.last1h
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: FF5722
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.active_users.last24hours
    - uuid: 7dbbcf04d99842f39292a29b1b71b3de
      name: 'Nextcloud: CPU load'
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 81C784
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.cpu.avg.1m
        - sortorder: '1'
          color: FFD54F
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.cpu.avg.5m
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: FF5722
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.cpu.avg.15m
    - uuid: fff2891ee9f04a9abc259a4cafd4a2a1
      name: 'Nextcloud: Database: size'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 81C784
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.db.size
    - uuid: ced411f851ea4c11805d6bbdd3f20c61
      name: 'Nextcloud: Memory utilization'
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 81C784
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.mem.pused
        - sortorder: '1'
          color: FFD54F
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.swap.pused
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: FF5722
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.php.memory.pused
        - sortorder: '3'
          color: 64B5F6
          item:
            host: 'Nextcloud by HTTP'
            key: nextcloud.serverinfo.php.memory.wasted_percentage
    - uuid: 02652b1251244702bf28f691e72ba27e
      name: 'Temperature: Ambient/Battery/Heatsink'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar ProStar MPPT by SNMP'
            key: 'temp.ambient[ambientTemperature.0]'
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Morningstar ProStar MPPT by SNMP'
            key: 'temp.battery[batteryTemperature.0]'
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Morningstar ProStar MPPT by SNMP'
            key: 'temp.heatsink[heatsinkTemperature.0]'
    - uuid: 94e4d2db752b4c54a8b497516b515fe0
      name: 'Temperature: Ambient/Battery/Heatsink'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar ProStar PWM by SNMP'
            key: 'temp.ambient[ambientTemperature.0]'
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Morningstar ProStar PWM by SNMP'
            key: 'temp.battery[batteryTemperature.0]'
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Morningstar ProStar PWM by SNMP'
            key: 'temp.heatsink[heatsinkTemperature.0]'
    - uuid: 09e9cd48bb6241e8b667e6e1b9f7c3ad
      name: 'Temperature: Battery/Heatsink'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Morningstar TriStar MPPT 600V by SNMP'
            key: 'temp.battery[batteryTemperature.0]'
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Morningstar TriStar MPPT 600V by SNMP'
            key: 'temp.heatsink[heatsinkTemperature.0]'
    - uuid: 2d266c1cab6e462b89975538acc18266
      name: 'ZYXEL ES3500-8PD: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'ZYXEL ES3500-8PD by SNMP'
            key: zyxel.3500_8pd.cpuusage
    - uuid: d44501ff36e1430da2080397868bb8aa
      name: 'ZYXEL MES3500-10: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'ZYXEL MES3500-10 by SNMP'
            key: zyxel.3500_10.cpuusage
    - uuid: ae7d968e6ec942efb4e0b20fd75a5eac
      name: 'ZYXEL MES3500-24: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'ZYXEL MES3500-24 by SNMP'
            key: zyxel.3500_24.cpuusage
    - uuid: 055310b8a5c94d94aeeaf75ff5d2de55
      name: 'ZYXEL MES3500-24S: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'ZYXEL MES3500-24S by SNMP'
            key: zyxel.3500_24s.cpuusage
    - uuid: 21c2da2f53e44f6a8b3fc722e415b4c8
      name: 'ZYXEL MGS-3712: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'ZYXEL MGS-3712 by SNMP'
            key: zyxel.3712.cpuusage
    - uuid: 85bd11f116ef4e3b9695dc783c625f05
      name: 'ZYXEL MGS-3712F: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'ZYXEL MGS-3712F by SNMP'
            key: zyxel.3712f.cpuusage
    - uuid: 13d4a0c9f81647c8ba9f712617c45402
      name: 'ZYXEL MGS3520-28x: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'ZYXEL MGS3520-28x by SNMP'
            key: zyxel.3520_28.cpuusage
    - uuid: dfd68fb23bf349068005997de6b0515a
      name: 'ZYXEL XGS-4728F: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'ZYXEL XGS-4728F by SNMP'
            key: zyxel.4728f.cpuusage
