# Zabbix Printer Monitoring Templates ## Overview This project provides comprehensive Zabbix 7.4 templates for monitoring HP and Xerox network printers via SNMP v2. Five specialized templates have been created to handle the different OID index mappings used by various printer models. ## Template Files All templates are available in both YAML and JSON formats: 1. **HP LaserJet - Monochrome** (`zabbix_template_hp_mono.*`) - 10 monitoring items - Covers: HP LaserJet Pro 4xxx, M4xx, M6xx (B&W models) - Monitors: Black toner, Maintenance kit 2. **HP LaserJet - Color** (`zabbix_template_hp_color.*`) - 20 monitoring items - Covers: HP Color LaserJet Pro, M4xx, M2xx (Color models) - Monitors: Black/Cyan/Magenta/Yellow toners 3. **Xerox VersaLink - Color** (`zabbix_template_xerox_color.*`) - 41 monitoring items - Covers: Xerox VersaLink C7xxx, C4xxx (Color MFPs) - Monitors: 4 toners, 4 drums, waste, transfer components, fuser 4. **Xerox VersaLink - Monochrome** (`zabbix_template_xerox_mono.*`) - 14 monitoring items - Covers: Xerox VersaLink B7xxx, B4xxx (B&W MFPs) - Monitors: Toner, drum, transfer roller, fuser 5. **Xerox Enterprise - Color** (`zabbix_template_xerox_enterprise.*`) - 28 monitoring items - Covers: Xerox EC8036, AltaLink C8xxx (Enterprise Color MFPs) - Monitors: 4 toners, 4 drums, fuser, waste, 2 transfer components (percentage-based) ## Network Coverage Total printers: 27 - HP Monochrome: 13 printers - HP Color: 3 printers - Xerox VersaLink Color: 4 printers - Xerox VersaLink Mono: 3 printers - Xerox Enterprise: 4 printers Full IP-to-template mapping available in `printer_template_mapping.py` output. ## Import Instructions ### Method 1: Zabbix Web UI 1. Login to Zabbix web interface 2. Navigate to: **Configuration → Templates → Import** 3. Select the appropriate YAML or JSON file for each printer type 4. Click **Import** 5. Repeat for each template file ### Method 2: Zabbix API Use the Zabbix API to import templates programmatically. See Zabbix documentation for details. ## Configuring Printers For each printer host in Zabbix: 1. **Link Template**: Assign the appropriate template based on model (see IP mapping below) 2. **Configure SNMP Interface**: - IP Address: Printer IP - Port: 161 - SNMP version: SNMPv2 - SNMP community: `WestJeff2025` ## Template to IP Mapping ### HP LaserJet - Monochrome (zabbix_template_hp_mono) ``` 10.80.92.23, 10.80.92.24, 10.80.92.26, 10.80.92.28, 10.80.92.46, 10.80.92.53, 10.80.92.54, 10.80.92.55, 10.80.92.56, 10.80.92.57, 10.80.92.61, 10.80.92.65, 10.80.92.71 ``` ### HP LaserJet - Color (zabbix_template_hp_color) ``` 10.80.92.51, 10.80.92.52, 10.80.92.67 ``` ### Xerox VersaLink - Color (zabbix_template_xerox_color) ``` 10.80.92.20, 10.80.92.25, 10.80.92.69, 10.80.92.70 ``` ### Xerox VersaLink - Monochrome (zabbix_template_xerox_mono) ``` 10.80.92.251, 10.80.92.45, 10.80.92.48 ``` ### Xerox Enterprise - Color (zabbix_template_xerox_enterprise) ``` 10.80.92.252, 10.80.92.253, 10.80.92.49, 10.80.92.62 ``` ## Technical Details ### SNMP OIDs Used **Standard Printer MIB (RFC 3805):** - Model: `1.3.6.1.2.1.25.3.2.1.3.1` - Supply Description: `1.3.6.1.2.1.43.11.1.1.6.1.X` - Supply Max Capacity: `1.3.6.1.2.1.43.11.1.1.8.1.X` - Supply Current Level: `1.3.6.1.2.1.43.11.1.1.9.1.X` **HP Vendor-specific MIB:** - Maintenance Kit: `1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.1.X` ### Alert Thresholds - **Warning**: 20% remaining - **High**: 10% remaining ### Features - JavaScript preprocessing for hex-encoded SNMP strings - Calculated items for percentage calculations - Trigger expressions with part number validation - Support for both capacity-based and percentage-based supply levels - Supply compatibility notes in trigger messages for ordering alternatives ## Scripts ### analyze_all_printers.py Analyzes all printer CSV files to identify OID patterns and categorize printer models. ### generate_printer_templates.py Generates all Zabbix templates in YAML and JSON formats. Run this script to regenerate templates if modifications are needed. ### printer_template_mapping.py Maps each printer IP to its correct template based on model detection. Provides detailed output for manual configuration. ### check_unknown_printers.py Utility script to analyze printers that don't match existing template patterns. ## Maintenance To update templates: 1. Modify template configurations in `generate_printer_templates.py` 2. Run: `python3 generate_printer_templates.py` 3. Re-import updated templates to Zabbix ## Troubleshooting ### No data from printer 1. Verify SNMP is enabled on printer 2. Check SNMP community string matches `WestJeff2025` 3. Verify network connectivity and firewall rules (UDP 161) 4. Test with snmpwalk: `snmpwalk -v2c -c WestJeff2025 1.3.6.1.2.1.43` ### Wrong supply levels 1. Verify correct template is assigned for printer model 2. Check OID indices match your printer model 3. Export SNMP data: `python3 snmp_export.py ` 4. Analyze with: `python3 analyze_all_printers.py` ### Missing supplies Some printer models may have additional supplies not covered by templates. Add custom items based on SNMP export analysis. ## Supply Compatibility Reference When Zabbix triggers alert for low supplies, the trigger message includes a note to check compatibility alternatives. The following consolidations have been verified: ### HP LaserJet Toner Compatibility **CF258A/CF258X (58A/58X)** - HP LaserJet Pro M404n/M406 - Both standard (CF258A) and high-yield (CF258X) versions are compatible - Models share identical toner and fuser components **CF500A/CF501A/CF502A/CF503A (202A Series)** - HP Color LaserJet M254dw - Black: CF500A (202A Black) - NOT W2020A (414A) - Cyan: CF501A (202A Cyan) - NOT W2021A - Yellow: CF502A (202A Yellow) - NOT W2022A - Magenta: CF503A (202A Magenta) - NOT W2023A **CE390A/CE390X (90A/90X)** - HP LaserJet M4555/M602/M603 - Standard and high-yield versions compatible across all three models - High consolidation value for fleet management **Q5942A/Q5942X (42A/42X)** - HP LaserJet 4250/4350 - Both capacities work across model range - Legacy models still in service **CE255X (55X)** - HP LaserJet P3015/P3010 - Single part number for both models ### Xerox Toner Compatibility **106R03536-39 Series** - Xerox VersaLink C405/C400 - Black: 106R03536 (10.5K pages) - Cyan: 106R03537 (10.5K pages) - Magenta: 106R03538 (10.5K pages) - Yellow: 106R03539 (10.5K pages) **106R03580-82 Series** - Xerox VersaLink B405/B400 - Standard: 106R03580 (5.9K pages) - High-yield: 106R03582 (13.9K pages) - Extra high-yield: 106R03581 (24.6K pages) For complete compatibility details and part-specific notes, refer to the `SUPPLY_COMPATIBILITY` dictionary in `generate_printer_templates.py`. ## Files Structure ``` /home/camp/snmp-scanner/ ├── README.md # This file ├── generate_printer_templates.py # Template generator ├── printer_template_mapping.py # IP to template mapper ├── analyze_all_printers.py # OID pattern analyzer ├── check_unknown_printers.py # Unknown printer analyzer ├── zabbix_template_hp_mono.yaml # HP mono template (YAML) ├── zabbix_template_hp_mono.json # HP mono template (JSON) ├── zabbix_template_hp_color.yaml # HP color template (YAML) ├── zabbix_template_hp_color.json # HP color template (JSON) ├── zabbix_template_xerox_color.yaml # Xerox VersaLink color (YAML) ├── zabbix_template_xerox_color.json # Xerox VersaLink color (JSON) ├── zabbix_template_xerox_mono.yaml # Xerox VersaLink mono (YAML) ├── zabbix_template_xerox_mono.json # Xerox VersaLink mono (JSON) ├── zabbix_template_xerox_enterprise.yaml # Xerox Enterprise (YAML) └── zabbix_template_xerox_enterprise.json # Xerox Enterprise (JSON) /home/camp/output/ └── printer-*.csv # SNMP exports from printers ``` ## Support For issues or questions, review the SNMP exports in `/home/camp/output/` and analyze with the provided Python scripts.