Files
snmp-scanner/zabbix_template_hid_dtc4500e.json
cproudlock 451d8ec73d Fix HID template structure: move triggers inside items
Triggers must be nested under their related items, not at template level.
Also updated ribbon thresholds for YMCKO color ribbons (75/25).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 14:03:23 -05:00

662 lines
22 KiB
JSON

{
"zabbix_export": {
"version": "7.4",
"template_groups": [
{
"uuid": "3cd4e8d0b828464e8f4b3becf13a9dbd",
"name": "Printers"
}
],
"templates": [
{
"uuid": "a8f3d2e1b5c74a9e8d6f0c3b2a1e9d8c",
"template": "HID Fargo DTC4500e Card Printer",
"name": "HID Fargo DTC4500e Card Printer",
"description": "Template for HID Fargo DTC4500e ID Card Printer\nUses HID Enterprise MIB (1.3.6.1.4.1.28959)\n\nMonitors:\n- Printer status and health\n- Print counts (current and lifetime)\n- Ribbon/supply levels\n- Firmware version\n- Status flags (hopper, film, errors)\n",
"groups": [
{
"name": "Printers"
}
],
"items": [
{
"uuid": "b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6",
"name": "System Description",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.2.1.1.1.0]",
"key": "hid.sysdescr",
"delay": "1h",
"history": "90d",
"trends": "0",
"value_type": "TEXT",
"description": "System description from sysDescr MIB",
"tags": [
{
"tag": "component",
"value": "system"
},
{
"tag": "type",
"value": "info"
}
]
},
{
"uuid": "c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7",
"name": "System Uptime",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.2.1.1.3.0]",
"key": "hid.uptime",
"delay": "5m",
"history": "90d",
"trends": "365d",
"value_type": "FLOAT",
"units": "uptime",
"description": "System uptime in ticks (divide by 100 for seconds)",
"tags": [
{
"tag": "component",
"value": "system"
},
{
"tag": "type",
"value": "performance"
}
],
"preprocessing": [
{
"type": "MULTIPLIER",
"parameters": [
"0.01"
]
}
]
},
{
"uuid": "d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8",
"name": "System Name",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.2.1.1.5.0]",
"key": "hid.sysname",
"delay": "1h",
"history": "90d",
"trends": "0",
"value_type": "TEXT",
"description": "System name (hostname)",
"tags": [
{
"tag": "component",
"value": "system"
},
{
"tag": "type",
"value": "info"
}
]
},
{
"uuid": "e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9",
"name": "System Location",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.2.1.1.6.0]",
"key": "hid.syslocation",
"delay": "1h",
"history": "90d",
"trends": "0",
"value_type": "TEXT",
"description": "System location",
"tags": [
{
"tag": "component",
"value": "system"
},
{
"tag": "type",
"value": "info"
}
]
},
{
"uuid": "f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0",
"name": "Printer Model",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.6.0]",
"key": "hid.model",
"delay": "1h",
"history": "90d",
"trends": "0",
"value_type": "TEXT",
"description": "Printer model name from HID MIB",
"tags": [
{
"tag": "component",
"value": "printer"
},
{
"tag": "type",
"value": "info"
}
],
"preprocessing": [
{
"type": "JAVASCRIPT",
"parameters": [
"// Convert hex-encoded SNMP string to ASCII\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n var hexBytes = value.match(/[0-9A-Fa-f]{2}/g);\n if (hexBytes && hexBytes.length > 0) {\n var result = '';\n for (var i = 0; i < hexBytes.length; i++) {\n var code = parseInt(hexBytes[i], 16);\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) return result;\n }\n}\nreturn value.replace(/[^\\x20-\\x7E]/g, '');\n"
]
}
]
},
{
"uuid": "a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1",
"name": "Printer Serial Number",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.7.0]",
"key": "hid.serial",
"delay": "1h",
"history": "90d",
"trends": "0",
"value_type": "TEXT",
"description": "Printer serial number from HID MIB",
"tags": [
{
"tag": "component",
"value": "printer"
},
{
"tag": "type",
"value": "info"
}
],
"preprocessing": [
{
"type": "JAVASCRIPT",
"parameters": [
"// Convert hex-encoded SNMP string to ASCII\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n var hexBytes = value.match(/[0-9A-Fa-f]{2}/g);\n if (hexBytes && hexBytes.length > 0) {\n var result = '';\n for (var i = 0; i < hexBytes.length; i++) {\n var code = parseInt(hexBytes[i], 16);\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) return result;\n }\n}\nreturn value.replace(/[^\\x20-\\x7E]/g, '');\n"
]
}
]
},
{
"uuid": "b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2",
"name": "Firmware Version",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.8.0]",
"key": "hid.firmware",
"delay": "1d",
"history": "90d",
"trends": "0",
"value_type": "TEXT",
"description": "Printer firmware version",
"tags": [
{
"tag": "component",
"value": "printer"
},
{
"tag": "type",
"value": "info"
}
],
"preprocessing": [
{
"type": "JAVASCRIPT",
"parameters": [
"// Convert hex-encoded SNMP string to ASCII\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n var hexBytes = value.match(/[0-9A-Fa-f]{2}/g);\n if (hexBytes && hexBytes.length > 0) {\n var result = '';\n for (var i = 0; i < hexBytes.length; i++) {\n var code = parseInt(hexBytes[i], 16);\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) return result;\n }\n}\nreturn value.replace(/[^\\x20-\\x7E]/g, '');\n"
]
}
]
},
{
"uuid": "c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3",
"name": "Printer Status Code",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.4.0]",
"key": "hid.status.code",
"delay": "1m",
"history": "90d",
"trends": "365d",
"value_type": "UNSIGNED",
"description": "Printer status code (0=Unknown, 1=Offline, 2=Standby, 3=Ready, 4=Printing, 5=Error)",
"tags": [
{
"tag": "component",
"value": "printer"
},
{
"tag": "type",
"value": "status"
}
],
"valuemap": {
"name": "HID Printer Status"
},
"triggers": [
{
"uuid": "a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3",
"expression": "last(/HID Fargo DTC4500e Card Printer/hid.status.code)=5",
"name": "HID DTC4500e: Printer in error state on {HOST.NAME}",
"priority": "HIGH",
"description": "Printer is reporting an error condition",
"tags": [
{
"tag": "scope",
"value": "availability"
}
]
},
{
"uuid": "a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9",
"expression": "nodata(/HID Fargo DTC4500e Card Printer/hid.status.code,15m)=1",
"name": "HID DTC4500e: No SNMP data received on {HOST.NAME}",
"priority": "AVERAGE",
"description": "No SNMP data received for 15 minutes - printer may be offline",
"tags": [
{
"tag": "scope",
"value": "availability"
}
]
}
]
},
{
"uuid": "d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4",
"name": "Printer Status Flags",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.10.0]",
"key": "hid.status.flags",
"delay": "1m",
"history": "7d",
"trends": "0",
"value_type": "TEXT",
"description": "Status flags string containing component states:\nDH=Door/Hopper, IH=Input Hopper, LM=Laminator, FL=Film,\nMG=Magnetic, SM=Smart Module, SC=Smart Card, PE=Paper Empty\nValues: 0=OK, 1=Warning/Active\n",
"tags": [
{
"tag": "component",
"value": "printer"
},
{
"tag": "type",
"value": "status"
}
],
"preprocessing": [
{
"type": "JAVASCRIPT",
"parameters": [
"// Convert hex-encoded SNMP string to ASCII\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n var hexBytes = value.match(/[0-9A-Fa-f]{2}/g);\n if (hexBytes && hexBytes.length > 0) {\n var result = '';\n for (var i = 0; i < hexBytes.length; i++) {\n var code = parseInt(hexBytes[i], 16);\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) return result;\n }\n}\nreturn value.replace(/[^\\x20-\\x7E]/g, '');\n"
]
}
]
},
{
"uuid": "e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5",
"name": "Current Print Count",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.9.0]",
"key": "hid.prints.current",
"delay": "5m",
"history": "90d",
"trends": "365d",
"value_type": "UNSIGNED",
"units": "cards",
"description": "Current session or ribbon print count",
"tags": [
{
"tag": "component",
"value": "counter"
},
{
"tag": "type",
"value": "performance"
}
]
},
{
"uuid": "f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6",
"name": "Total Lifetime Prints",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.12.0]",
"key": "hid.prints.lifetime",
"delay": "1h",
"history": "90d",
"trends": "365d",
"value_type": "UNSIGNED",
"units": "cards",
"description": "Total lifetime card prints",
"tags": [
{
"tag": "component",
"value": "counter"
},
{
"tag": "type",
"value": "performance"
}
]
},
{
"uuid": "a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7",
"name": "Ribbon Remaining",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.16.0]",
"key": "hid.ribbon.remaining",
"delay": "5m",
"history": "90d",
"trends": "365d",
"value_type": "UNSIGNED",
"units": "prints",
"description": "Ribbon remaining count (estimated prints left)",
"tags": [
{
"tag": "component",
"value": "supplies"
},
{
"tag": "type",
"value": "consumable"
}
],
"triggers": [
{
"uuid": "e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7",
"expression": "last(/HID Fargo DTC4500e Card Printer/hid.ribbon.remaining)<75",
"name": "HID DTC4500e: Ribbon low on {HOST.NAME} (less than 75 prints remaining)",
"priority": "WARNING",
"description": "Ribbon is running low, less than 75 prints remaining",
"tags": [
{
"tag": "scope",
"value": "capacity"
}
]
},
{
"uuid": "f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8",
"expression": "last(/HID Fargo DTC4500e Card Printer/hid.ribbon.remaining)<25",
"name": "HID DTC4500e: Ribbon critically low on {HOST.NAME} (less than 25 prints remaining)",
"priority": "HIGH",
"description": "Ribbon is critically low, less than 25 prints remaining",
"tags": [
{
"tag": "scope",
"value": "capacity"
}
]
}
]
},
{
"uuid": "b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8",
"name": "Error Count",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.11.0]",
"key": "hid.errors",
"delay": "5m",
"history": "90d",
"trends": "365d",
"value_type": "UNSIGNED",
"description": "Error count or error state",
"tags": [
{
"tag": "component",
"value": "printer"
},
{
"tag": "type",
"value": "error"
}
]
},
{
"uuid": "c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9",
"name": "Card Count in Hopper",
"type": "SNMP_AGENT",
"snmp_oid": "get[1.3.6.1.4.1.28959.3.255.1.13.0]",
"key": "hid.hopper.count",
"delay": "5m",
"history": "90d",
"trends": "365d",
"value_type": "UNSIGNED",
"units": "cards",
"description": "Estimated cards remaining in input hopper",
"tags": [
{
"tag": "component",
"value": "supplies"
},
{
"tag": "type",
"value": "consumable"
}
]
},
{
"uuid": "d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0",
"name": "Door/Hopper Status",
"type": "DEPENDENT",
"key": "hid.status.door",
"delay": "0",
"history": "90d",
"trends": "0",
"value_type": "UNSIGNED",
"description": "Door/Hopper status extracted from flags (0=Closed/OK, 1=Open/Warning)",
"master_item": {
"key": "hid.status.flags"
},
"tags": [
{
"tag": "component",
"value": "printer"
},
{
"tag": "type",
"value": "status"
}
],
"preprocessing": [
{
"type": "JAVASCRIPT",
"parameters": [
"var match = value.match(/DH:(\\d)/);\nreturn match ? match[1] : '0';\n"
]
}
],
"valuemap": {
"name": "HID Door Status"
},
"triggers": [
{
"uuid": "b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4",
"expression": "last(/HID Fargo DTC4500e Card Printer/hid.status.door)=1",
"name": "HID DTC4500e: Door/Hopper open on {HOST.NAME}",
"priority": "WARNING",
"description": "Printer door or hopper is open",
"tags": [
{
"tag": "scope",
"value": "notice"
}
]
}
]
},
{
"uuid": "e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1",
"name": "Film/Ribbon Loaded",
"type": "DEPENDENT",
"key": "hid.status.film",
"delay": "0",
"history": "90d",
"trends": "0",
"value_type": "UNSIGNED",
"description": "Film/Ribbon loaded status (0=Not Loaded, 1=Loaded)",
"master_item": {
"key": "hid.status.flags"
},
"tags": [
{
"tag": "component",
"value": "supplies"
},
{
"tag": "type",
"value": "status"
}
],
"preprocessing": [
{
"type": "JAVASCRIPT",
"parameters": [
"var match = value.match(/FL:(\\d)/);\nreturn match ? match[1] : '0';\n"
]
}
],
"valuemap": {
"name": "HID Film Status"
},
"triggers": [
{
"uuid": "c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5",
"expression": "last(/HID Fargo DTC4500e Card Printer/hid.status.film)=0",
"name": "HID DTC4500e: Film/Ribbon not loaded on {HOST.NAME}",
"priority": "WARNING",
"description": "Printer film or ribbon is not loaded",
"tags": [
{
"tag": "scope",
"value": "availability"
}
]
}
]
},
{
"uuid": "f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2",
"name": "Input Hopper Status",
"type": "DEPENDENT",
"key": "hid.status.inputhopper",
"delay": "0",
"history": "90d",
"trends": "0",
"value_type": "UNSIGNED",
"description": "Input hopper status (0=OK, 1=Empty/Warning)",
"master_item": {
"key": "hid.status.flags"
},
"tags": [
{
"tag": "component",
"value": "supplies"
},
{
"tag": "type",
"value": "status"
}
],
"preprocessing": [
{
"type": "JAVASCRIPT",
"parameters": [
"var match = value.match(/IH:(\\d)/);\nreturn match ? match[1] : '0';\n"
]
}
],
"valuemap": {
"name": "HID Hopper Status"
},
"triggers": [
{
"uuid": "d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6",
"expression": "last(/HID Fargo DTC4500e Card Printer/hid.status.inputhopper)=1",
"name": "HID DTC4500e: Input hopper empty on {HOST.NAME}",
"priority": "WARNING",
"description": "Input hopper is empty or has a warning",
"tags": [
{
"tag": "scope",
"value": "availability"
}
]
}
]
}
],
"valuemaps": [
{
"uuid": "b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0",
"name": "HID Printer Status",
"mappings": [
{
"value": "0",
"newvalue": "Unknown"
},
{
"value": "1",
"newvalue": "Offline"
},
{
"value": "2",
"newvalue": "Standby"
},
{
"value": "3",
"newvalue": "Ready"
},
{
"value": "4",
"newvalue": "Printing"
},
{
"value": "5",
"newvalue": "Error"
}
]
},
{
"uuid": "c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1",
"name": "HID Door Status",
"mappings": [
{
"value": "0",
"newvalue": "Closed"
},
{
"value": "1",
"newvalue": "Open"
}
]
},
{
"uuid": "d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2",
"name": "HID Film Status",
"mappings": [
{
"value": "0",
"newvalue": "Not Loaded"
},
{
"value": "1",
"newvalue": "Loaded"
}
]
},
{
"uuid": "e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3",
"name": "HID Hopper Status",
"mappings": [
{
"value": "0",
"newvalue": "OK"
},
{
"value": "1",
"newvalue": "Empty/Warning"
}
]
}
]
}
]
}
}