Documents:
- Zabbix template requirements for ShopDB integration
- Supply item naming rules ("Level" in name, percentage values)
- YAML structure (triggers inside items, valid UUIDv4)
- Common import errors and fixes
- HID DTC4500e device-specific notes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.6 KiB
2.6 KiB
SNMP Scanner - Claude Code Instructions
Project Overview
Repository for SNMP-based Zabbix templates and network device monitoring tools. Templates created here integrate with the ShopDB application for displaying supply levels.
Repository Location
- Local:
/home/camp/projects/python/snmp-scanner/ - Gitea:
http://localhost:3000/cproudlock/snmp-scanner
Key Files
| File | Purpose |
|---|---|
zabbix_template_*.yaml |
Zabbix monitoring templates |
README.md |
Template guidelines for ShopDB integration |
Zabbix Template Requirements
For displayprinter.asp Compatibility
Supply level items MUST follow these rules to appear in ShopDB:
-
Item name must contain "Level"
name: Ribbon Level # Good - will appear name: Ribbon Remaining # Bad - filtered out -
Value must be percentage (0-100)
- Add preprocessing if SNMP returns raw counts
- Use JavaScript to convert:
(remaining / capacity) * 100
-
Use
units: '%'for percentage values
Zabbix YAML Structure
# UUIDs: 32 hex chars, no dashes
uuid: 97f742974686406aa8be1394d18dcb5f
# Triggers go INSIDE items, not at template level
items:
- uuid: abc123...
name: Some Item
triggers: # Nested under the item
- uuid: def456...
expression: '...'
Generating Valid UUIDs
python3 -c "import uuid; print(uuid.uuid4().hex)"
Related Projects
- ShopDB:
/home/camp/projects/windows/shopdb/includes/zabbix_all_supplies.asp- Zabbix API integrationdisplayprinter.asp- Displays supply levels from Zabbix
Common Tasks
Creating a New Template
- Get SNMP walk data from the device
- Identify relevant OIDs for monitoring
- Create YAML template following structure in existing templates
- Ensure supply items have "Level" in name and return percentages
- Generate valid UUIDv4 for all uuid fields
- Place triggers inside their related items
Testing Template Import
- Import into Zabbix via Configuration > Templates > Import
- Common errors:
- "unexpected tag triggers" = triggers at wrong level (move inside items)
- "invalid parameter uuid" = UUID not valid UUIDv4 format
Device-Specific Notes
HID Fargo DTC4500e Card Printer
- MIB: HID Enterprise MIB (1.3.6.1.4.1.28959)
- Ribbon: YMCKO 500-print capacity
- OID for ribbon: 1.3.6.1.4.1.28959.3.255.1.16.0 (returns raw count)
- Status flags OID: 1.3.6.1.4.1.28959.3.255.1.10.0
- Format:
DH:0 IH:0 LM:0 FL:1 MG:0 SM:0 SC:0 PE:0 - DH=Door/Hopper, IH=Input Hopper, FL=Film loaded, etc.
- Format: