cproudlock 53f8a821cd Fix inverted door/hopper status interpretation
Based on user testing:
- DH:1 = Closed/OK (not Open as assumed)
- DH:0 = Open/Warning

Changes:
- Invert door status trigger: fire on =0, not =1
- Update valuemap: 0=Open, 1=Closed
- Update description to reflect correct interpretation

Note: Hopper card count (OID .1.13.0) may report inaccurate values
from printer firmware - this is a hardware/firmware limitation.

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

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

SNMP Scanner / Zabbix Templates

This repository contains SNMP-based Zabbix templates and related tooling for monitoring network devices.

Zabbix Template Requirements for ShopDB Integration

Templates created here are used with the ShopDB displayprinter.asp page, which pulls supply data from Zabbix via API. To ensure compatibility:

Supply Level Items

For supply items to appear in displayprinter.asp, they must:

  1. Include "Level" in the item name - The page filters for items containing "Level"

    • Good: Ribbon Level, Toner Level Black, Ink Level Cyan
    • Bad: Ribbon Remaining, Toner Count, Ink Status
  2. Return a percentage value (0-100) - The page displays items as progress bars

    • If the SNMP OID returns a raw count, add preprocessing to convert to percentage
    • Example: For a 500-print ribbon, use JavaScript preprocessing:
      var remaining = parseInt(value, 10);
      var percent = (remaining / 500) * 100;
      return Math.min(100, Math.max(0, percent.toFixed(1)));
      
  3. Use appropriate units - Set units: '%' for percentage values

Example Item Structure

- uuid: <valid-uuidv4>
  name: Ribbon Level           # Must contain "Level"
  type: SNMP_AGENT
  snmp_oid: 'get[1.3.6.1.4.1.xxx]'
  key: device.ribbon.level
  value_type: FLOAT
  units: '%'                   # Percentage
  preprocessing:
  - type: JAVASCRIPT
    parameters:
    - |
      // Convert raw count to percentage
      var remaining = parseInt(value, 10);
      var capacity = 500;  // Adjust per consumable
      return Math.min(100, Math.max(0, (remaining / capacity) * 100));

Zabbix Import Requirements

  • UUIDs must be valid UUIDv4 - 32 hex characters without dashes
  • Triggers must be nested inside items - Not at the template level
  • Generate UUIDs with: python3 -c "import uuid; print(uuid.uuid4().hex)"

Templates

Template Device Notes
zabbix_template_hid_dtc4500e.yaml HID Fargo DTC4500e Card Printer YMCKO 500-print ribbon
  • ShopDB: /home/camp/projects/windows/shopdb/
  • Zabbix API integration: shopdb/includes/zabbix_all_supplies.asp
  • Display page: shopdb/displayprinter.asp
Description
SNMP scanner for printer discovery and Zabbix template generation
Readme 226 KiB
Languages
Python 99.6%
Shell 0.4%