<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export><version>7.4</version><template_groups><template_group><uuid>a571c0d144b14fd4a87a9d9b2aa9fcd6</uuid><name>Templates/Applications</name></template_group></template_groups><templates><template><uuid>fbb1d6c3478a48f48914375827c987ce</uuid><template>Proxmox VE by HTTP mbuz</template><name>Proxmox VE by HTTP mbuz</name><description>Generated by official Zabbix template tool &quot;Templator&quot; 2.0.0</description><groups><group><name>Templates/Applications</name></group></groups><items><item><uuid>a6342669ea654b238af9bd3e3b42006a</uuid><name>Proxmox: API service status</name><type>SCRIPT</type><key>proxmox.api.available</key><delay>5m</delay><history>7d</history><params>try {
  var params = JSON.parse(value);
  var req = new HttpRequest();
  req.addHeader('Authorization: PVEAPIToken=' + params.token + '=' + params.secret);
  req.get(encodeURI('https://' + params.url + ':' + params.port + '/api2/json/version'));  
} catch (error) {
    Zabbix.log(3, &quot;Proxmox API failed: &quot; + params.url + &quot; Error: &quot; + error);
    if (!Number.isInteger(error))
        return 520;
}
return req.getStatus();</params><description>Get API service status.</description><valuemap><name>HTTP response status code</name></valuemap><preprocessing><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>12h</parameter></parameters></step></preprocessing><timeout>10s</timeout><parameters><parameter><name>port</name><value>{$PVE.URL.PORT}</value></parameter><parameter><name>secret</name><value>{$PVE.TOKEN.SECRET}</value></parameter><parameter><name>token</name><value>{$PVE.TOKEN.ID}</value></parameter><parameter><name>url</name><value>{HOST.CONN}</value></parameter></parameters><tags><tag><tag>component</tag><value>system</value></tag></tags><triggers><trigger><uuid>b4768922fd9d42e0baab93a53c1f62e2</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.api.available) &lt;&gt; 200</expression><name>Proxmox: API service not available</name><opdata>Current value: {ITEM.LASTVALUE1}</opdata><priority>HIGH</priority><description>The API service is not available. Check your network and authorization settings.</description><tags><tag><tag>scope</tag><value>availability</value></tag></tags></trigger></triggers></item><item><uuid>a9cb76300bf4469d983b3e80c7ecd671</uuid><name>Proxmox: Get cluster resources</name><type>HTTP_AGENT</type><key>proxmox.cluster.resources</key><delay>5m</delay><history>0</history><value_type>TEXT</value_type><description>Resources index.</description><preprocessing><step><type>CHECK_NOT_SUPPORTED</type><parameters><parameter>-1</parameter></parameters><error_handler>CUSTOM_VALUE</error_handler><error_handler_params>Error getting data</error_handler_params></step></preprocessing><timeout>3s</timeout><url>https://{HOST.CONN}:{$PVE.URL.PORT}/api2/json/cluster/resources</url><headers><header><name>Authorization</name><value>PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}</value></header></headers><tags><tag><tag>component</tag><value>raw</value></tag></tags></item><item><uuid>c31c0359a934474d8658487aa8b9db2d</uuid><name>Proxmox: Get cluster status</name><type>HTTP_AGENT</type><key>proxmox.cluster.status</key><delay>5m</delay><history>0</history><value_type>TEXT</value_type><description>Get cluster status information.</description><preprocessing><step><type>CHECK_NOT_SUPPORTED</type><parameters><parameter>-1</parameter></parameters><error_handler>CUSTOM_VALUE</error_handler><error_handler_params>Error getting data</error_handler_params></step></preprocessing><timeout>3s</timeout><url>https://{HOST.CONN}:{$PVE.URL.PORT}/api2/json/cluster/status</url><headers><header><name>Authorization</name><value>PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}</value></header></headers><tags><tag><tag>component</tag><value>raw</value></tag></tags></item></items><discovery_rules><discovery_rule><uuid>5159bc915fba4375affae401bbe64622</uuid><name>Cluster discovery</name><type>DEPENDENT</type><key>proxmox.cluster.discovery</key><filter><evaltype>AND</evaltype><conditions><condition><macro>{#RESOURCE.TYPE}</macro><value>^cluster$</value></condition></conditions></filter><lifetime>1d</lifetime><enabled_lifetime_type>DISABLE_AFTER</enabled_lifetime_type><enabled_lifetime>1h</enabled_lifetime><item_prototypes><item_prototype><uuid>b5ed5ebdbc1b42a4b0a77a165bbc1ce3</uuid><name>Proxmox: Cluster [{#RESOURCE.NAME}]: Quorate</name><type>DEPENDENT</type><key>proxmox.cluster.quorate[{#RESOURCE.NAME}]</key><history>7d</history><description>Indicates if there is a majority of nodes online to make decisions.</description><valuemap><name>Cluster quorate</name></valuemap><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.[?(@.name == '{#RESOURCE.NAME}' &amp;&amp; @.type == 'cluster')].quorate.first()</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.cluster.status</key></master_item><tags><tag><tag>cluster</tag><value>{#RESOURCE.NAME}</value></tag><tag><tag>component</tag><value>system</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>874e0012c1444d1487e8957c0500ab8a</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.cluster.quorate[{#RESOURCE.NAME}]) &lt;&gt; 1</expression><name>Proxmox: Cluster [{#RESOURCE.NAME}] not quorum</name><opdata>Current value: {ITEM.LASTVALUE}</opdata><priority>HIGH</priority><description>Proxmox VE use a quorum-based technique to provide a consistent state among all cluster nodes.</description><tags><tag><tag>scope</tag><value>availability</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype></item_prototypes><master_item><key>proxmox.cluster.status</key></master_item><lld_macro_paths><lld_macro_path><lld_macro>{#RESOURCE.NAME}</lld_macro><path>$.name</path></lld_macro_path><lld_macro_path><lld_macro>{#RESOURCE.TYPE}</lld_macro><path>$.type</path></lld_macro_path></lld_macro_paths><preprocessing><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>12h</parameter></parameters></step></preprocessing></discovery_rule><discovery_rule><uuid>2ddd8762c828461dac7090d3bbb9cd1c</uuid><name>LXC discovery</name><type>DEPENDENT</type><key>proxmox.lxc.discovery</key><filter><evaltype>AND</evaltype><conditions><condition><macro>{#RESOURCE.TYPE}</macro><value>^lxc$</value></condition><condition><macro>{#TAGS}</macro><value>{$PVE.TAGS.MATCHES}</value></condition></conditions></filter><lifetime>1d</lifetime><enabled_lifetime_type>DISABLE_AFTER</enabled_lifetime_type><enabled_lifetime>1h</enabled_lifetime><item_prototypes><item_prototype><uuid>1f1e25d74d1744b897352ba907837552</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: CPU usage</name><type>DEPENDENT</type><key>proxmox.lxc.cpu[{#LXC.ID}]</key><history>7d</history><value_type>FLOAT</value_type><units>%</units><description>CPU load.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.cpu</parameter></parameters></step><step><type>MULTIPLIER</type><parameters><parameter>100</parameter></parameters></step></preprocessing><master_item><key>proxmox.lxc.status[{#LXC.ID}]</key></master_item><tags><tag><tag>component</tag><value>cpu</value></tag><tag><tag>lxc</tag><value>{#LXC.ID}</value></tag><tag><tag>name</tag><value>{#LXC.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>dd453388a4af4bac88d16534e460660b</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.lxc.cpu[{#LXC.ID}],5m) &gt; {$PVE.LXC.CPU.PUSE.MAX.WARN:&quot;{#LXC.ID}&quot;}</expression><name>LXC {#LXC.NAME} [{#NODE.NAME}]: high CPU usage</name><event_name>LXC {#LXC.NAME} [{#NODE.NAME}]: high CPU usage (over {$PVE.LXC.CPU.PUSE.MAX.WARN:&quot;{#LXC.ID}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE1}</opdata><priority>WARNING</priority><description>CPU usage.</description><tags><tag><tag>scope</tag><value>performance</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>826691918d994d93915d0b3bded95855</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Disk read, rate</name><type>DEPENDENT</type><key>proxmox.lxc.diskread[{#LXC.ID}]</key><history>7d</history><value_type>FLOAT</value_type><units>Bps</units><description>Disk read.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.diskread</parameter></parameters></step><step><type>CHANGE_PER_SECOND</type></step></preprocessing><master_item><key>proxmox.lxc.status[{#LXC.ID}]</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>lxc</tag><value>{#LXC.ID}</value></tag><tag><tag>name</tag><value>{#LXC.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>cee465895da8411dbcad9daf64c7e731</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Disk write, rate</name><type>DEPENDENT</type><key>proxmox.lxc.diskwrite[{#LXC.ID}]</key><history>7d</history><value_type>FLOAT</value_type><units>Bps</units><description>Disk write.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.diskwrite</parameter></parameters></step><step><type>CHANGE_PER_SECOND</type></step></preprocessing><master_item><key>proxmox.lxc.status[{#LXC.ID}]</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>lxc</tag><value>{#LXC.ID}</value></tag><tag><tag>name</tag><value>{#LXC.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>c6aef57772634bfe9ffd05fc5d20883b</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Memory total</name><type>DEPENDENT</type><key>proxmox.lxc.maxmem[{#LXC.ID}]</key><history>7d</history><value_type>FLOAT</value_type><units>B</units><description>The total memory expressed in bytes.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.maxmem</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.lxc.status[{#LXC.ID}]</key></master_item><tags><tag><tag>component</tag><value>memory</value></tag><tag><tag>lxc</tag><value>{#LXC.ID}</value></tag><tag><tag>name</tag><value>{#LXC.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>d8eb0a79110e47ea879ecc4c588da3a7</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Memory utilization</name><type>CALCULATED</type><key>proxmox.lxc.memutil[{#LXC.ID}]</key><history>7d</history><value_type>FLOAT</value_type><units>%</units><params>(last(//proxmox.lxc.mem[{#LXC.ID}])/last(//proxmox.lxc.maxmem[{#LXC.ID}]))*100</params><description>Utilization of memory in %</description><tags><tag><tag>component</tag><value>memory</value></tag><tag><tag>lxc</tag><value>{#LXC.ID}</value></tag><tag><tag>name</tag><value>{#LXC.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>88ccddbdf4494b22b75e8120fba6e55c</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Memory usage</name><type>DEPENDENT</type><key>proxmox.lxc.mem[{#LXC.ID}]</key><history>7d</history><value_type>FLOAT</value_type><units>B</units><description>Used memory in bytes.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.mem</parameter></parameters></step></preprocessing><master_item><key>proxmox.lxc.status[{#LXC.ID}]</key></master_item><tags><tag><tag>component</tag><value>memory</value></tag><tag><tag>lxc</tag><value>{#LXC.ID}</value></tag><tag><tag>name</tag><value>{#LXC.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>acd05d95f8f44a28b1eb965be436338f</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Incoming data, rate</name><type>DEPENDENT</type><key>proxmox.lxc.netin[{#LXC.ID}]</key><history>7d</history><value_type>FLOAT</value_type><units>bps</units><description>Incoming data rate.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.netin</parameter></parameters></step><step><type>CHANGE_PER_SECOND</type></step><step><type>MULTIPLIER</type><parameters><parameter>8</parameter></parameters></step></preprocessing><master_item><key>proxmox.lxc.status[{#LXC.ID}]</key></master_item><tags><tag><tag>component</tag><value>network</value></tag><tag><tag>lxc</tag><value>{#LXC.ID}</value></tag><tag><tag>name</tag><value>{#LXC.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>8036834290714f0d9580fdd39e01bc7f</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Outgoing data, rate</name><type>DEPENDENT</type><key>proxmox.lxc.netout[{#LXC.ID}]</key><history>7d</history><value_type>FLOAT</value_type><units>bps</units><description>Outgoing data rate.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.netout</parameter></parameters></step><step><type>CHANGE_PER_SECOND</type></step><step><type>MULTIPLIER</type><parameters><parameter>8</parameter></parameters></step></preprocessing><master_item><key>proxmox.lxc.status[{#LXC.ID}]</key></master_item><tags><tag><tag>component</tag><value>network</value></tag><tag><tag>lxc</tag><value>{#LXC.ID}</value></tag><tag><tag>name</tag><value>{#LXC.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>7b1140324ae243db9339b55e172a174f</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Status</name><type>HTTP_AGENT</type><key>proxmox.lxc.status[{#LXC.ID}]</key><history>0</history><value_type>TEXT</value_type><description>Read LXC status.</description><timeout>3s</timeout><url>https://{HOST.CONN}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/{#LXC.ID}/status/current</url><headers><header><name>Authorization</name><value>PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}</value></header></headers><tags><tag><tag>component</tag><value>raw</value></tag></tags></item_prototype><item_prototype><uuid>0e54f1288c7348688236d8c46de73ead</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Uptime</name><type>DEPENDENT</type><key>proxmox.lxc.uptime[{#LXC.ID}]</key><history>2w</history><trends>0</trends><units>uptime</units><description>The system uptime expressed in the following format: &quot;N days, hh:mm:ss&quot;.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.uptime</parameter></parameters></step></preprocessing><master_item><key>proxmox.lxc.status[{#LXC.ID}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>04ad38e0d1934979909425386f55736f</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.lxc.uptime[{#LXC.ID}])&lt;10m</expression><name>LXC {#LXC.NAME} [{#NODE.NAME}]: has been restarted</name><event_name>LXC {#LXC.NAME} [{#NODE.NAME}]: has been restarted (uptime &lt; 10m)</event_name><priority>INFO</priority><description>Uptime is less than 10 minutes.</description><manual_close>YES</manual_close><dependencies><dependency><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Not running</name><expression>last(/Proxmox VE by HTTP mbuz/proxmox.lxc.vmstatus[{#LXC.ID}])&lt;&gt;&quot;running&quot;</expression></dependency></dependencies><tags><tag><tag>scope</tag><value>notice</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>2c4a8961f23a474f98c988d4526c7c8a</uuid><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Status</name><type>DEPENDENT</type><key>proxmox.lxc.vmstatus[{#LXC.ID}]</key><history>7d</history><value_type>CHAR</value_type><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.status</parameter></parameters></step></preprocessing><master_item><key>proxmox.lxc.status[{#LXC.ID}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>8f121cba667f4b2591c34cc928e21b75</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.lxc.vmstatus[{#LXC.ID}])&lt;&gt;&quot;running&quot;</expression><name>LXC {#LXC.NAME} [{#NODE.NAME}]: Not running</name><opdata>Current value: {ITEM.LASTVALUE1}</opdata><priority>AVERAGE</priority><description>LXC state is not &quot;running&quot;.</description><tags><tag><tag>scope</tag><value>notice</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype></item_prototypes><trigger_prototypes><trigger_prototype><uuid>19ed7a6785f24bb4b656748cf7e2c1f4</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.lxc.mem[{#LXC.ID}],5m) / last(/Proxmox VE by HTTP mbuz/proxmox.lxc.maxmem[{#LXC.ID}]) * 100 &gt;{$PVE.LXC.MEMORY.PUSE.MAX.WARN:&quot;{#LXC.ID}&quot;}</expression><name>LXC {#LXC.NAME} [{#NODE.NAME}]: high memory usage</name><event_name>LXC {#LXC.NAME} [{#NODE.NAME}]: high memory usage (over {$PVE.LXC.MEMORY.PUSE.MAX.WARN:&quot;{#LXC.ID}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE1} of {ITEM.LASTVALUE2}</opdata><priority>WARNING</priority><description>Memory usage.</description><tags><tag><tag>scope</tag><value>performance</value></tag></tags></trigger_prototype></trigger_prototypes><graph_prototypes><graph_prototype><uuid>6601319296904dfa96c3c227766614a5</uuid><name>Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: CPU usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.lxc.cpu[{#LXC.ID}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>682ec7aab5ba4ba4842a8eac53e65fe9</uuid><name>Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Disk usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.lxc.diskwrite[{#LXC.ID}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.lxc.diskread[{#LXC.ID}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>0a68b91055884dc1b3ecb5f61319de4e</uuid><name>Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Memory usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.lxc.mem[{#LXC.ID}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.lxc.maxmem[{#LXC.ID}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>2952e309a97a441783fee14b99c969da</uuid><name>Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Network usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.lxc.netin[{#LXC.ID}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.lxc.netout[{#LXC.ID}]</key></item></graph_item></graph_items></graph_prototype></graph_prototypes><master_item><key>proxmox.cluster.resources</key></master_item><lld_macro_paths><lld_macro_path><lld_macro>{#LXC.ID}</lld_macro><path>$.id</path></lld_macro_path><lld_macro_path><lld_macro>{#LXC.NAME}</lld_macro><path>$.name</path></lld_macro_path><lld_macro_path><lld_macro>{#NODE.NAME}</lld_macro><path>$.node</path></lld_macro_path><lld_macro_path><lld_macro>{#RESOURCE.TYPE}</lld_macro><path>$.type</path></lld_macro_path><lld_macro_path><lld_macro>{#TAGS}</lld_macro><path>$.tags</path></lld_macro_path></lld_macro_paths><preprocessing><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>12h</parameter></parameters></step><step><type>JAVASCRIPT</type><parameters><parameter>try {
    // Attempt to parse the incoming value as JSON.
    var response = JSON.parse(value);
    var items_array = null;

    // Check if the JSON is an object containing a 'data' array.
    if (response &amp;&amp; Array.isArray(response.data)) {
        items_array = response.data;
    } 
    // Otherwise, check if the JSON itself is an array.
    else if (Array.isArray(response)) {
        items_array = response;
    }

    // If we successfully found an array of items, process it.
    if (items_array) {
        items_array.forEach(function(item) {
            // Ensure the item is an object and add 'tags' if it's missing.
            if (typeof item === 'object' &amp;&amp; item !== null &amp;&amp; !item.hasOwnProperty('tags')) {
                item.tags = &quot;&quot;;
            }
        });
    }
    
    // Return the full, potentially modified, original structure.
    return JSON.stringify(response);

} catch (e) {
    // If any error occurs (e.g., invalid JSON), return the original value untouched.
    // This allows Zabbix to report the root problem instead of a script failure.
    return value;
}</parameter></parameters></step></preprocessing></discovery_rule><discovery_rule><uuid>f05876c1190b46e8b614a1e7e55e704c</uuid><name>Node discovery</name><type>DEPENDENT</type><key>proxmox.node.discovery</key><filter><evaltype>AND</evaltype><conditions><condition><macro>{#RESOURCE.TYPE}</macro><value>^node$</value></condition></conditions></filter><lifetime>1d</lifetime><enabled_lifetime_type>DISABLE_AFTER</enabled_lifetime_type><enabled_lifetime>1h</enabled_lifetime><item_prototypes><item_prototype><uuid>f9df6a6e290b4b9cbaa2a81e90e7ffe4</uuid><name>Proxmox: Node [{#NODE.NAME}]: CPU, usage</name><type>DEPENDENT</type><key>proxmox.node.cpu[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><discover>NO_DISCOVER</discover><units>%</units><description>CPU usage.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.cpu</parameter></parameters></step><step><type>MULTIPLIER</type><parameters><parameter>100</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>cpu</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>71ae018d6af3402fbca158825e1689cd</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.node.cpu[{#NODE.NAME}],5m) &gt; {$PVE.CPU.PUSE.MAX.WARN:&quot;{#NODE.NAME}&quot;}</expression><name>Proxmox: Node [{#NODE.NAME}] high CPU usage</name><event_name>Proxmox: Node [{#NODE.NAME}] high CPU usage (over {$PVE.CPU.PUSE.MAX.WARN:&quot;{#NODE.NAME}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE1}</opdata><priority>WARNING</priority><description>CPU usage.</description><tags><tag><tag>scope</tag><value>performance</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>1e3c6f5b1e3e4969a9598febaba9d951</uuid><name>Proxmox: Node [{#NODE.NAME}]: CPU, iowait</name><type>DEPENDENT</type><key>proxmox.node.iowait[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><discover>NO_DISCOVER</discover><units>%</units><description>CPU iowait time.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.iowait</parameter></parameters></step><step><type>MULTIPLIER</type><parameters><parameter>100</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>cpu</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>94ba5792f8234ca0962be34f6ffdf1cc</uuid><name>Proxmox: Node [{#NODE.NAME}]: Kernel version</name><type>DEPENDENT</type><key>proxmox.node.kernelversion[{#NODE.NAME}]</key><history>2w</history><value_type>CHAR</value_type><description>Kernel version info.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.kversion</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>1d</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.status[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>b233cbd597b748699577dab49ecf9146</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.node.kernelversion[{#NODE.NAME}],#1)&lt;&gt;last(/Proxmox VE by HTTP mbuz/proxmox.node.kernelversion[{#NODE.NAME}],#2) and length(last(/Proxmox VE by HTTP mbuz/proxmox.node.kernelversion[{#NODE.NAME}]))&gt;0</expression><name>Proxmox: Node [{#NODE.NAME}]: Kernel version has changed</name><opdata>Current value: {ITEM.LASTVALUE1}</opdata><priority>INFO</priority><description>Firmware version has changed. Acknowledge to close the problem manually.</description><manual_close>YES</manual_close><tags><tag><tag>scope</tag><value>notice</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>3a2b126d8acf4f91a0c1f00744fb00b9</uuid><name>Proxmox: Node [{#NODE.NAME}]: CPU, loadavg</name><type>DEPENDENT</type><key>proxmox.node.loadavg[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><discover>NO_DISCOVER</discover><units>%</units><description>CPU average load.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.loadavg</parameter></parameters></step><step><type>MULTIPLIER</type><parameters><parameter>100</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>cpu</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>12a74f3dcc1a4846803c2861a8828aca</uuid><name>Proxmox: Node [{#NODE.NAME}]: Localtime</name><type>DEPENDENT</type><key>proxmox.node.localtime[{#NODE.NAME}]</key><history>7d</history><units>unixtime</units><description>Seconds since 1970-01-01 00:00:00 (local time).</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.localtime</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.time[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>d404b4c3352d4cc7ba69592c96ceacd0</uuid><name>Proxmox: Node [{#NODE.NAME}]: Memory, total</name><type>DEPENDENT</type><key>proxmox.node.memtotal[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><discover>NO_DISCOVER</discover><units>B</units><description>Memory total.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.memtotal</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>memory</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>630672dde4224ea0a5ce47f45e4a0c9c</uuid><name>Proxmox: Node [{#NODE.NAME}]: Memory, used</name><type>DEPENDENT</type><key>proxmox.node.memused[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><discover>NO_DISCOVER</discover><units>B</units><description>Memory usage.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.memused</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>memory</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>423d54e9b9a34b189ebbb7db7d21ddc4</uuid><name>Proxmox: Node [{#NODE.NAME}]: Incoming data, rate</name><type>DEPENDENT</type><key>proxmox.node.netin[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><units>bps</units><description>Network usage.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.netin</parameter></parameters></step><step><type>MULTIPLIER</type><parameters><parameter>8</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>network</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>e804895d278d446cb369902659a91633</uuid><name>Proxmox: Node [{#NODE.NAME}]: Outgoing data, rate</name><type>DEPENDENT</type><key>proxmox.node.netout[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><units>bps</units><description>Network usage.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.netout</parameter></parameters></step><step><type>MULTIPLIER</type><parameters><parameter>8</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>network</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>7ae6031d80cf489289060087eda0c795</uuid><name>Proxmox: Node [{#NODE.NAME}]: Status</name><type>DEPENDENT</type><key>proxmox.node.online[{#NODE.NAME}]</key><history>7d</history><description>Indicates if the node is online or offline.</description><valuemap><name>Node online</name></valuemap><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.[?(@.name == '{#NODE.NAME}' &amp;&amp; @.type == 'node')].online.first()</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.cluster.status</key></master_item><tags><tag><tag>component</tag><value>cluster</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>a885a4e481fe4dcebad9c9dae5ed017c</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.node.online[{#NODE.NAME}]) &lt;&gt; 1</expression><name>Proxmox: Node [{#NODE.NAME}] offline</name><opdata>Current value: {ITEM.LASTVALUE}</opdata><priority>HIGH</priority><description>Node offline.</description><tags><tag><tag>scope</tag><value>availability</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>b01cf767e19d4cf48f92794a8f637460</uuid><name>Proxmox: Node [{#NODE.NAME}]: PVE version</name><type>DEPENDENT</type><key>proxmox.node.pveversion[{#NODE.NAME}]</key><history>2w</history><value_type>CHAR</value_type><description>PVE manager version.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.pveversion</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>1d</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.status[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>534f125e68f74c3ba752948175b581d6</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.node.pveversion[{#NODE.NAME}],#1)&lt;&gt;last(/Proxmox VE by HTTP mbuz/proxmox.node.pveversion[{#NODE.NAME}],#2) and length(last(/Proxmox VE by HTTP mbuz/proxmox.node.pveversion[{#NODE.NAME}]))&gt;0</expression><name>Proxmox: Node [{#NODE.NAME}]: PVE manager has changed</name><opdata>Current value: {ITEM.LASTVALUE1}</opdata><priority>INFO</priority><description>Firmware version has changed. Acknowledge to close the problem manually.</description><manual_close>YES</manual_close><tags><tag><tag>scope</tag><value>notice</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>27966fd01765425aa9d9d480f42a4567</uuid><name>Proxmox: Node [{#NODE.NAME}]: Root filesystem, total</name><type>DEPENDENT</type><key>proxmox.node.roottotal[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><discover>NO_DISCOVER</discover><units>B</units><description>Root filesystem total.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.roottotal</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>ab1c9eefea774a1b96ff2e20f87b3139</uuid><name>Proxmox: Node [{#NODE.NAME}]: Root filesystem, used</name><type>DEPENDENT</type><key>proxmox.node.rootused[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><discover>NO_DISCOVER</discover><units>B</units><description>Root filesystem usage.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.rootused</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>ae18995e15ac4b4c9bb5146943fe25fb</uuid><name>Proxmox: Node [{#NODE.NAME}]: RRD statistics</name><type>HTTP_AGENT</type><key>proxmox.node.rrd[{#NODE.NAME}]</key><history>0</history><value_type>TEXT</value_type><description>Read node RRD statistics.</description><preprocessing><step><type>JAVASCRIPT</type><parameters><parameter>var rrd_data = JSON.parse(value).data;
return JSON.stringify(rrd_data[rrd_data.length - 2])</parameter></parameters></step></preprocessing><timeout>3s</timeout><url>https://{HOST.CONN}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/rrddata</url><query_fields><query_field><name>timeframe</name><value>hour</value></query_field><query_field><name>cf</name><value>AVERAGE</value></query_field></query_fields><headers><header><name>Authorization</name><value>PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}</value></header></headers><tags><tag><tag>component</tag><value>raw</value></tag></tags></item_prototype><item_prototype><uuid>6bcc407823d44a9fafca30b0ecbf8419</uuid><name>Proxmox: Node [{#NODE.NAME}]: Status</name><type>HTTP_AGENT</type><key>proxmox.node.status[{#NODE.NAME}]</key><history>0</history><value_type>TEXT</value_type><description>Read node status.</description><timeout>3s</timeout><url>https://{HOST.CONN}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/status</url><headers><header><name>Authorization</name><value>PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}</value></header></headers><tags><tag><tag>component</tag><value>raw</value></tag></tags></item_prototype><item_prototype><uuid>dc3b33a3e57446cc9a1c5a3ad0c80f38</uuid><name>Proxmox: Node [{#NODE.NAME}]: Swap filesystem, total</name><type>DEPENDENT</type><key>proxmox.node.swaptotal[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><units>B</units><description>Swap total.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.swaptotal</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>bb981c15bc944c84b9cc96857f7f4464</uuid><name>Proxmox: Node [{#NODE.NAME}]: Swap filesystem, used</name><type>DEPENDENT</type><key>proxmox.node.swapused[{#NODE.NAME}]</key><history>7d</history><value_type>FLOAT</value_type><units>B</units><description>Swap used.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.swapused</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.rrd[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>ad3875dd697641afae1c7daa47cb575d</uuid><name>Proxmox: Node [{#NODE.NAME}]: Time zone</name><type>DEPENDENT</type><key>proxmox.node.timezone[{#NODE.NAME}]</key><history>7d</history><value_type>CHAR</value_type><description>Time zone.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.timezone</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>12h</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.time[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>35f2be8b0dcf4522a3571d4e7d42ef10</uuid><name>Proxmox: Node [{#NODE.NAME}]: Time</name><type>HTTP_AGENT</type><key>proxmox.node.time[{#NODE.NAME}]</key><history>0</history><value_type>TEXT</value_type><description>Read server time and time zone settings.</description><timeout>3s</timeout><url>https://{HOST.CONN}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/time</url><headers><header><name>Authorization</name><value>PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}</value></header></headers><tags><tag><tag>component</tag><value>raw</value></tag></tags></item_prototype><item_prototype><uuid>b845fe4328874854a3d5b16bf3038d15</uuid><name>Proxmox: Node [{#NODE.NAME}]: Uptime</name><type>DEPENDENT</type><key>proxmox.node.uptime[{#NODE.NAME}]</key><history>2w</history><trends>0</trends><discover>NO_DISCOVER</discover><units>uptime</units><description>The system uptime expressed in the following format: &quot;N days, hh:mm:ss&quot;.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.uptime</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.status[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>0731e8f671fe4aeba1caf0808515ddf3</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.node.uptime[{#NODE.NAME}])&lt;10m</expression><name>Proxmox: Node [{#NODE.NAME}]: has been restarted</name><event_name>Proxmox: Node [{#NODE.NAME}]: has been restarted (uptime &lt; 10m)</event_name><priority>INFO</priority><description>Uptime is less than 10 minutes.</description><manual_close>YES</manual_close><dependencies><dependency><name>Proxmox: Node [{#NODE.NAME}] offline</name><expression>last(/Proxmox VE by HTTP mbuz/proxmox.node.online[{#NODE.NAME}]) &lt;&gt; 1</expression></dependency></dependencies><tags><tag><tag>scope</tag><value>notice</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>080f3009de8e4e8fa294af8b32667517</uuid><name>Proxmox: Node [{#NODE.NAME}]: Time</name><type>DEPENDENT</type><key>proxmox.node.utctime[{#NODE.NAME}]</key><history>7d</history><units>unixtime</units><description>Seconds since 1970-01-01 00:00:00 UTC.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.time</parameter></parameters></step></preprocessing><master_item><key>proxmox.node.time[{#NODE.NAME}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype></item_prototypes><trigger_prototypes><trigger_prototype><uuid>9f2967a8562c41e483d58a9aa405f996</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.node.memused[{#NODE.NAME}],5m) / last(/Proxmox VE by HTTP mbuz/proxmox.node.memtotal[{#NODE.NAME}]) * 100 &gt;{$PVE.MEMORY.PUSE.MAX.WARN:&quot;{#NODE.NAME}&quot;}</expression><name>Proxmox: Node [{#NODE.NAME}] high memory usage</name><event_name>Proxmox: Node [{#NODE.NAME}] high memory usage (over {$PVE.MEMORY.PUSE.MAX.WARN:&quot;{#NODE.NAME}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE1} of {ITEM.LASTVALUE2}</opdata><priority>WARNING</priority><description>Memory usage.</description><tags><tag><tag>scope</tag><value>performance</value></tag></tags></trigger_prototype><trigger_prototype><uuid>9963001ef5c347b09f4a8cd31010c0bd</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.node.rootused[{#NODE.NAME}],5m) / last(/Proxmox VE by HTTP mbuz/proxmox.node.roottotal[{#NODE.NAME}]) * 100 &gt;{$PVE.ROOT.PUSE.MAX.WARN:&quot;{#NODE.NAME}&quot;}</expression><name>Proxmox: Node [{#NODE.NAME}] high root filesystem space usage</name><event_name>Proxmox: Node [{#NODE.NAME}] high root filesystem space usage (over {$PVE.ROOT.PUSE.MAX.WARN:&quot;{#NODE.NAME}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE1} of {ITEM.LASTVALUE2}</opdata><priority>WARNING</priority><description>Root filesystem space usage.</description><tags><tag><tag>scope</tag><value>capacity</value></tag></tags></trigger_prototype><trigger_prototype><uuid>5d7fb3d3d4184c469298ba8aebe75515</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.node.swapused[{#NODE.NAME}],5m) / last(/Proxmox VE by HTTP mbuz/proxmox.node.swaptotal[{#NODE.NAME}]) * 100 &gt; {$PVE.SWAP.PUSE.MAX.WARN:&quot;{#NODE.NAME}&quot;} and last(/Proxmox VE by HTTP mbuz/proxmox.node.swaptotal[{#NODE.NAME}]) &gt; 0</expression><name>Proxmox: Node [{#NODE.NAME}] high swap usage</name><event_name>Proxmox: Node [{#NODE.NAME}] high swap usage (over {$PVE.SWAP.PUSE.MAX.WARN:&quot;{#NODE.NAME}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE1} of {ITEM.LASTVALUE2}</opdata><priority>WARNING</priority><description>If there is no swap configured, this trigger is ignored.</description><tags><tag><tag>scope</tag><value>capacity</value></tag></tags></trigger_prototype></trigger_prototypes><graph_prototypes><graph_prototype><uuid>7a793c0d363741dc85e1acd7e1a3963c</uuid><name>Proxmox: Node [{#NODE.NAME}]: CPU usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.cpu[{#NODE.NAME}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.iowait[{#NODE.NAME}]</key></item></graph_item><graph_item><sortorder>2</sortorder><drawtype>GRADIENT_LINE</drawtype><color>00611C</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.loadavg[{#NODE.NAME}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>e4053c8c005347259af4c8ca483220bb</uuid><name>Proxmox: Node [{#NODE.NAME}]: Memory usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.memused[{#NODE.NAME}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.memtotal[{#NODE.NAME}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>989db90c70704ffb839dc9cff32aa45b</uuid><name>Proxmox: Node [{#NODE.NAME}]: Network usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.netin[{#NODE.NAME}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.netout[{#NODE.NAME}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>ca3502c1e8ec4ac2ac86057d1b5e6843</uuid><name>Proxmox: Node [{#NODE.NAME}]: Root filesystem usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.rootused[{#NODE.NAME}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.roottotal[{#NODE.NAME}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>ffab7f5306f447a1bd4086cfa2463631</uuid><name>Proxmox: Node [{#NODE.NAME}]: Swap usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.swapused[{#NODE.NAME}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.swaptotal[{#NODE.NAME}]</key></item></graph_item></graph_items></graph_prototype></graph_prototypes><master_item><key>proxmox.cluster.resources</key></master_item><lld_macro_paths><lld_macro_path><lld_macro>{#NODE.NAME}</lld_macro><path>$.node</path></lld_macro_path><lld_macro_path><lld_macro>{#RESOURCE.TYPE}</lld_macro><path>$.type</path></lld_macro_path></lld_macro_paths><preprocessing><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>12h</parameter></parameters></step></preprocessing></discovery_rule><discovery_rule><uuid>e1d67aeb29ef4b5ca1f03036d86f6bb1</uuid><name>QEMU discovery</name><type>DEPENDENT</type><key>proxmox.qemu.discovery</key><filter><evaltype>AND</evaltype><conditions><condition><macro>{#RESOURCE.TYPE}</macro><value>^qemu$</value></condition><condition><macro>{#TAGS}</macro><value>{$PVE.TAGS.MATCHES}</value></condition></conditions></filter><lifetime>1d</lifetime><enabled_lifetime_type>DISABLE_AFTER</enabled_lifetime_type><enabled_lifetime>1h</enabled_lifetime><item_prototypes><item_prototype><uuid>4018d4d217f64f3fb6c3f2cff79ce594</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: CPU usage</name><type>DEPENDENT</type><key>proxmox.qemu.cpu[{#QEMU.ID}]</key><history>7d</history><units>%</units><description>CPU load.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.cpu</parameter></parameters></step><step><type>MULTIPLIER</type><parameters><parameter>100</parameter></parameters></step></preprocessing><master_item><key>proxmox.qemu.status[{#QEMU.ID}]</key></master_item><tags><tag><tag>component</tag><value>cpu</value></tag><tag><tag>name</tag><value>{#QEMU.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>73c29459f12e4e4d9aee5c4855c67804</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.qemu.cpu[{#QEMU.ID}],5m) &gt; {$PVE.VM.CPU.PUSE.MAX.WARN:&quot;{#QEMU.ID}&quot;}</expression><name>VM {#QEMU.NAME} [{#NODE.NAME}]: high CPU usage</name><event_name>VM {#QEMU.NAME} [{#NODE.NAME}]: high CPU usage (over {$PVE.VM.CPU.PUSE.MAX.WARN:&quot;{#QEMU.ID}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE1}</opdata><priority>WARNING</priority><description>CPU usage.</description><tags><tag><tag>scope</tag><value>performance</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>eb361be566424090bf65bc3ff1e0bd43</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Disk read, rate</name><type>DEPENDENT</type><key>proxmox.qemu.diskread[{#QEMU.ID}]</key><history>7d</history><units>Bps</units><description>Disk read.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.diskread</parameter></parameters></step><step><type>CHANGE_PER_SECOND</type></step></preprocessing><master_item><key>proxmox.qemu.status[{#QEMU.ID}]</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>name</tag><value>{#QEMU.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags></item_prototype><item_prototype><uuid>b60b94c552e04c8db0d558c1e4d34a4c</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Disk write, rate</name><type>DEPENDENT</type><key>proxmox.qemu.diskwrite[{#QEMU.ID}]</key><history>7d</history><units>Bps</units><description>Disk write.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.diskwrite</parameter></parameters></step><step><type>CHANGE_PER_SECOND</type></step></preprocessing><master_item><key>proxmox.qemu.status[{#QEMU.ID}]</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>name</tag><value>{#QEMU.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags></item_prototype><item_prototype><uuid>896fea12a92644c0801f89bf21b89959</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Memory total</name><type>DEPENDENT</type><key>proxmox.qemu.maxmem[{#QEMU.ID}]</key><history>7d</history><units>B</units><description>The total memory expressed in bytes.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.maxmem</parameter></parameters></step></preprocessing><master_item><key>proxmox.qemu.status[{#QEMU.ID}]</key></master_item><tags><tag><tag>component</tag><value>memory</value></tag><tag><tag>name</tag><value>{#QEMU.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags></item_prototype><item_prototype><uuid>667e0522d98f466f9056bf4e91ae88ae</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Memory utilization</name><type>CALCULATED</type><key>proxmox.qemu.memutil[{#QEMU.ID}]</key><history>7d</history><units>%</units><params>(last(//proxmox.qemu.mem[{#QEMU.ID}])/last(//proxmox.qemu.maxmem[{#QEMU.ID}]))*100</params><description>Memory utilization in %</description><tags><tag><tag>component</tag><value>memory</value></tag><tag><tag>name</tag><value>{#QEMU.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags></item_prototype><item_prototype><uuid>d17e4429d0c644ee823197bf6fbfb18a</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Memory usage</name><type>DEPENDENT</type><key>proxmox.qemu.mem[{#QEMU.ID}]</key><history>7d</history><units>B</units><description>Used memory in bytes.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.mem</parameter></parameters></step></preprocessing><master_item><key>proxmox.qemu.status[{#QEMU.ID}]</key></master_item><tags><tag><tag>component</tag><value>memory</value></tag><tag><tag>name</tag><value>{#QEMU.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags></item_prototype><item_prototype><uuid>29204a7d73e84513b016247468501e3d</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Incoming data, rate</name><type>DEPENDENT</type><key>proxmox.qemu.netin[{#QEMU.ID}]</key><history>7d</history><units>bps</units><description>Incoming data rate.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.netin</parameter></parameters></step><step><type>CHANGE_PER_SECOND</type></step><step><type>MULTIPLIER</type><parameters><parameter>8</parameter></parameters></step></preprocessing><master_item><key>proxmox.qemu.status[{#QEMU.ID}]</key></master_item><tags><tag><tag>component</tag><value>network</value></tag><tag><tag>name</tag><value>{#QEMU.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags></item_prototype><item_prototype><uuid>adf5594718324a51a3b49bacf1c04ce1</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Outgoing data, rate</name><type>DEPENDENT</type><key>proxmox.qemu.netout[{#QEMU.ID}]</key><history>7d</history><units>bps</units><description>Outgoing data rate.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.netout</parameter></parameters></step><step><type>CHANGE_PER_SECOND</type></step><step><type>MULTIPLIER</type><parameters><parameter>8</parameter></parameters></step></preprocessing><master_item><key>proxmox.qemu.status[{#QEMU.ID}]</key></master_item><tags><tag><tag>component</tag><value>network</value></tag><tag><tag>name</tag><value>{#QEMU.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags></item_prototype><item_prototype><uuid>079629d0f97a45dbae46aa6b389b544e</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Status</name><type>HTTP_AGENT</type><key>proxmox.qemu.status[{#QEMU.ID}]</key><history>0</history><value_type>TEXT</value_type><description>Read VM status.</description><timeout>3s</timeout><url>https://{HOST.CONN}:{$PVE.URL.PORT}/api2/json/nodes/{#NODE.NAME}/{#QEMU.ID}/status/current</url><headers><header><name>Authorization</name><value>PVEAPIToken={$PVE.TOKEN.ID}={$PVE.TOKEN.SECRET}</value></header></headers><tags><tag><tag>component</tag><value>raw</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags></item_prototype><item_prototype><uuid>bc9f464d5c1c4ff0990e602f6a7b93bf</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Uptime</name><type>DEPENDENT</type><key>proxmox.qemu.uptime[{#QEMU.ID}]</key><history>2w</history><trends>0</trends><units>uptime</units><description>The system uptime expressed in the following format: &quot;N days, hh:mm:ss&quot;.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.uptime</parameter></parameters></step></preprocessing><master_item><key>proxmox.qemu.status[{#QEMU.ID}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>d2d9c798f4354667aa72ff3e9559f43f</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.qemu.uptime[{#QEMU.ID}])&lt;10m</expression><name>VM {#QEMU.NAME} [{#NODE.NAME}]: has been restarted</name><event_name>VM {#QEMU.NAME} [{#NODE.NAME}]: has been restarted (uptime &lt; 10m)</event_name><priority>INFO</priority><description>Uptime is less than 10 minutes.</description><manual_close>YES</manual_close><dependencies><dependency><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Not running</name><expression>last(/Proxmox VE by HTTP mbuz/proxmox.qemu.vmstatus[{#QEMU.ID}])&lt;&gt;&quot;running&quot;</expression></dependency></dependencies><tags><tag><tag>scope</tag><value>notice</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>5e224a5a38ae464f973285a21936118f</uuid><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Status</name><type>DEPENDENT</type><key>proxmox.qemu.vmstatus[{#QEMU.ID}]</key><history>7d</history><value_type>CHAR</value_type><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data.status</parameter></parameters></step></preprocessing><master_item><key>proxmox.qemu.status[{#QEMU.ID}]</key></master_item><tags><tag><tag>component</tag><value>system</value></tag><tag><tag>vm</tag><value>{#QEMU.ID}</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>ad9ec9afc6ce44a59591a6b3b718266a</uuid><expression>last(/Proxmox VE by HTTP mbuz/proxmox.qemu.vmstatus[{#QEMU.ID}])&lt;&gt;&quot;running&quot;</expression><name>VM {#QEMU.NAME} [{#NODE.NAME}]: Not running</name><opdata>Current value: {ITEM.LASTVALUE1}</opdata><priority>AVERAGE</priority><description>VM state is not &quot;running&quot;.</description><tags><tag><tag>scope</tag><value>notice</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype></item_prototypes><trigger_prototypes><trigger_prototype><uuid>06c79a4051c84923b8d141715fd65f95</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.qemu.mem[{#QEMU.ID}],5m) / last(/Proxmox VE by HTTP mbuz/proxmox.qemu.maxmem[{#QEMU.ID}]) * 100 &gt;{$PVE.VM.MEMORY.PUSE.MAX.WARN:&quot;{#QEMU.ID}&quot;}</expression><name>VM {#QEMU.NAME} [{#NODE.NAME}]: high memory usage</name><event_name>VM {#QEMU.NAME} [{#NODE.NAME}]: high memory usage (over {$PVE.VM.MEMORY.PUSE.MAX.WARN:&quot;{#QEMU.ID}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE1} of {ITEM.LASTVALUE2}</opdata><priority>WARNING</priority><description>Memory usage.</description><manual_close>YES</manual_close><tags><tag><tag>scope</tag><value>performance</value></tag></tags></trigger_prototype></trigger_prototypes><graph_prototypes><graph_prototype><uuid>81dcde5931714c9db136dfc8b9d83de1</uuid><name>Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: CPU usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.qemu.cpu[{#QEMU.ID}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>c93fd1b43a9542b18ffadfb30f989b5b</uuid><name>Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Disk usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.qemu.diskwrite[{#QEMU.ID}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.qemu.diskread[{#QEMU.ID}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>33645b268c8f4bd193c929f5f21e4ad9</uuid><name>Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Memory usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.qemu.mem[{#QEMU.ID}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.qemu.maxmem[{#QEMU.ID}]</key></item></graph_item></graph_items></graph_prototype><graph_prototype><uuid>10437b74f59248c9a8a463dde0a22e84</uuid><name>Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Network usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.qemu.netin[{#QEMU.ID}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.qemu.netout[{#QEMU.ID}]</key></item></graph_item></graph_items></graph_prototype></graph_prototypes><master_item><key>proxmox.cluster.resources</key></master_item><lld_macro_paths><lld_macro_path><lld_macro>{#NODE.NAME}</lld_macro><path>$.node</path></lld_macro_path><lld_macro_path><lld_macro>{#QEMU.ID}</lld_macro><path>$.id</path></lld_macro_path><lld_macro_path><lld_macro>{#QEMU.NAME}</lld_macro><path>$.name</path></lld_macro_path><lld_macro_path><lld_macro>{#RESOURCE.TYPE}</lld_macro><path>$.type</path></lld_macro_path><lld_macro_path><lld_macro>{#TAGS}</lld_macro><path>$.tags</path></lld_macro_path></lld_macro_paths><preprocessing><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>12h</parameter></parameters></step><step><type>JAVASCRIPT</type><parameters><parameter>try {
    // Attempt to parse the incoming value as JSON.
    var response = JSON.parse(value);
    var items_array = null;

    // Check if the JSON is an object containing a 'data' array.
    if (response &amp;&amp; Array.isArray(response.data)) {
        items_array = response.data;
    } 
    // Otherwise, check if the JSON itself is an array.
    else if (Array.isArray(response)) {
        items_array = response;
    }

    // If we successfully found an array of items, process it.
    if (items_array) {
        items_array.forEach(function(item) {
            // Ensure the item is an object and add 'tags' if it's missing.
            if (typeof item === 'object' &amp;&amp; item !== null &amp;&amp; !item.hasOwnProperty('tags')) {
                item.tags = &quot;&quot;;
            }
        });
    }
    
    // Return the full, potentially modified, original structure.
    return JSON.stringify(response);

} catch (e) {
    // If any error occurs (e.g., invalid JSON), return the original value untouched.
    // This allows Zabbix to report the root problem instead of a script failure.
    return value;
}</parameter></parameters></step></preprocessing></discovery_rule><discovery_rule><uuid>9b99f9cc37024dc49c836e467d8f23dd</uuid><name>Storage discovery</name><type>DEPENDENT</type><key>proxmox.storage.discovery</key><filter><evaltype>AND</evaltype><conditions><condition><macro>{#RESOURCE.TYPE}</macro><value>^storage$</value></condition><condition><macro>{#STORAGE.NAME}</macro><value>{$PVE.STORAGE.NOT.MATCH}</value><operator>NOT_MATCHES_REGEX</operator></condition></conditions></filter><lifetime>1d</lifetime><enabled_lifetime_type>DISABLE_AFTER</enabled_lifetime_type><enabled_lifetime>1h</enabled_lifetime><item_prototypes><item_prototype><uuid>795b6965ba33419c979d114094bf0f7b</uuid><name>Storage {#STORAGE.NAME} [{#NODE.NAME}]: Content</name><type>DEPENDENT</type><key>proxmox.node.content[{#NODE.NAME},{#STORAGE.NAME}]</key><history>7d</history><value_type>CHAR</value_type><description>Allowed storage content types.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data[?(@.id == &quot;storage/{#NODE.NAME}/{#STORAGE.NAME}&quot;)].content.first()</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>12h</parameter></parameters></step></preprocessing><master_item><key>proxmox.cluster.resources</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>name</tag><value>{#STORAGE.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>5d9fcea842cd4ce1a774c40e71113363</uuid><name>Storage {#STORAGE.NAME} [{#NODE.NAME}]: Free</name><type>CALCULATED</type><key>proxmox.node.diskfree[{#NODE.NAME},{#STORAGE.NAME}]</key><history>7d</history><units>B</units><params>last(//proxmox.node.maxdisk[{#NODE.NAME},{#STORAGE.NAME}])-last(//proxmox.node.disk[{#NODE.NAME},{#STORAGE.NAME}])</params><description>Used disk space in bytes.</description><preprocessing><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>name</tag><value>{#STORAGE.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>7b11841645514560a6dfc9b96261a310</uuid><name>Proxmox: Storage [{#NODE.NAME}/{#STORAGE.NAME}]: Utilization</name><type>CALCULATED</type><key>proxmox.node.diskutil[{#NODE.NAME},{#STORAGE.NAME}]</key><value_type>FLOAT</value_type><units>%</units><params>(last(//proxmox.node.disk[{#NODE.NAME},{#STORAGE.NAME}])/ last(//proxmox.node.maxdisk[{#NODE.NAME},{#STORAGE.NAME}]))*100</params><preprocessing><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>name</tag><value>{#STORAGE.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags><trigger_prototypes><trigger_prototype><uuid>1dcbe720b8aa4325907d2a05f29ceb0d</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.node.diskutil[{#NODE.NAME},{#STORAGE.NAME}],5m) &gt;{$PVE.STORAGE.PUSE.MAX.WARN:&quot;{#NODE.NAME}/{#STORAGE.NAME}&quot;}</expression><name>Storage {#STORAGE.NAME} [{#NODE.NAME}]: high filesystem space usage</name><event_name>Storage {#STORAGE.NAME} [{#NODE.NAME}]: high filesystem space usage (over {$PVE.STORAGE.PUSE.MAX.WARN:&quot;{#NODE.NAME}/{#STORAGE.NAME}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE}</opdata><priority>WARNING</priority><description>Root filesystem space usage.</description><tags><tag><tag>scope</tag><value>capacity</value></tag></tags></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><uuid>bc04adb93c364fee8740161577e00571</uuid><name>Storage {#STORAGE.NAME} [{#NODE.NAME}]: Used</name><type>DEPENDENT</type><key>proxmox.node.disk[{#NODE.NAME},{#STORAGE.NAME}]</key><history>7d</history><units>B</units><description>Used disk space in bytes.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data[?(@.id == &quot;storage/{#NODE.NAME}/{#STORAGE.NAME}&quot;)].disk.first()</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.cluster.resources</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>name</tag><value>{#STORAGE.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>b5493dec3d04486681aeae32603f7a84</uuid><name>Storage {#STORAGE.NAME} [{#NODE.NAME}]: Size</name><type>DEPENDENT</type><key>proxmox.node.maxdisk[{#NODE.NAME},{#STORAGE.NAME}]</key><history>7d</history><units>B</units><description>Storage size in bytes.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data[?(@.id == &quot;storage/{#NODE.NAME}/{#STORAGE.NAME}&quot;)].maxdisk.first()</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>10m</parameter></parameters></step></preprocessing><master_item><key>proxmox.cluster.resources</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>name</tag><value>{#STORAGE.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype><item_prototype><uuid>15e54cca0b2641a2ad318f2fb1e8fdf5</uuid><name>Storage {#STORAGE.NAME} [{#NODE.NAME}]: Type</name><type>DEPENDENT</type><key>proxmox.node.plugintype[{#NODE.NAME},{#STORAGE.NAME}]</key><history>7d</history><value_type>CHAR</value_type><description>More specific type, if available.</description><preprocessing><step><type>JSONPATH</type><parameters><parameter>$.data[?(@.id == &quot;storage/{#NODE.NAME}/{#STORAGE.NAME}&quot;)].plugintype.first()</parameter></parameters></step><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>12h</parameter></parameters></step></preprocessing><master_item><key>proxmox.cluster.resources</key></master_item><tags><tag><tag>component</tag><value>storage</value></tag><tag><tag>name</tag><value>{#STORAGE.NAME}</value></tag><tag><tag>node</tag><value>{#NODE.NAME}</value></tag></tags></item_prototype></item_prototypes><trigger_prototypes><trigger_prototype><uuid>1ca384ddfbed4fe9aebfca609a9bad55</uuid><expression>min(/Proxmox VE by HTTP mbuz/proxmox.node.disk[{#NODE.NAME},{#STORAGE.NAME}],5m) / last(/Proxmox VE by HTTP mbuz/proxmox.node.maxdisk[{#NODE.NAME},{#STORAGE.NAME}]) * 100 &gt;{$PVE.STORAGE.PUSE.MAX.WARN:&quot;{#NODE.NAME}/{#STORAGE.NAME}&quot;}</expression><name>Storage {#STORAGE.NAME} [{#NODE.NAME}]: high filesystem space usage</name><event_name>Storage {#STORAGE.NAME} [{#NODE.NAME}]: high filesystem space usage (over {$PVE.STORAGE.PUSE.MAX.WARN:&quot;{#NODE.NAME}/{#STORAGE.NAME}&quot;}% use)</event_name><opdata>Current use: {ITEM.LASTVALUE1} of {ITEM.LASTVALUE2}</opdata><status>DISABLED</status><priority>WARNING</priority><description>Root filesystem space usage.</description><tags><tag><tag>scope</tag><value>capacity</value></tag></tags></trigger_prototype></trigger_prototypes><graph_prototypes><graph_prototype><uuid>fd4419730469448f9cd776c9552ff851</uuid><name>Proxmox: Storage [{#NODE.NAME}/{#STORAGE.NAME}]: Usage</name><graph_items><graph_item><drawtype>GRADIENT_LINE</drawtype><color>199C0D</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.disk[{#NODE.NAME},{#STORAGE.NAME}]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>GRADIENT_LINE</drawtype><color>F63100</color><item><host>Proxmox VE by HTTP mbuz</host><key>proxmox.node.maxdisk[{#NODE.NAME},{#STORAGE.NAME}]</key></item></graph_item></graph_items></graph_prototype></graph_prototypes><master_item><key>proxmox.cluster.resources</key></master_item><lld_macro_paths><lld_macro_path><lld_macro>{#NODE.NAME}</lld_macro><path>$.node</path></lld_macro_path><lld_macro_path><lld_macro>{#RESOURCE.TYPE}</lld_macro><path>$.type</path></lld_macro_path><lld_macro_path><lld_macro>{#STORAGE.NAME}</lld_macro><path>$.storage</path></lld_macro_path></lld_macro_paths><preprocessing><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><parameters><parameter>12h</parameter></parameters></step></preprocessing></discovery_rule></discovery_rules><tags><tag><tag>class</tag><value>software</value></tag><tag><tag>target</tag><value>proxmox</value></tag></tags><macros><macro><macro>{$PVE.CPU.PUSE.MAX.WARN}</macro><value>90</value><description>Maximum used CPU in percentage.</description></macro><macro><macro>{$PVE.LXC.CPU.PUSE.MAX.WARN}</macro><value>90</value><description>Maximum used CPU in percentage.</description></macro><macro><macro>{$PVE.LXC.MEMORY.PUSE.MAX.WARN}</macro><value>90</value><description>Maximum used memory in percentage.</description></macro><macro><macro>{$PVE.MEMORY.PUSE.MAX.WARN}</macro><value>90</value><description>Maximum used memory in percentage.</description></macro><macro><macro>{$PVE.ROOT.PUSE.MAX.WARN}</macro><value>90</value><description>Maximum used root space in percentage.</description></macro><macro><macro>{$PVE.STORAGE.NOT.MATCH}</macro></macro><macro><macro>{$PVE.STORAGE.PUSE.MAX.WARN}</macro><value>90</value><description>Maximum used storage space in percentage.</description></macro><macro><macro>{$PVE.SWAP.PUSE.MAX.WARN}</macro><value>90</value><description>Maximum used swap space in percentage.</description></macro><macro><macro>{$PVE.TAGS.MATCHES}</macro><value>^.*$</value><description>Used to discovery only LXC/QEMU with a specific tag</description></macro><macro><macro>{$PVE.TOKEN.ID}</macro><value>USER@REALM!TOKENID</value><description>API tokens allow stateless access to most parts of the REST API by another system, software or API client.</description></macro><macro><macro>{$PVE.TOKEN.SECRET}</macro><value>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</value><description>Secret key.</description></macro><macro><macro>{$PVE.URL.PORT}</macro><value>8006</value><description>The API uses the HTTPS protocol and the server listens to port 8006 by default.</description></macro><macro><macro>{$PVE.VM.CPU.PUSE.MAX.WARN}</macro><value>90</value><description>Maximum used CPU in percentage.</description></macro><macro><macro>{$PVE.VM.MEMORY.PUSE.MAX.WARN}</macro><value>90</value><description>Maximum used memory in percentage.</description></macro></macros><valuemaps><valuemap><uuid>36f68668699746e19f5ccec5ae687857</uuid><name>Cluster quorate</name><mappings><mapping><value>1</value><newvalue>Yes</newvalue></mapping><mapping><value>0</value><newvalue>No</newvalue></mapping></mappings></valuemap><valuemap><uuid>dcf924bbbf8b4db7a6fe675a18b3f6aa</uuid><name>HTTP response status code</name><mappings><mapping><value>100</value><newvalue>Continue</newvalue></mapping><mapping><value>101</value><newvalue>Switching Protocols</newvalue></mapping><mapping><value>102</value><newvalue>Processing</newvalue></mapping><mapping><value>200</value><newvalue>OK</newvalue></mapping><mapping><value>201</value><newvalue>Created</newvalue></mapping><mapping><value>202</value><newvalue>Accepted</newvalue></mapping><mapping><value>203</value><newvalue>Non-Authoritative Information</newvalue></mapping><mapping><value>204</value><newvalue>No Content</newvalue></mapping><mapping><value>205</value><newvalue>Reset Content</newvalue></mapping><mapping><value>206</value><newvalue>Partial Content</newvalue></mapping><mapping><value>207</value><newvalue>Multi-Status</newvalue></mapping><mapping><value>208</value><newvalue>Already Reported</newvalue></mapping><mapping><value>226</value><newvalue>IM Used</newvalue></mapping><mapping><value>300</value><newvalue>Multiple Choices</newvalue></mapping><mapping><value>301</value><newvalue>Moved Permanently</newvalue></mapping><mapping><value>302</value><newvalue>Found</newvalue></mapping><mapping><value>303</value><newvalue>See Other</newvalue></mapping><mapping><value>304</value><newvalue>Not Modified</newvalue></mapping><mapping><value>305</value><newvalue>Use Proxy</newvalue></mapping><mapping><value>306</value><newvalue>Switch Proxy</newvalue></mapping><mapping><value>307</value><newvalue>Temporary Redirect</newvalue></mapping><mapping><value>308</value><newvalue>Permanent Redirect/Resume Incomplete</newvalue></mapping><mapping><value>400</value><newvalue>Bad Request</newvalue></mapping><mapping><value>401</value><newvalue>Unauthorized</newvalue></mapping><mapping><value>402</value><newvalue>Payment Required</newvalue></mapping><mapping><value>403</value><newvalue>Forbidden</newvalue></mapping><mapping><value>404</value><newvalue>Not Found</newvalue></mapping><mapping><value>405</value><newvalue>Method Not Allowed</newvalue></mapping><mapping><value>406</value><newvalue>Not Acceptable</newvalue></mapping><mapping><value>407</value><newvalue>Proxy Authentication Required</newvalue></mapping><mapping><value>408</value><newvalue>Request Timeout</newvalue></mapping><mapping><value>409</value><newvalue>Conflict</newvalue></mapping><mapping><value>410</value><newvalue>Gone</newvalue></mapping><mapping><value>411</value><newvalue>Length Required</newvalue></mapping><mapping><value>412</value><newvalue>Precondition Failed</newvalue></mapping><mapping><value>413</value><newvalue>Payload Too Large</newvalue></mapping><mapping><value>414</value><newvalue>Request-URI Too Long</newvalue></mapping><mapping><value>415</value><newvalue>Unsupported Media Type</newvalue></mapping><mapping><value>416</value><newvalue>Requested Range Not Satisfiable</newvalue></mapping><mapping><value>417</value><newvalue>Expectation Failed</newvalue></mapping><mapping><value>418</value><newvalue>I'm a Teapot</newvalue></mapping><mapping><value>419</value><newvalue>Authentication Timeout</newvalue></mapping><mapping><value>420</value><newvalue>Method Failure/Enhance Your Calm</newvalue></mapping><mapping><value>421</value><newvalue>Misdirected Request</newvalue></mapping><mapping><value>422</value><newvalue>Unprocessable Entity</newvalue></mapping><mapping><value>423</value><newvalue>Locked</newvalue></mapping><mapping><value>424</value><newvalue>Failed Dependency</newvalue></mapping><mapping><value>426</value><newvalue>Upgrade Required</newvalue></mapping><mapping><value>428</value><newvalue>Precondition Required</newvalue></mapping><mapping><value>429</value><newvalue>Too Many Requests</newvalue></mapping><mapping><value>431</value><newvalue>Request Header Fields Too Large</newvalue></mapping><mapping><value>440</value><newvalue>Login Timeout</newvalue></mapping><mapping><value>444</value><newvalue>No Response</newvalue></mapping><mapping><value>449</value><newvalue>Retry With</newvalue></mapping><mapping><value>450</value><newvalue>Blocked by Windows Parental Controls</newvalue></mapping><mapping><value>451</value><newvalue>Unavailable for Legal Reasons/Redirect</newvalue></mapping><mapping><value>494</value><newvalue>Request Header Too Large</newvalue></mapping><mapping><value>495</value><newvalue>Cert Error</newvalue></mapping><mapping><value>496</value><newvalue>No Cert</newvalue></mapping><mapping><value>497</value><newvalue>HTTP to HTTPS</newvalue></mapping><mapping><value>498</value><newvalue>Token Expired/Invalid</newvalue></mapping><mapping><value>499</value><newvalue>Client Closed Request/Token Required</newvalue></mapping><mapping><value>500</value><newvalue>Internal Server Error</newvalue></mapping><mapping><value>501</value><newvalue>Not Implemented</newvalue></mapping><mapping><value>502</value><newvalue>Bad Gateway</newvalue></mapping><mapping><value>503</value><newvalue>Service Unavailable</newvalue></mapping><mapping><value>504</value><newvalue>Gateway Timeout</newvalue></mapping><mapping><value>505</value><newvalue>HTTP Version Not Supported</newvalue></mapping><mapping><value>506</value><newvalue>Variant Also Negotiates</newvalue></mapping><mapping><value>507</value><newvalue>Insufficient Storage</newvalue></mapping><mapping><value>508</value><newvalue>Loop Detected</newvalue></mapping><mapping><value>509</value><newvalue>Bandwidth Limit Exceeded</newvalue></mapping><mapping><value>510</value><newvalue>Not Extended</newvalue></mapping><mapping><value>511</value><newvalue>Network Authentication Required</newvalue></mapping><mapping><value>520</value><newvalue>Unknown Error</newvalue></mapping><mapping><value>598</value><newvalue>Network Read Timeout Error</newvalue></mapping><mapping><value>599</value><newvalue>Network Connect Timeout Error</newvalue></mapping></mappings></valuemap><valuemap><uuid>385e54d3159a4141887d3afee5e7f531</uuid><name>Node online</name><mappings><mapping><value>1</value><newvalue>Online</newvalue></mapping><mapping><value>0</value><newvalue>Offline</newvalue></mapping></mappings></valuemap></valuemaps></template></templates></zabbix_export>
