Update HID template for displayprinter.asp compatibility, add template guidelines

HID Template Changes:
- Rename "Ribbon Remaining" to "Ribbon Level" (matches displayprinter.asp filter)
- Add preprocessing to convert raw print count to percentage (500-print YMCKO)
- Update triggers to use percentage thresholds (15% warning, 5% critical)
- Change key from hid.ribbon.remaining to hid.ribbon.level

README - Template Guidelines for ShopDB Integration:
- Supply items MUST include "Level" in name to appear in displayprinter.asp
- Values MUST be percentages (0-100) for progress bar display
- UUIDs MUST be valid UUIDv4 (32 hex chars, no dashes)
- Triggers MUST be nested inside items, not at template level
- Include preprocessing examples for converting raw counts to percentages

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-17 14:15:37 -05:00
parent 9e92b89482
commit 18846e1e1c
2 changed files with 68 additions and 231 deletions

View File

@@ -311,35 +311,45 @@ zabbix_export:
value: performance
- uuid: cc5821dc024f47b49ea1a75062d8a479
name: Ribbon Remaining
name: Ribbon Level
type: SNMP_AGENT
snmp_oid: 'get[1.3.6.1.4.1.28959.3.255.1.16.0]'
key: hid.ribbon.remaining
key: hid.ribbon.level
delay: 5m
history: 90d
trends: 365d
value_type: UNSIGNED
units: prints
description: 'Ribbon remaining count (estimated prints left)'
value_type: FLOAT
units: '%'
description: 'Ribbon level as percentage (based on 500-print YMCKO ribbon capacity)'
tags:
- tag: component
value: supplies
- tag: type
value: consumable
preprocessing:
- type: JAVASCRIPT
parameters:
- |
// Convert raw print count to percentage
// YMCKO ribbon capacity: 500 prints
var remaining = parseInt(value, 10);
if (isNaN(remaining)) return 0;
var percent = (remaining / 500) * 100;
return Math.min(100, Math.max(0, percent.toFixed(1)));
triggers:
- uuid: 0b6570b2126544579ca5e3bfd3569574
expression: 'last(/HID Fargo DTC4500e Card Printer/hid.ribbon.remaining)<75'
name: 'HID DTC4500e: Ribbon low on {HOST.NAME} (less than 75 prints remaining)'
expression: 'last(/HID Fargo DTC4500e Card Printer/hid.ribbon.level)<15'
name: 'HID DTC4500e: Ribbon low on {HOST.NAME}'
priority: WARNING
description: 'Ribbon is running low, less than 75 prints remaining'
description: 'Ribbon is running low (less than 15%)'
tags:
- tag: scope
value: capacity
- uuid: 7e580066c3cd4a42bfe90092e7485f8c
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)'
expression: 'last(/HID Fargo DTC4500e Card Printer/hid.ribbon.level)<5'
name: 'HID DTC4500e: Ribbon critically low on {HOST.NAME}'
priority: HIGH
description: 'Ribbon is critically low, less than 25 prints remaining'
description: 'Ribbon is critically low (less than 5%)'
tags:
- tag: scope
value: capacity