Initial commit: SNMP scanner and Zabbix template generator
Tools for printer discovery and monitoring: - snmp_scanner.py: SNMP-based printer discovery - generate_printer_templates.py: Generate Zabbix templates - analyze_supplies.py: Analyze printer supply levels - extract_summary.py: Extract printer data summaries Includes Zabbix templates for: - HP Color/Mono printers - HP DesignJet T1700 - Xerox Color/Mono/Enterprise printers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
42
.gitignore
vendored
Normal file
42
.gitignore
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.so
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
|
||||||
|
# Virtual environments
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Local config
|
||||||
|
config.local.py
|
||||||
210
HP_DesignJet_T1700_README.md
Normal file
210
HP_DesignJet_T1700_README.md
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
# HP DesignJet T1700dr PostScript - Zabbix Monitoring Setup
|
||||||
|
|
||||||
|
## Printer Information
|
||||||
|
- **Model**: HP DesignJet T1700dr PostScript (44" wide format)
|
||||||
|
- **IP Address**: 10.80.92.24
|
||||||
|
- **Hostname**: NPIDDF2D7
|
||||||
|
- **Serial Number**: CN91P7H00J
|
||||||
|
- **Firmware**: JGRw_04_19_18.1
|
||||||
|
- **Location**: Blisk Inspection
|
||||||
|
|
||||||
|
## Ink Cartridge System
|
||||||
|
|
||||||
|
This printer uses the **HP 730 series ink cartridges** (6 colors):
|
||||||
|
|
||||||
|
| Color | Part Number | Max Capacity | SNMP Index |
|
||||||
|
|-------|-------------|--------------|------------|
|
||||||
|
| Matte Black | P2V72A | 3000 | 1 |
|
||||||
|
| Cyan | P2V73A | 3000 | 2 |
|
||||||
|
| Magenta | P2V71A | 3000 | 3 |
|
||||||
|
| Yellow | P2V70A | 3000 | 4 |
|
||||||
|
| Photo Black | P2V69A | 3000 | 5 |
|
||||||
|
| Gray | P2V68A | 3000 | 6 |
|
||||||
|
|
||||||
|
## Zabbix Template
|
||||||
|
|
||||||
|
### Template File
|
||||||
|
- **Location**: `/home/camp/snmp-scanner/zabbix_template_hp_designjet_t1700_v2.yaml` (CORRECTED VERSION)
|
||||||
|
- **Old Location**: `/home/camp/snmp-scanner/zabbix_template_hp_designjet_t1700.yaml` (Uses wrong OIDs - do not use)
|
||||||
|
- **Template Name**: HP DesignJet T1700
|
||||||
|
- **Template Group**: Printers
|
||||||
|
|
||||||
|
### Key SNMP OIDs
|
||||||
|
|
||||||
|
#### Printer Information
|
||||||
|
- **Model**: 1.3.6.1.2.1.25.3.2.1.3.1
|
||||||
|
- **Hostname**: 1.3.6.1.2.1.1.5.0
|
||||||
|
- **Serial Number**: 1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0 (HP-specific)
|
||||||
|
- **Location**: 1.3.6.1.2.1.1.6.0
|
||||||
|
- **Firmware**: 1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.6.0
|
||||||
|
|
||||||
|
#### Ink Levels (Per Color)
|
||||||
|
|
||||||
|
**IMPORTANT**: HP DesignJet uses proprietary HP OIDs for ink levels, NOT standard Printer MIB OIDs.
|
||||||
|
|
||||||
|
- **Part Number**: 1.3.6.1.2.1.43.11.1.1.6.1.{index} (Standard - works)
|
||||||
|
- **Max Capacity**: 1.3.6.1.2.1.43.11.1.1.8.1.{index} (Standard - works)
|
||||||
|
- **Current Level**: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.{index}.1.0 (HP proprietary - direct percentage)
|
||||||
|
|
||||||
|
### Monitored Items
|
||||||
|
|
||||||
|
For each ink cartridge:
|
||||||
|
1. **Part Number** (Text) - Identifies the specific HP 730 cartridge from standard OID
|
||||||
|
2. **Ink Level Percentage** (Direct from HP OID) - Current ink level as percentage (0-100)
|
||||||
|
|
||||||
|
### Triggers
|
||||||
|
|
||||||
|
**Warning Level (20%)**:
|
||||||
|
- Trigger when ink level drops below 20%
|
||||||
|
- Priority: WARNING
|
||||||
|
- Shows current level and replacement part number
|
||||||
|
|
||||||
|
**Critical Level (10%)**:
|
||||||
|
- Trigger when ink level drops below 10%
|
||||||
|
- Priority: HIGH
|
||||||
|
- Shows current level and replacement part number
|
||||||
|
|
||||||
|
## Import Instructions
|
||||||
|
|
||||||
|
### 1. Import Template to Zabbix
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# From Zabbix web interface:
|
||||||
|
# 1. Navigate to: Configuration → Templates
|
||||||
|
# 2. Click "Import" button
|
||||||
|
# 3. Upload: /home/camp/snmp-scanner/zabbix_template_hp_designjet_t1700_v2.yaml
|
||||||
|
# 4. Click "Import"
|
||||||
|
|
||||||
|
# NOTE: Use v2 template - it has the correct HP proprietary OIDs for ink levels
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Configure SNMP on Host
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# In Zabbix:
|
||||||
|
# 1. Go to: Configuration → Hosts
|
||||||
|
# 2. Find or create host for: 10.80.92.24
|
||||||
|
# 3. Set hostname to: NPIDDF2D7 (or descriptive name)
|
||||||
|
# 4. Add to host group: Printers
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Link Template to Host
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# In host configuration:
|
||||||
|
# 1. Go to "Templates" tab
|
||||||
|
# 2. Click "Select" next to "Link new templates"
|
||||||
|
# 3. Search for: HP DesignJet T1700
|
||||||
|
# 4. Click "Add"
|
||||||
|
# 5. Click "Update"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Configure SNMP Interface
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# In host configuration:
|
||||||
|
# 1. Go to "Interfaces" tab
|
||||||
|
# 2. Add SNMP interface:
|
||||||
|
# - IP: 10.80.92.24
|
||||||
|
# - Port: 161
|
||||||
|
# - SNMP version: SNMPv2
|
||||||
|
# - SNMP community: public (or your community string)
|
||||||
|
# 3. Click "Update"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Verification
|
||||||
|
|
||||||
|
### Test SNMP Connectivity
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# From Zabbix server/proxy, test SNMP:
|
||||||
|
snmpget -v2c -c public 10.80.92.24 1.3.6.1.2.1.1.5.0
|
||||||
|
# Should return: NPIDDF2D7
|
||||||
|
|
||||||
|
snmpget -v2c -c public 10.80.92.24 1.3.6.1.2.1.25.3.2.1.3.1
|
||||||
|
# Should return: HP DesignJet T1700dr PostScript (44" sized)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Check Data Collection
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# In Zabbix:
|
||||||
|
# 1. Go to: Monitoring → Latest data
|
||||||
|
# 2. Filter by host: NPIDDF2D7
|
||||||
|
# 3. Verify items are collecting data:
|
||||||
|
# - Printer Model
|
||||||
|
# - All 6 ink levels (Matte Black, Cyan, Magenta, Yellow, Photo Black, Gray)
|
||||||
|
# - Serial Number
|
||||||
|
# - Firmware Version
|
||||||
|
```
|
||||||
|
|
||||||
|
## Maintenance Notes
|
||||||
|
|
||||||
|
### Ink Replacement Procedure
|
||||||
|
|
||||||
|
1. **Order Supplies**: HP 730 series cartridges
|
||||||
|
- Can purchase 130ml or 300ml sizes
|
||||||
|
- All colors use same cartridge design
|
||||||
|
|
||||||
|
2. **Check Current Levels**:
|
||||||
|
- Monitor Zabbix dashboard
|
||||||
|
- Check printer web interface: http://10.80.92.24
|
||||||
|
|
||||||
|
3. **Replace Cartridge**:
|
||||||
|
- Power on printer
|
||||||
|
- Open ink cartridge access door
|
||||||
|
- Remove empty cartridge
|
||||||
|
- Install new cartridge
|
||||||
|
- Close access door
|
||||||
|
|
||||||
|
4. **Verify in Zabbix**:
|
||||||
|
- Levels should update within 1 hour
|
||||||
|
- Alert should clear automatically
|
||||||
|
|
||||||
|
### Compatible Models
|
||||||
|
|
||||||
|
This template can also be used for:
|
||||||
|
- HP DesignJet T1600 (same ink system)
|
||||||
|
- HP DesignJet T2600 (same ink system)
|
||||||
|
- Other HP DesignJet models using HP 730 inks
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### No Data Collected
|
||||||
|
|
||||||
|
1. Check SNMP connectivity:
|
||||||
|
```bash
|
||||||
|
snmpwalk -v2c -c public 10.80.92.24 1.3.6.1.2.1.1
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Verify community string is correct
|
||||||
|
3. Check firewall allows UDP 161
|
||||||
|
4. Ensure printer SNMP is enabled
|
||||||
|
|
||||||
|
### Incorrect Ink Levels
|
||||||
|
|
||||||
|
1. Verify you're using the HP proprietary OID (not standard Printer MIB):
|
||||||
|
```bash
|
||||||
|
# HP DesignJet proprietary OID (correct for T1700):
|
||||||
|
snmpwalk -v2c -c WestJeff2025 10.80.92.24 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4
|
||||||
|
|
||||||
|
# Standard Printer MIB (will NOT work on DesignJet):
|
||||||
|
snmpwalk -v2c -c WestJeff2025 10.80.92.24 1.3.6.1.2.1.43.11.1.1.9.1
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Ensure you're using template v2 (not v1) which has correct OIDs
|
||||||
|
3. Check if printer firmware needs update
|
||||||
|
|
||||||
|
### Alerts Not Triggering
|
||||||
|
|
||||||
|
1. Check trigger expressions in template
|
||||||
|
2. Verify item data is being collected
|
||||||
|
3. Check trigger dependencies
|
||||||
|
4. Review Zabbix logs for errors
|
||||||
|
|
||||||
|
## Additional Resources
|
||||||
|
|
||||||
|
- **HP Support**: [HP DesignJet T1700 Support](https://support.hp.com/us-en/product/hp-designjet-t1700-printer-series/7528524)
|
||||||
|
- **Ink Specifications**: [HP 730 Cartridge Info](https://www.hp.com/us-en/shop/cat/designjet-730-ink-cartridges)
|
||||||
|
- **SNMP MIB**: Printer-MIB (RFC 3805)
|
||||||
|
- **HP Enterprise MIB**: HP-LASERJET-COMMON-MIB
|
||||||
51
NAMING_FIX_SUMMARY.md
Normal file
51
NAMING_FIX_SUMMARY.md
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# Zabbix Template Naming Convention Fixes
|
||||||
|
|
||||||
|
## Problem
|
||||||
|
Inconsistent naming between Level items and Part Number items made ASP matching logic complex and error-prone.
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
Standardize all templates so Part Number item name = Level item name with " Level" replaced by " Part Number"
|
||||||
|
|
||||||
|
## Changes Made
|
||||||
|
|
||||||
|
### HP Templates (✅ FIXED)
|
||||||
|
- **HP Mono**: "Black Toner Level" → "Black Toner Part Number" ✓
|
||||||
|
- **HP Color**: All colors fixed to match (Black/Cyan/Magenta/Yellow Toner)
|
||||||
|
|
||||||
|
### Xerox Templates (⚠️ NEEDS FIX)
|
||||||
|
|
||||||
|
**Xerox VersaLink Color** - Need to remove extra "Cartridge":
|
||||||
|
- Change: "Black Toner **Cartridge** Part Number" → "Black Toner Part Number"
|
||||||
|
- Change: "Black Drum **Cartridge** Part Number" → "Black Drum Part Number"
|
||||||
|
- (Same for all colors)
|
||||||
|
|
||||||
|
**Xerox VersaLink Mono** - Need to remove extra "Cartridge":
|
||||||
|
- Change: "Toner **Cartridge** Part Number" → "Toner Part Number"
|
||||||
|
- Change: "Drum **Cartridge** Part Number" → "Drum Part Number"
|
||||||
|
|
||||||
|
**Xerox Enterprise** - Already correct ✓
|
||||||
|
|
||||||
|
### HP DesignJet (⚠️ NEEDS FIX IF USED)
|
||||||
|
- These are ink cartridges, not toner
|
||||||
|
- Level items use "Ink", Part Numbers use "Cartridge"
|
||||||
|
- Should change to "Ink" for consistency
|
||||||
|
- However, these may not be actively used in your environment
|
||||||
|
|
||||||
|
## Simplified ASP Matching Logic
|
||||||
|
|
||||||
|
After fixes, the ASP code becomes:
|
||||||
|
```vbscript
|
||||||
|
' Simple direct match - no fuzzy logic needed
|
||||||
|
lookupName = Replace(itemName, " Level", "")
|
||||||
|
partKeyName = lookupName & " Part Number"
|
||||||
|
If partNumbers.Exists(partKeyName) Then
|
||||||
|
partNumber = partNumbers(partKeyName)
|
||||||
|
End If
|
||||||
|
```
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
1. Fix Xerox templates in generate_printer_templates.py
|
||||||
|
2. Regenerate templates
|
||||||
|
3. Re-import to Zabbix
|
||||||
|
4. Simplify ASP matching code
|
||||||
|
5. Clear cache and test
|
||||||
237
README.md
Normal file
237
README.md
Normal file
@@ -0,0 +1,237 @@
|
|||||||
|
# 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 <printer-ip> 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 <printer-ip>`
|
||||||
|
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.
|
||||||
BIN
WJ_printers.xlsx
Normal file
BIN
WJ_printers.xlsx
Normal file
Binary file not shown.
183
analyze_all_printers.py
Normal file
183
analyze_all_printers.py
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Comprehensive printer analysis to create separate templates
|
||||||
|
"""
|
||||||
|
|
||||||
|
import csv
|
||||||
|
import os
|
||||||
|
from collections import defaultdict
|
||||||
|
|
||||||
|
# Base OIDs
|
||||||
|
SUPPLY_DESC_OID = "1.3.6.1.2.1.43.11.1.1.6.1"
|
||||||
|
SUPPLY_MAX_OID = "1.3.6.1.2.1.43.11.1.1.8.1"
|
||||||
|
SUPPLY_LEVEL_OID = "1.3.6.1.2.1.43.11.1.1.9.1"
|
||||||
|
MODEL_OID = "1.3.6.1.2.1.25.3.2.1.3.1"
|
||||||
|
|
||||||
|
def parse_csv(filepath):
|
||||||
|
"""Parse printer SNMP CSV file"""
|
||||||
|
data = {}
|
||||||
|
try:
|
||||||
|
with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
|
||||||
|
for line in f:
|
||||||
|
parts = line.strip().split(',', 2)
|
||||||
|
if len(parts) >= 2:
|
||||||
|
oid = parts[0]
|
||||||
|
value = parts[1].strip('"')
|
||||||
|
data[oid] = value
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error reading {filepath}: {e}")
|
||||||
|
return data
|
||||||
|
|
||||||
|
def analyze_printer(filepath):
|
||||||
|
"""Analyze a single printer's supply configuration"""
|
||||||
|
data = parse_csv(filepath)
|
||||||
|
printer_name = os.path.basename(filepath).replace('.csv', '')
|
||||||
|
|
||||||
|
# Get model
|
||||||
|
model = data.get(MODEL_OID, "Unknown")
|
||||||
|
|
||||||
|
# Get all supply descriptions
|
||||||
|
supplies = {}
|
||||||
|
for i in range(1, 25):
|
||||||
|
desc_oid = f"{SUPPLY_DESC_OID}.{i}"
|
||||||
|
level_oid = f"{SUPPLY_LEVEL_OID}.{i}"
|
||||||
|
max_oid = f"{SUPPLY_MAX_OID}.{i}"
|
||||||
|
|
||||||
|
if desc_oid in data:
|
||||||
|
desc = data[desc_oid]
|
||||||
|
level = data.get(level_oid, "N/A")
|
||||||
|
max_cap = data.get(max_oid, "N/A")
|
||||||
|
supplies[i] = {
|
||||||
|
'description': desc,
|
||||||
|
'level': level,
|
||||||
|
'max': max_cap
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
'name': printer_name,
|
||||||
|
'model': model,
|
||||||
|
'supplies': supplies
|
||||||
|
}
|
||||||
|
|
||||||
|
def main():
|
||||||
|
output_dir = '/home/camp/output'
|
||||||
|
|
||||||
|
# Categorize printers
|
||||||
|
hp_modern = [] # HP LaserJet Pro, newer models
|
||||||
|
hp_legacy = [] # HP LaserJet 600 series, older models
|
||||||
|
xerox_color = [] # Xerox VersaLink Color
|
||||||
|
xerox_mono = [] # Xerox VersaLink B&W
|
||||||
|
|
||||||
|
print("=" * 100)
|
||||||
|
print("COMPREHENSIVE PRINTER ANALYSIS FOR TEMPLATE CREATION")
|
||||||
|
print("=" * 100)
|
||||||
|
|
||||||
|
# Analyze all printers
|
||||||
|
for filename in sorted(os.listdir(output_dir)):
|
||||||
|
if not filename.endswith('.csv'):
|
||||||
|
continue
|
||||||
|
|
||||||
|
filepath = os.path.join(output_dir, filename)
|
||||||
|
result = analyze_printer(filepath)
|
||||||
|
model = result['model']
|
||||||
|
|
||||||
|
# Categorize
|
||||||
|
if 'HP LaserJet Pro' in model or 'HP LaserJet 4' in model:
|
||||||
|
hp_modern.append(result)
|
||||||
|
elif 'HP LaserJet' in model or 'hp' in model.lower():
|
||||||
|
hp_legacy.append(result)
|
||||||
|
elif 'Xerox VersaLink C' in model:
|
||||||
|
xerox_color.append(result)
|
||||||
|
elif 'Xerox VersaLink B' in model:
|
||||||
|
xerox_mono.append(result)
|
||||||
|
|
||||||
|
# Print summaries
|
||||||
|
print(f"\nFound {len(hp_modern)} HP Modern printers")
|
||||||
|
print(f"Found {len(hp_legacy)} HP Legacy printers")
|
||||||
|
print(f"Found {len(xerox_color)} Xerox Color printers")
|
||||||
|
print(f"Found {len(xerox_mono)} Xerox Mono printers")
|
||||||
|
|
||||||
|
# Analyze each category
|
||||||
|
categories = [
|
||||||
|
("HP MODERN (LaserJet Pro 4xxx)", hp_modern),
|
||||||
|
("HP LEGACY (LaserJet 600)", hp_legacy),
|
||||||
|
("XEROX COLOR (VersaLink C)", xerox_color),
|
||||||
|
("XEROX MONO (VersaLink B)", xerox_mono)
|
||||||
|
]
|
||||||
|
|
||||||
|
for cat_name, printers in categories:
|
||||||
|
if not printers:
|
||||||
|
continue
|
||||||
|
|
||||||
|
print("\n" + "=" * 100)
|
||||||
|
print(f"{cat_name} - {len(printers)} printers")
|
||||||
|
print("=" * 100)
|
||||||
|
|
||||||
|
# Show all printers in this category
|
||||||
|
for printer in printers:
|
||||||
|
print(f"\n{printer['name']}")
|
||||||
|
print(f"Model: {printer['model']}")
|
||||||
|
if printer['supplies']:
|
||||||
|
print(f"{'Index':<7} {'Description':<65} {'Level':<12} {'Max'}")
|
||||||
|
print("-" * 100)
|
||||||
|
for idx, supply in sorted(printer['supplies'].items()):
|
||||||
|
desc = supply['description'][:63]
|
||||||
|
print(f"{idx:<7} {desc:<65} {supply['level']:<12} {supply['max']}")
|
||||||
|
else:
|
||||||
|
print("No supplies found")
|
||||||
|
|
||||||
|
# Generate OID mappings for each category
|
||||||
|
print("\n" + "=" * 100)
|
||||||
|
print("RECOMMENDED OID MAPPINGS FOR TEMPLATES")
|
||||||
|
print("=" * 100)
|
||||||
|
|
||||||
|
for cat_name, printers in categories:
|
||||||
|
if not printers:
|
||||||
|
continue
|
||||||
|
|
||||||
|
print(f"\n{cat_name}:")
|
||||||
|
print("-" * 100)
|
||||||
|
|
||||||
|
# Collect all indices and their descriptions
|
||||||
|
index_map = defaultdict(set)
|
||||||
|
for printer in printers:
|
||||||
|
for idx, supply in printer['supplies'].items():
|
||||||
|
# Normalize description
|
||||||
|
desc = supply['description'].lower()
|
||||||
|
if 'black' in desc and 'toner' in desc:
|
||||||
|
index_map[idx].add('Black Toner')
|
||||||
|
elif 'cyan' in desc and 'toner' in desc:
|
||||||
|
index_map[idx].add('Cyan Toner')
|
||||||
|
elif 'magenta' in desc and 'toner' in desc:
|
||||||
|
index_map[idx].add('Magenta Toner')
|
||||||
|
elif 'yellow' in desc and 'toner' in desc:
|
||||||
|
index_map[idx].add('Yellow Toner')
|
||||||
|
elif 'black' in desc and 'drum' in desc:
|
||||||
|
index_map[idx].add('Black Drum')
|
||||||
|
elif 'cyan' in desc and 'drum' in desc:
|
||||||
|
index_map[idx].add('Cyan Drum')
|
||||||
|
elif 'magenta' in desc and 'drum' in desc:
|
||||||
|
index_map[idx].add('Magenta Drum')
|
||||||
|
elif 'yellow' in desc and 'drum' in desc:
|
||||||
|
index_map[idx].add('Yellow Drum')
|
||||||
|
elif 'waste' in desc:
|
||||||
|
index_map[idx].add('Waste Container')
|
||||||
|
elif 'fuser' in desc:
|
||||||
|
index_map[idx].add('Fuser')
|
||||||
|
elif 'transfer belt' in desc:
|
||||||
|
index_map[idx].add('Transfer Belt')
|
||||||
|
elif 'transfer roll' in desc:
|
||||||
|
index_map[idx].add('Transfer Roller')
|
||||||
|
elif 'maintenance' in desc:
|
||||||
|
index_map[idx].add('Maintenance Kit')
|
||||||
|
|
||||||
|
# Print consistent mappings
|
||||||
|
for idx in sorted(index_map.keys()):
|
||||||
|
components = index_map[idx]
|
||||||
|
if len(components) == 1:
|
||||||
|
print(f" Index {idx}: {list(components)[0]} ✓")
|
||||||
|
else:
|
||||||
|
print(f" Index {idx}: VARIES - {', '.join(components)}")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
169
analyze_supplies.py
Normal file
169
analyze_supplies.py
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Analyze SNMP supply data across multiple printers
|
||||||
|
to validate OID index mappings
|
||||||
|
"""
|
||||||
|
|
||||||
|
import csv
|
||||||
|
import os
|
||||||
|
from collections import defaultdict
|
||||||
|
|
||||||
|
# Base OIDs we care about
|
||||||
|
SUPPLY_DESC_OID = "1.3.6.1.2.1.43.11.1.1.6.1" # prtMarkerSuppliesDescription
|
||||||
|
SUPPLY_MAX_OID = "1.3.6.1.2.1.43.11.1.1.8.1" # prtMarkerSuppliesMaxCapacity
|
||||||
|
SUPPLY_LEVEL_OID = "1.3.6.1.2.1.43.11.1.1.9.1" # prtMarkerSuppliesLevel
|
||||||
|
MODEL_OID = "1.3.6.1.2.1.25.3.2.1.3.1" # hrDeviceDescr
|
||||||
|
|
||||||
|
def parse_csv(filepath):
|
||||||
|
"""Parse printer SNMP CSV file"""
|
||||||
|
data = {}
|
||||||
|
try:
|
||||||
|
with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
|
||||||
|
for line in f:
|
||||||
|
parts = line.strip().split(',', 2)
|
||||||
|
if len(parts) >= 2:
|
||||||
|
oid = parts[0]
|
||||||
|
value = parts[1].strip('"')
|
||||||
|
data[oid] = value
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error reading {filepath}: {e}")
|
||||||
|
return data
|
||||||
|
|
||||||
|
def analyze_printer(filepath):
|
||||||
|
"""Analyze a single printer's supply configuration"""
|
||||||
|
data = parse_csv(filepath)
|
||||||
|
printer_name = os.path.basename(filepath).replace('.csv', '')
|
||||||
|
|
||||||
|
# Get model
|
||||||
|
model = data.get(MODEL_OID, "Unknown")
|
||||||
|
|
||||||
|
# Get all supply descriptions
|
||||||
|
supplies = {}
|
||||||
|
for i in range(1, 20): # Check indices 1-20
|
||||||
|
desc_oid = f"{SUPPLY_DESC_OID}.{i}"
|
||||||
|
level_oid = f"{SUPPLY_LEVEL_OID}.{i}"
|
||||||
|
max_oid = f"{SUPPLY_MAX_OID}.{i}"
|
||||||
|
|
||||||
|
if desc_oid in data:
|
||||||
|
desc = data[desc_oid]
|
||||||
|
level = data.get(level_oid, "N/A")
|
||||||
|
max_cap = data.get(max_oid, "N/A")
|
||||||
|
supplies[i] = {
|
||||||
|
'description': desc,
|
||||||
|
'level': level,
|
||||||
|
'max': max_cap
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
'name': printer_name,
|
||||||
|
'model': model,
|
||||||
|
'supplies': supplies
|
||||||
|
}
|
||||||
|
|
||||||
|
def main():
|
||||||
|
output_dir = '/home/camp/output'
|
||||||
|
|
||||||
|
# Group printers by manufacturer
|
||||||
|
hp_printers = []
|
||||||
|
xerox_printers = []
|
||||||
|
|
||||||
|
print("=" * 80)
|
||||||
|
print("SNMP SUPPLY INDEX VALIDATION")
|
||||||
|
print("=" * 80)
|
||||||
|
print()
|
||||||
|
|
||||||
|
# Analyze all printers
|
||||||
|
for filename in sorted(os.listdir(output_dir)):
|
||||||
|
if not filename.endswith('.csv'):
|
||||||
|
continue
|
||||||
|
|
||||||
|
filepath = os.path.join(output_dir, filename)
|
||||||
|
result = analyze_printer(filepath)
|
||||||
|
|
||||||
|
if 'HP' in result['model'] or 'hp' in result['model']:
|
||||||
|
hp_printers.append(result)
|
||||||
|
elif 'Xerox' in result['model']:
|
||||||
|
xerox_printers.append(result)
|
||||||
|
|
||||||
|
# Analyze HP printers
|
||||||
|
print("\n" + "=" * 80)
|
||||||
|
print("HP PRINTERS - Supply Index Mapping")
|
||||||
|
print("=" * 80)
|
||||||
|
|
||||||
|
# Get common indices across HP printers
|
||||||
|
hp_indices = defaultdict(list)
|
||||||
|
for printer in hp_printers[:3]: # Sample first 3
|
||||||
|
print(f"\n{printer['name']}")
|
||||||
|
print(f"Model: {printer['model']}")
|
||||||
|
print(f"{'Index':<7} {'Description':<50} {'Level':<10} {'Max'}")
|
||||||
|
print("-" * 80)
|
||||||
|
for idx, supply in sorted(printer['supplies'].items()):
|
||||||
|
desc_short = supply['description'][:48]
|
||||||
|
print(f"{idx:<7} {desc_short:<50} {supply['level']:<10} {supply['max']}")
|
||||||
|
hp_indices[idx].append(desc_short)
|
||||||
|
|
||||||
|
# Analyze Xerox printers
|
||||||
|
print("\n" + "=" * 80)
|
||||||
|
print("XEROX PRINTERS - Supply Index Mapping")
|
||||||
|
print("=" * 80)
|
||||||
|
|
||||||
|
xerox_indices = defaultdict(list)
|
||||||
|
for printer in xerox_printers[:3]: # Sample first 3
|
||||||
|
print(f"\n{printer['name']}")
|
||||||
|
print(f"Model: {printer['model']}")
|
||||||
|
print(f"{'Index':<7} {'Description':<50} {'Level':<10} {'Max'}")
|
||||||
|
print("-" * 80)
|
||||||
|
for idx, supply in sorted(printer['supplies'].items()):
|
||||||
|
desc_short = supply['description'][:48]
|
||||||
|
print(f"{idx:<7} {desc_short:<50} {supply['level']:<10} {supply['max']}")
|
||||||
|
xerox_indices[idx].append(desc_short)
|
||||||
|
|
||||||
|
# Summary
|
||||||
|
print("\n" + "=" * 80)
|
||||||
|
print("SUMMARY - Index Mapping Patterns")
|
||||||
|
print("=" * 80)
|
||||||
|
|
||||||
|
print("\nHP Printers:")
|
||||||
|
print("-" * 80)
|
||||||
|
common_hp = {}
|
||||||
|
for idx, descs in sorted(hp_indices.items()):
|
||||||
|
# Find common pattern
|
||||||
|
desc_types = set([d.split(',')[0].split(' ')[0] for d in descs])
|
||||||
|
if len(desc_types) == 1:
|
||||||
|
common_hp[idx] = list(desc_types)[0]
|
||||||
|
print(f"Index {idx}: {list(desc_types)[0]} (consistent across {len(descs)} printers)")
|
||||||
|
|
||||||
|
print("\nXerox Printers:")
|
||||||
|
print("-" * 80)
|
||||||
|
common_xerox = {}
|
||||||
|
for idx, descs in sorted(xerox_indices.items()):
|
||||||
|
# Find common pattern
|
||||||
|
desc_types = set([d.split(',')[0].split('(')[0].strip() for d in descs])
|
||||||
|
if len(desc_types) == 1:
|
||||||
|
common_xerox[idx] = list(desc_types)[0]
|
||||||
|
print(f"Index {idx}: {list(desc_types)[0]} (consistent across {len(descs)} printers)")
|
||||||
|
|
||||||
|
# Validation against current template
|
||||||
|
print("\n" + "=" * 80)
|
||||||
|
print("VALIDATION - Current Template vs Actual Data")
|
||||||
|
print("=" * 80)
|
||||||
|
|
||||||
|
print("\nCurrent Template Assumptions:")
|
||||||
|
print(" 1-4: Toner (Black, Cyan, Magenta, Yellow)")
|
||||||
|
print(" 5-8: Drums (R1, R2, R3, R4) - XEROX SPECIFIC")
|
||||||
|
print(" 9: Waste Toner Container")
|
||||||
|
print(" 10: Transfer Belt Cleaner")
|
||||||
|
print(" 11: Second Bias Transfer Roll")
|
||||||
|
|
||||||
|
print("\n✓ = Correct, ✗ = Incorrect, ? = Varies by model")
|
||||||
|
|
||||||
|
# Check toner
|
||||||
|
print("\nToner Indices (1-4):")
|
||||||
|
for idx in range(1, 5):
|
||||||
|
hp_match = common_hp.get(idx, '').lower()
|
||||||
|
xerox_match = common_xerox.get(idx, '').lower()
|
||||||
|
status = "✓" if 'toner' in hp_match and 'toner' in xerox_match else "?"
|
||||||
|
print(f" Index {idx}: {status} HP='{common_hp.get(idx, 'N/A')}' Xerox='{common_xerox.get(idx, 'N/A')}'")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
62
check_unknown_printers.py
Normal file
62
check_unknown_printers.py
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Check the unknown Xerox printers"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
SUPPLY_DESC_OID = "1.3.6.1.2.1.43.11.1.1.6.1"
|
||||||
|
SUPPLY_MAX_OID = "1.3.6.1.2.1.43.11.1.1.8.1"
|
||||||
|
SUPPLY_LEVEL_OID = "1.3.6.1.2.1.43.11.1.1.9.1"
|
||||||
|
MODEL_OID = "1.3.6.1.2.1.25.3.2.1.3.1"
|
||||||
|
|
||||||
|
def parse_csv(filepath):
|
||||||
|
"""Parse printer SNMP CSV file"""
|
||||||
|
data = {}
|
||||||
|
try:
|
||||||
|
with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
|
||||||
|
for line in f:
|
||||||
|
parts = line.strip().split(',', 2)
|
||||||
|
if len(parts) >= 2:
|
||||||
|
oid = parts[0]
|
||||||
|
value = parts[1].strip('"')
|
||||||
|
data[oid] = value
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error: {e}")
|
||||||
|
return data
|
||||||
|
|
||||||
|
output_dir = '/home/camp/output'
|
||||||
|
|
||||||
|
# Check the unknown printers
|
||||||
|
for filename in ['printer-10-80-92-252.printer.geaerospace.net.csv',
|
||||||
|
'printer-10-80-92-253.printer.geaerospace.net.csv',
|
||||||
|
'printer-10-80-92-49.printer.geaerospace.net.csv',
|
||||||
|
'printer-10-80-92-62.printer.geaerospace.net.csv']:
|
||||||
|
|
||||||
|
filepath = os.path.join(output_dir, filename)
|
||||||
|
if not os.path.exists(filepath):
|
||||||
|
print(f"File not found: {filename}")
|
||||||
|
continue
|
||||||
|
|
||||||
|
data = parse_csv(filepath)
|
||||||
|
model = data.get(MODEL_OID, "Unknown")
|
||||||
|
|
||||||
|
print("=" * 100)
|
||||||
|
print(f"File: {filename}")
|
||||||
|
print(f"Model: {model}")
|
||||||
|
print("=" * 100)
|
||||||
|
|
||||||
|
# Get all supply descriptions
|
||||||
|
print(f"{'Index':<7} {'Description':<65} {'Level':<12} {'Max'}")
|
||||||
|
print("-" * 100)
|
||||||
|
|
||||||
|
for i in range(1, 25):
|
||||||
|
desc_oid = f"{SUPPLY_DESC_OID}.{i}"
|
||||||
|
level_oid = f"{SUPPLY_LEVEL_OID}.{i}"
|
||||||
|
max_oid = f"{SUPPLY_MAX_OID}.{i}"
|
||||||
|
|
||||||
|
if desc_oid in data:
|
||||||
|
desc = data[desc_oid][:63]
|
||||||
|
level = data.get(level_oid, "N/A")
|
||||||
|
max_cap = data.get(max_oid, "N/A")
|
||||||
|
print(f"{i:<7} {desc:<65} {level:<12} {max_cap}")
|
||||||
|
|
||||||
|
print()
|
||||||
36
compare_xerox.sh
Normal file
36
compare_xerox.sh
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "=== XEROX SUPPLY COMPARISON ==="
|
||||||
|
echo
|
||||||
|
|
||||||
|
for printer in /home/camp/output/printer-10-80-92-{20,25,49}.printer.geaerospace.net.csv; do
|
||||||
|
name=$(basename "$printer" .csv)
|
||||||
|
model=$(grep -a "^1.3.6.1.2.1.25.3.2.1.3.1," "$printer" | head -1 | cut -d',' -f2 | tr -d '"')
|
||||||
|
|
||||||
|
echo "====================="
|
||||||
|
echo "$name"
|
||||||
|
echo "Model: $model"
|
||||||
|
echo "====================="
|
||||||
|
|
||||||
|
echo "Index | Description | Level | Max | Notes"
|
||||||
|
echo "------|----------------------|-------|--------|------"
|
||||||
|
|
||||||
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
|
||||||
|
desc=$(grep -a "^1.3.6.1.2.1.43.11.1.1.6.1.$i," "$printer" | head -1 | cut -d',' -f2 | tr -d '"' | cut -c1-20)
|
||||||
|
level=$(grep -a "^1.3.6.1.2.1.43.11.1.1.9.1.$i," "$printer" | head -1 | cut -d',' -f2)
|
||||||
|
max=$(grep -a "^1.3.6.1.2.1.43.11.1.1.8.1.$i," "$printer" | head -1 | cut -d',' -f2)
|
||||||
|
|
||||||
|
if [ -n "$desc" ]; then
|
||||||
|
printf "%-6s| %-20s | %-5s | %-6s |" "$i" "$desc" "$level" "$max"
|
||||||
|
|
||||||
|
# Calculate percentage if possible
|
||||||
|
if [ -n "$level" ] && [ -n "$max" ] && [ "$max" != "-2" ] && [ "$max" != "-3" ] && [ "$max" -gt 0 ] 2>/dev/null; then
|
||||||
|
pct=$((level * 100 / max))
|
||||||
|
echo " ${pct}%"
|
||||||
|
else
|
||||||
|
echo " N/A"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
done
|
||||||
2647
extract_summary.py
Normal file
2647
extract_summary.py
Normal file
File diff suppressed because one or more lines are too long
2338
extract_summary_FIXED.py
Normal file
2338
extract_summary_FIXED.py
Normal file
File diff suppressed because one or more lines are too long
792
generate_printer_templates.py
Normal file
792
generate_printer_templates.py
Normal file
@@ -0,0 +1,792 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Generate separate Zabbix templates for different printer types
|
||||||
|
Based on actual SNMP analysis of network printers
|
||||||
|
Includes supply compatibility/consolidation recommendations
|
||||||
|
"""
|
||||||
|
|
||||||
|
import json
|
||||||
|
import uuid
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
# Supply compatibility and consolidation data
|
||||||
|
# Maps specific part numbers to compatible/consolidated alternatives
|
||||||
|
SUPPLY_COMPATIBILITY = {
|
||||||
|
# HP LaserJet Pro M404n/M406 - HIGH VALUE consolidation
|
||||||
|
'CF258A': {
|
||||||
|
'consolidated': 'CF258A or CF258X (58A/58X)',
|
||||||
|
'compatible_models': ['HP LaserJet Pro M404n', 'HP LaserJet Pro M406'],
|
||||||
|
'note': 'Both models share identical toner and fuser'
|
||||||
|
},
|
||||||
|
'CF258X': {
|
||||||
|
'consolidated': 'CF258A or CF258X (58A/58X)',
|
||||||
|
'compatible_models': ['HP LaserJet Pro M404n', 'HP LaserJet Pro M406'],
|
||||||
|
'note': 'High-yield version - Both models compatible'
|
||||||
|
},
|
||||||
|
|
||||||
|
# HP Color LaserJet M254dw - CRITICAL correction
|
||||||
|
'CF500A': {
|
||||||
|
'consolidated': 'CF500A (202A Black)',
|
||||||
|
'compatible_models': ['HP Color LaserJet M254dw'],
|
||||||
|
'note': 'Uses 202A series, NOT 414A series'
|
||||||
|
},
|
||||||
|
'CF501A': {
|
||||||
|
'consolidated': 'CF501A (202A Cyan)',
|
||||||
|
'compatible_models': ['HP Color LaserJet M254dw'],
|
||||||
|
'note': 'Uses 202A series, NOT 414A series'
|
||||||
|
},
|
||||||
|
'CF502A': {
|
||||||
|
'consolidated': 'CF502A (202A Magenta)',
|
||||||
|
'compatible_models': ['HP Color LaserJet M254dw'],
|
||||||
|
'note': 'Uses 202A series, NOT 414A series'
|
||||||
|
},
|
||||||
|
'CF503A': {
|
||||||
|
'consolidated': 'CF503A (202A Yellow)',
|
||||||
|
'compatible_models': ['HP Color LaserJet M254dw'],
|
||||||
|
'note': 'Uses 202A series, NOT 414A series'
|
||||||
|
},
|
||||||
|
|
||||||
|
# HP LaserJet 90A/X family
|
||||||
|
'CE390A': {
|
||||||
|
'consolidated': 'CE390A or CE390X (90A/90X)',
|
||||||
|
'compatible_models': ['HP LaserJet M4555', 'HP LaserJet M602', 'HP LaserJet M603'],
|
||||||
|
'note': 'Standard yield - compatible across M4555/M602/M603'
|
||||||
|
},
|
||||||
|
'CE390X': {
|
||||||
|
'consolidated': 'CE390A or CE390X (90A/90X)',
|
||||||
|
'compatible_models': ['HP LaserJet M4555', 'HP LaserJet M602', 'HP LaserJet M603'],
|
||||||
|
'note': 'High yield - compatible across M4555/M602/M603'
|
||||||
|
},
|
||||||
|
|
||||||
|
# HP LaserJet 42A/X family
|
||||||
|
'Q5942A': {
|
||||||
|
'consolidated': 'Q5942A or Q5942X (42A/42X)',
|
||||||
|
'compatible_models': ['HP LaserJet 4250', 'HP LaserJet 4350'],
|
||||||
|
'note': 'Standard yield - compatible across 4250/4350'
|
||||||
|
},
|
||||||
|
'Q5942X': {
|
||||||
|
'consolidated': 'Q5942A or Q5942X (42A/42X)',
|
||||||
|
'compatible_models': ['HP LaserJet 4250', 'HP LaserJet 4350'],
|
||||||
|
'note': 'High yield - compatible across 4250/4350'
|
||||||
|
},
|
||||||
|
|
||||||
|
# HP LaserJet 55X family
|
||||||
|
'CE255X': {
|
||||||
|
'consolidated': 'CE255X (55X)',
|
||||||
|
'compatible_models': ['HP LaserJet P3015', 'HP LaserJet P3010'],
|
||||||
|
'note': 'High yield - compatible across P3015/P3010'
|
||||||
|
},
|
||||||
|
|
||||||
|
# Xerox VersaLink C405/C400 series
|
||||||
|
'106R03536': {
|
||||||
|
'consolidated': '106R03536 (Black)',
|
||||||
|
'compatible_models': ['Xerox VersaLink C405', 'Xerox VersaLink C400'],
|
||||||
|
'note': 'C405 and C400 share identical toner series'
|
||||||
|
},
|
||||||
|
'106R03537': {
|
||||||
|
'consolidated': '106R03537 (Yellow)',
|
||||||
|
'compatible_models': ['Xerox VersaLink C405', 'Xerox VersaLink C400'],
|
||||||
|
'note': 'C405 and C400 share identical toner series'
|
||||||
|
},
|
||||||
|
'106R03538': {
|
||||||
|
'consolidated': '106R03538 (Cyan)',
|
||||||
|
'compatible_models': ['Xerox VersaLink C405', 'Xerox VersaLink C400'],
|
||||||
|
'note': 'C405 and C400 share identical toner series'
|
||||||
|
},
|
||||||
|
'106R03539': {
|
||||||
|
'consolidated': '106R03539 (Magenta)',
|
||||||
|
'compatible_models': ['Xerox VersaLink C405', 'Xerox VersaLink C400'],
|
||||||
|
'note': 'C405 and C400 share identical toner series'
|
||||||
|
},
|
||||||
|
|
||||||
|
# Xerox VersaLink B405/B400 series
|
||||||
|
'106R03580': {
|
||||||
|
'consolidated': '106R03580/81/82 (Standard/High/Extra-High)',
|
||||||
|
'compatible_models': ['Xerox VersaLink B405', 'Xerox VersaLink B400'],
|
||||||
|
'note': 'B405 and B400 share 106R035xx toner family'
|
||||||
|
},
|
||||||
|
'106R03581': {
|
||||||
|
'consolidated': '106R03580/81/82 (Standard/High/Extra-High)',
|
||||||
|
'compatible_models': ['Xerox VersaLink B405', 'Xerox VersaLink B400'],
|
||||||
|
'note': 'B405 and B400 share 106R035xx toner family'
|
||||||
|
},
|
||||||
|
'106R03582': {
|
||||||
|
'consolidated': '106R03580/81/82 (Standard/High/Extra-High)',
|
||||||
|
'compatible_models': ['Xerox VersaLink B405', 'Xerox VersaLink B400'],
|
||||||
|
'note': 'B405 and B400 share 106R035xx toner family'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_compatibility_info(part_number_string):
|
||||||
|
"""
|
||||||
|
Extract part number and look up compatibility information
|
||||||
|
Returns consolidated recommendation or original part number
|
||||||
|
"""
|
||||||
|
if not part_number_string:
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Extract part number patterns (e.g., "CF258A", "106R03536")
|
||||||
|
import re
|
||||||
|
# Look for common HP/Xerox part number patterns
|
||||||
|
patterns = [
|
||||||
|
r'([A-Z]{2}\d{3,4}[A-Z]{0,1})', # HP: CF258A, CE390X, etc.
|
||||||
|
r'(\d{3}R\d{5})', # Xerox: 106R03536, etc.
|
||||||
|
]
|
||||||
|
|
||||||
|
for pattern in patterns:
|
||||||
|
match = re.search(pattern, part_number_string)
|
||||||
|
if match:
|
||||||
|
part_num = match.group(1)
|
||||||
|
if part_num in SUPPLY_COMPATIBILITY:
|
||||||
|
compat = SUPPLY_COMPATIBILITY[part_num]
|
||||||
|
return f"{compat['consolidated']} - {compat['note']}"
|
||||||
|
|
||||||
|
# No compatibility info found, return original
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
# Common preprocessing JavaScript for hex-encoded strings
|
||||||
|
HEX_PREPROCESSOR = """// Handle hex-encoded SNMP strings
|
||||||
|
// Try multiple approaches to convert hex to ASCII
|
||||||
|
|
||||||
|
// First, check if it looks like hex (with spaces, newlines, or other separators)
|
||||||
|
var hexPattern = /^[0-9A-Fa-f\\s]+$/;
|
||||||
|
if (hexPattern.test(value) && value.length > 4) {
|
||||||
|
// Extract all hex pairs (2 characters)
|
||||||
|
var hexBytes = value.match(/[0-9A-Fa-f]{2}/g);
|
||||||
|
if (hexBytes && hexBytes.length > 0) {
|
||||||
|
var result = '';
|
||||||
|
for (var i = 0; i < hexBytes.length; i++) {
|
||||||
|
var code = parseInt(hexBytes[i], 16);
|
||||||
|
// Only keep printable ASCII (0x20-0x7E)
|
||||||
|
if (code >= 32 && code <= 126) {
|
||||||
|
result += String.fromCharCode(code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result.length > 0) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fallback: Remove non-printable characters
|
||||||
|
return value.replace(/[^\\x20-\\x7E]/g, '');"""
|
||||||
|
|
||||||
|
# Preprocessing for numeric items that may return -3 (unknown), -2 (unknown), or other negative "special" values
|
||||||
|
# Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown
|
||||||
|
# Convert negative values to 0 (indicates empty/problem state)
|
||||||
|
UNKNOWN_VALUE_PREPROCESSOR = """// Handle SNMP unknown values (-3, -2, etc.)
|
||||||
|
// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown
|
||||||
|
// Convert to 0 to indicate empty/problem state
|
||||||
|
var numValue = parseInt(value);
|
||||||
|
if (numValue < 0) {
|
||||||
|
return '0';
|
||||||
|
}
|
||||||
|
return value;"""
|
||||||
|
|
||||||
|
# Preprocessing for part number fields - removes serial numbers and firmware info
|
||||||
|
PART_NUMBER_CLEANER = """// Clean up part number by removing serial numbers and firmware
|
||||||
|
// Handles formats like:
|
||||||
|
// "Toner Cartridge;SNACC7952D80730000" -> "Toner Cartridge"
|
||||||
|
// "Black Cartridge HP 58A (CF258A);FW:V4.23.3" -> "Black Cartridge HP 58A (CF258A)"
|
||||||
|
// "Drum Cartridge, PN 101R00554;SN2600A90008100000" -> "Drum Cartridge, PN 101R00554"
|
||||||
|
|
||||||
|
// First, apply hex conversion if needed
|
||||||
|
var hexPattern = /^[0-9A-Fa-f\\s]+$/;
|
||||||
|
if (hexPattern.test(value) && value.length > 4) {
|
||||||
|
var hexBytes = value.match(/[0-9A-Fa-f]{2}/g);
|
||||||
|
if (hexBytes && hexBytes.length > 0) {
|
||||||
|
var result = '';
|
||||||
|
for (var i = 0; i < hexBytes.length; i++) {
|
||||||
|
var code = parseInt(hexBytes[i], 16);
|
||||||
|
if (code >= 32 && code <= 126) {
|
||||||
|
result += String.fromCharCode(code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result.length > 0) {
|
||||||
|
value = result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove serial numbers (;SN followed by anything)
|
||||||
|
value = value.replace(/;SN[^;]*/g, '');
|
||||||
|
|
||||||
|
// Remove firmware info (;FW: or ;FW followed by anything)
|
||||||
|
value = value.replace(/;FW[^;]*/g, '');
|
||||||
|
|
||||||
|
// Remove any other semicolon-separated metadata
|
||||||
|
// (but keep the main description before first semicolon)
|
||||||
|
var parts = value.split(';');
|
||||||
|
value = parts[0];
|
||||||
|
|
||||||
|
// Trim whitespace
|
||||||
|
value = value.trim();
|
||||||
|
|
||||||
|
// For Xerox printers reporting just "Toner Cartridge" without PN,
|
||||||
|
// try to add known part numbers (must match model-specific logic)
|
||||||
|
// This is handled by triggers showing compatibility notes instead
|
||||||
|
|
||||||
|
return value;"""
|
||||||
|
|
||||||
|
# Template configurations
|
||||||
|
TEMPLATES = {
|
||||||
|
"hp_mono": {
|
||||||
|
"name": "HP LaserJet - Monochrome",
|
||||||
|
"description": "HP LaserJet printers (all models - mono)",
|
||||||
|
"items": [
|
||||||
|
# Basic info
|
||||||
|
{"name": "Printer Model", "key": "printer.model", "oid": "1.3.6.1.2.1.25.3.2.1.3.1", "type": "text"},
|
||||||
|
{"name": "Printer Hostname", "key": "printer.hostname", "oid": "1.3.6.1.2.1.1.5.0", "type": "text"},
|
||||||
|
{"name": "Printer Serial Number", "key": "printer.serial", "oid": "1.3.6.1.2.1.43.5.1.1.17.1", "type": "text"},
|
||||||
|
{"name": "System Location", "key": "printer.location", "oid": "1.3.6.1.2.1.1.6.0", "type": "text"},
|
||||||
|
|
||||||
|
# Black toner - Index 1
|
||||||
|
{"name": "Black Toner Part Number", "key": "printer.cartridge.black", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.1", "type": "text"},
|
||||||
|
{"name": "Black Toner Current", "key": "printer.toner.black.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Toner Max", "key": "printer.toner.black.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Toner Level", "key": "printer.toner.black", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)",
|
||||||
|
"units": "%", "part_key": "printer.cartridge.black", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Maintenance kit - Index 2 or HP MIB
|
||||||
|
{"name": "Maintenance Kit Part Number", "key": "printer.maintenance.model", "oid": "1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0", "type": "text"},
|
||||||
|
{"name": "Maintenance Kit Remaining", "key": "printer.maintenance.remaining", "oid": "1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.0", "type": "numeric", "units": "pages",
|
||||||
|
"part_key": "printer.maintenance.model", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 10000, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 5000, "expression": "<"}
|
||||||
|
]},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"hp_color": {
|
||||||
|
"name": "HP LaserJet - Color",
|
||||||
|
"description": "HP Color LaserJet printers (all models)",
|
||||||
|
"items": [
|
||||||
|
# Basic info
|
||||||
|
{"name": "Printer Model", "key": "printer.model", "oid": "1.3.6.1.2.1.25.3.2.1.3.1", "type": "text"},
|
||||||
|
{"name": "Printer Hostname", "key": "printer.hostname", "oid": "1.3.6.1.2.1.1.5.0", "type": "text"},
|
||||||
|
{"name": "Printer Serial Number", "key": "printer.serial", "oid": "1.3.6.1.2.1.43.5.1.1.17.1", "type": "text"},
|
||||||
|
{"name": "System Location", "key": "printer.location", "oid": "1.3.6.1.2.1.1.6.0", "type": "text"},
|
||||||
|
|
||||||
|
# Toner cartridges - Indices 1-4
|
||||||
|
{"name": "Black Toner Part Number", "key": "printer.cartridge.black", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.1", "type": "text"},
|
||||||
|
{"name": "Black Toner Current", "key": "printer.toner.black.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Toner Max", "key": "printer.toner.black.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Toner Level", "key": "printer.toner.black", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)",
|
||||||
|
"units": "%", "color": "black", "part_key": "printer.cartridge.black", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Cyan Toner Part Number", "key": "printer.cartridge.cyan", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.2", "type": "text"},
|
||||||
|
{"name": "Cyan Toner Current", "key": "printer.toner.cyan.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.2", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Cyan Toner Max", "key": "printer.toner.cyan.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.2", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Cyan Toner Level", "key": "printer.toner.cyan", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.cyan.current)/last(//printer.toner.cyan.max))*100,0)",
|
||||||
|
"units": "%", "color": "cyan", "part_key": "printer.cartridge.cyan", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Magenta Toner Part Number", "key": "printer.cartridge.magenta", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.3", "type": "text"},
|
||||||
|
{"name": "Magenta Toner Current", "key": "printer.toner.magenta.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.3", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Magenta Toner Max", "key": "printer.toner.magenta.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.3", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Magenta Toner Level", "key": "printer.toner.magenta", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.magenta.current)/last(//printer.toner.magenta.max))*100,0)",
|
||||||
|
"units": "%", "color": "magenta", "part_key": "printer.cartridge.magenta", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Yellow Toner Part Number", "key": "printer.cartridge.yellow", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.4", "type": "text"},
|
||||||
|
{"name": "Yellow Toner Current", "key": "printer.toner.yellow.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.4", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Yellow Toner Max", "key": "printer.toner.yellow.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.4", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Yellow Toner Level", "key": "printer.toner.yellow", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.yellow.current)/last(//printer.toner.yellow.max))*100,0)",
|
||||||
|
"units": "%", "color": "yellow", "part_key": "printer.cartridge.yellow", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"xerox_color": {
|
||||||
|
"name": "Xerox VersaLink - Color",
|
||||||
|
"description": "Xerox VersaLink Color multifunction printers",
|
||||||
|
"items": [
|
||||||
|
# Basic info
|
||||||
|
{"name": "Printer Model", "key": "printer.model", "oid": "1.3.6.1.2.1.25.3.2.1.3.1", "type": "text"},
|
||||||
|
{"name": "Printer Hostname", "key": "printer.hostname", "oid": "1.3.6.1.2.1.1.5.0", "type": "text"},
|
||||||
|
{"name": "Printer Serial Number", "key": "printer.serial", "oid": "1.3.6.1.2.1.43.5.1.1.17.1", "type": "text"},
|
||||||
|
{"name": "System Location", "key": "printer.location", "oid": "1.3.6.1.2.1.1.6.0", "type": "text"},
|
||||||
|
|
||||||
|
# Toner cartridges - Indices 1-4
|
||||||
|
{"name": "Black Toner Part Number", "key": "printer.toner.black.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.1", "type": "text"},
|
||||||
|
{"name": "Black Toner Current", "key": "printer.toner.black.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Toner Max", "key": "printer.toner.black.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Toner Level", "key": "printer.toner.black", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)",
|
||||||
|
"units": "%", "color": "black", "part_key": "printer.toner.black.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Yellow Toner Part Number", "key": "printer.toner.yellow.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.2", "type": "text"},
|
||||||
|
{"name": "Yellow Toner Current", "key": "printer.toner.yellow.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.2", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Yellow Toner Max", "key": "printer.toner.yellow.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.2", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Yellow Toner Level", "key": "printer.toner.yellow", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.yellow.current)/last(//printer.toner.yellow.max))*100,0)",
|
||||||
|
"units": "%", "color": "yellow", "part_key": "printer.toner.yellow.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Magenta Toner Part Number", "key": "printer.toner.magenta.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.3", "type": "text"},
|
||||||
|
{"name": "Magenta Toner Current", "key": "printer.toner.magenta.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.3", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Magenta Toner Max", "key": "printer.toner.magenta.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.3", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Magenta Toner Level", "key": "printer.toner.magenta", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.magenta.current)/last(//printer.toner.magenta.max))*100,0)",
|
||||||
|
"units": "%", "color": "magenta", "part_key": "printer.toner.magenta.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Cyan Toner Part Number", "key": "printer.toner.cyan.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.4", "type": "text"},
|
||||||
|
{"name": "Cyan Toner Current", "key": "printer.toner.cyan.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.4", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Cyan Toner Max", "key": "printer.toner.cyan.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.4", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Cyan Toner Level", "key": "printer.toner.cyan", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.cyan.current)/last(//printer.toner.cyan.max))*100,0)",
|
||||||
|
"units": "%", "color": "cyan", "part_key": "printer.toner.cyan.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Waste cartridge - Index 5
|
||||||
|
{"name": "Waste Cartridge Part Number", "key": "printer.waste.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.5", "type": "text"},
|
||||||
|
{"name": "Waste Cartridge Level", "key": "printer.waste.level", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.5", "type": "numeric", "units": "%",
|
||||||
|
"can_be_unknown": True, "part_key": "printer.waste.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 80, "expression": ">"},
|
||||||
|
{"severity": "high", "threshold": 90, "expression": ">"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Drum cartridges - Indices 6-9
|
||||||
|
{"name": "Black Drum Part Number", "key": "printer.drum.black.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.6", "type": "text"},
|
||||||
|
{"name": "Black Drum Current", "key": "printer.drum.black.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.6", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Drum Max", "key": "printer.drum.black.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.6", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Drum Level", "key": "printer.drum.black", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.drum.black.current)/last(//printer.drum.black.max))*100,0)",
|
||||||
|
"units": "%", "part_key": "printer.drum.black.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Yellow Drum Part Number", "key": "printer.drum.yellow.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.7", "type": "text"},
|
||||||
|
{"name": "Yellow Drum Current", "key": "printer.drum.yellow.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.7", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Yellow Drum Max", "key": "printer.drum.yellow.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.7", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Yellow Drum Level", "key": "printer.drum.yellow", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.drum.yellow.current)/last(//printer.drum.yellow.max))*100,0)",
|
||||||
|
"units": "%", "part_key": "printer.drum.yellow.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Magenta Drum Part Number", "key": "printer.drum.magenta.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.8", "type": "text"},
|
||||||
|
{"name": "Magenta Drum Current", "key": "printer.drum.magenta.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.8", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Magenta Drum Max", "key": "printer.drum.magenta.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.8", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Magenta Drum Level", "key": "printer.drum.magenta", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.drum.magenta.current)/last(//printer.drum.magenta.max))*100,0)",
|
||||||
|
"units": "%", "part_key": "printer.drum.magenta.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Cyan Drum Part Number", "key": "printer.drum.cyan.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.9", "type": "text"},
|
||||||
|
{"name": "Cyan Drum Current", "key": "printer.drum.cyan.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.9", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Cyan Drum Max", "key": "printer.drum.cyan.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.9", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Cyan Drum Level", "key": "printer.drum.cyan", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.drum.cyan.current)/last(//printer.drum.cyan.max))*100,0)",
|
||||||
|
"units": "%", "part_key": "printer.drum.cyan.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Transfer components - Indices 10-11
|
||||||
|
{"name": "Transfer Roller Part Number", "key": "printer.transfer.roller.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.10", "type": "text"},
|
||||||
|
{"name": "Transfer Belt Part Number", "key": "printer.transfer.belt.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.11", "type": "text"},
|
||||||
|
|
||||||
|
# Fuser - Index 12
|
||||||
|
{"name": "Fuser Part Number", "key": "printer.fuser.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.12", "type": "text"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"xerox_enterprise": {
|
||||||
|
"name": "Xerox Enterprise - Color",
|
||||||
|
"description": "Xerox EC8036, AltaLink C8xxx enterprise color printers",
|
||||||
|
"items": [
|
||||||
|
# Basic info
|
||||||
|
{"name": "Printer Model", "key": "printer.model", "oid": "1.3.6.1.2.1.25.3.2.1.3.1", "type": "text"},
|
||||||
|
{"name": "Printer Hostname", "key": "printer.hostname", "oid": "1.3.6.1.2.1.1.5.0", "type": "text"},
|
||||||
|
{"name": "Printer Serial Number", "key": "printer.serial", "oid": "1.3.6.1.2.1.43.5.1.1.17.1", "type": "text"},
|
||||||
|
{"name": "System Location", "key": "printer.location", "oid": "1.3.6.1.2.1.1.6.0", "type": "text"},
|
||||||
|
|
||||||
|
# Toner cartridges - Indices 1-4
|
||||||
|
{"name": "Black Toner Part Number", "key": "printer.toner.black.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.1", "type": "text"},
|
||||||
|
{"name": "Black Toner Current", "key": "printer.toner.black.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Toner Max", "key": "printer.toner.black.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Black Toner Level", "key": "printer.toner.black", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)",
|
||||||
|
"units": "%", "color": "black", "part_key": "printer.toner.black.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Cyan Toner Part Number", "key": "printer.toner.cyan.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.2", "type": "text"},
|
||||||
|
{"name": "Cyan Toner Current", "key": "printer.toner.cyan.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.2", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Cyan Toner Max", "key": "printer.toner.cyan.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.2", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Cyan Toner Level", "key": "printer.toner.cyan", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.cyan.current)/last(//printer.toner.cyan.max))*100,0)",
|
||||||
|
"units": "%", "color": "cyan", "part_key": "printer.toner.cyan.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Magenta Toner Part Number", "key": "printer.toner.magenta.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.3", "type": "text"},
|
||||||
|
{"name": "Magenta Toner Current", "key": "printer.toner.magenta.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.3", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Magenta Toner Max", "key": "printer.toner.magenta.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.3", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Magenta Toner Level", "key": "printer.toner.magenta", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.magenta.current)/last(//printer.toner.magenta.max))*100,0)",
|
||||||
|
"units": "%", "color": "magenta", "part_key": "printer.toner.magenta.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Yellow Toner Part Number", "key": "printer.toner.yellow.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.4", "type": "text"},
|
||||||
|
{"name": "Yellow Toner Current", "key": "printer.toner.yellow.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.4", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Yellow Toner Max", "key": "printer.toner.yellow.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.4", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Yellow Toner Level", "key": "printer.toner.yellow", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.yellow.current)/last(//printer.toner.yellow.max))*100,0)",
|
||||||
|
"units": "%", "color": "yellow", "part_key": "printer.toner.yellow.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Drum cartridges - Indices 5-8 (percentage-based)
|
||||||
|
{"name": "Drum Cartridge R1 Part Number", "key": "printer.drum.r1.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.5", "type": "text"},
|
||||||
|
{"name": "Drum Cartridge R1 Level", "key": "printer.drum.r1", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.5", "type": "numeric", "units": "%",
|
||||||
|
"can_be_unknown": True, "part_key": "printer.drum.r1.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Drum Cartridge R2 Part Number", "key": "printer.drum.r2.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.6", "type": "text"},
|
||||||
|
{"name": "Drum Cartridge R2 Level", "key": "printer.drum.r2", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.6", "type": "numeric", "units": "%",
|
||||||
|
"can_be_unknown": True, "part_key": "printer.drum.r2.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Drum Cartridge R3 Part Number", "key": "printer.drum.r3.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.7", "type": "text"},
|
||||||
|
{"name": "Drum Cartridge R3 Level", "key": "printer.drum.r3", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.7", "type": "numeric", "units": "%",
|
||||||
|
"can_be_unknown": True, "part_key": "printer.drum.r3.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Drum Cartridge R4 Part Number", "key": "printer.drum.r4.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.8", "type": "text"},
|
||||||
|
{"name": "Drum Cartridge R4 Level", "key": "printer.drum.r4", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.8", "type": "numeric", "units": "%",
|
||||||
|
"can_be_unknown": True, "part_key": "printer.drum.r4.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Fuser - Index 9
|
||||||
|
{"name": "Fuser Part Number", "key": "printer.fuser.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.9", "type": "text"},
|
||||||
|
{"name": "Fuser Level", "key": "printer.fuser", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.9", "type": "numeric", "units": "%",
|
||||||
|
"can_be_unknown": True, "part_key": "printer.fuser.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Waste container - Index 10
|
||||||
|
{"name": "Waste Container Part Number", "key": "printer.waste.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.10", "type": "text"},
|
||||||
|
{"name": "Waste Container Level", "key": "printer.waste", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.10", "type": "numeric", "units": "%",
|
||||||
|
"can_be_unknown": True, "part_key": "printer.waste.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 80, "expression": ">"},
|
||||||
|
{"severity": "high", "threshold": 90, "expression": ">"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Transfer components - Indices 11-12
|
||||||
|
{"name": "Transfer Belt Cleaner Part Number", "key": "printer.transfer.belt.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.11", "type": "text"},
|
||||||
|
{"name": "Transfer Belt Cleaner Level", "key": "printer.transfer.belt", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.11", "type": "numeric", "units": "%",
|
||||||
|
"can_be_unknown": True, "part_key": "printer.transfer.belt.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
{"name": "Second Bias Transfer Roll Part Number", "key": "printer.transfer.roller.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.12", "type": "text"},
|
||||||
|
{"name": "Second Bias Transfer Roll Level", "key": "printer.transfer.roller", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.12", "type": "numeric", "units": "%",
|
||||||
|
"can_be_unknown": True, "part_key": "printer.transfer.roller.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"xerox_mono": {
|
||||||
|
"name": "Xerox VersaLink - Monochrome",
|
||||||
|
"description": "Xerox VersaLink B&W multifunction printers",
|
||||||
|
"items": [
|
||||||
|
# Basic info
|
||||||
|
{"name": "Printer Model", "key": "printer.model", "oid": "1.3.6.1.2.1.25.3.2.1.3.1", "type": "text"},
|
||||||
|
{"name": "Printer Hostname", "key": "printer.hostname", "oid": "1.3.6.1.2.1.1.5.0", "type": "text"},
|
||||||
|
{"name": "Printer Serial Number", "key": "printer.serial", "oid": "1.3.6.1.2.1.43.5.1.1.17.1", "type": "text"},
|
||||||
|
{"name": "System Location", "key": "printer.location", "oid": "1.3.6.1.2.1.1.6.0", "type": "text"},
|
||||||
|
|
||||||
|
# Toner cartridge - Index 1
|
||||||
|
{"name": "Toner Part Number", "key": "printer.toner.black.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.1", "type": "text"},
|
||||||
|
{"name": "Toner Current", "key": "printer.toner.black.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Toner Max", "key": "printer.toner.black.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.1", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Toner Level", "key": "printer.toner.black", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)",
|
||||||
|
"units": "%", "part_key": "printer.toner.black.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Drum cartridge - Index 6
|
||||||
|
{"name": "Drum Part Number", "key": "printer.drum.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.6", "type": "text"},
|
||||||
|
{"name": "Drum Current", "key": "printer.drum.current", "oid": "1.3.6.1.2.1.43.11.1.1.9.1.6", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Drum Max", "key": "printer.drum.max", "oid": "1.3.6.1.2.1.43.11.1.1.8.1.6", "type": "numeric", "can_be_unknown": True},
|
||||||
|
{"name": "Drum Level", "key": "printer.drum", "type": "calculated",
|
||||||
|
"formula": "round((last(//printer.drum.current)/last(//printer.drum.max))*100,0)",
|
||||||
|
"units": "%", "part_key": "printer.drum.part", "triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]},
|
||||||
|
|
||||||
|
# Transfer roller - Index 10
|
||||||
|
{"name": "Transfer Roller Part Number", "key": "printer.transfer.roller.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.10", "type": "text"},
|
||||||
|
|
||||||
|
# Fuser - Index 12
|
||||||
|
{"name": "Fuser Part Number", "key": "printer.fuser.part", "oid": "1.3.6.1.2.1.43.11.1.1.6.1.12", "type": "text"},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def create_zabbix_item(item_def, template_name):
|
||||||
|
"""Create a Zabbix item from definition"""
|
||||||
|
|
||||||
|
if item_def['type'] == 'calculated':
|
||||||
|
# Calculated item
|
||||||
|
zabbix_item = {
|
||||||
|
"uuid": uuid.uuid4().hex,
|
||||||
|
"name": item_def['name'],
|
||||||
|
"type": "CALCULATED",
|
||||||
|
"key": item_def['key'],
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"params": item_def['formula'],
|
||||||
|
"description": item_def.get('description', item_def['name']),
|
||||||
|
"tags": [
|
||||||
|
{"tag": "component", "value": "supplies"},
|
||||||
|
{"tag": "type", "value": "level"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
if 'color' in item_def:
|
||||||
|
zabbix_item['tags'].append({"tag": "color", "value": item_def['color']})
|
||||||
|
|
||||||
|
else:
|
||||||
|
# SNMP item
|
||||||
|
zabbix_item = {
|
||||||
|
"uuid": uuid.uuid4().hex,
|
||||||
|
"name": item_def['name'],
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": f"get[{item_def['oid']}]",
|
||||||
|
"key": item_def['key'],
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d" if item_def['type'] == 'numeric' else "0d",
|
||||||
|
"value_type": "TEXT" if item_def['type'] == 'text' else "FLOAT",
|
||||||
|
"description": item_def.get('description', item_def['name']),
|
||||||
|
"tags": [
|
||||||
|
{"tag": "component", "value": "printer"},
|
||||||
|
{"tag": "type", "value": "info" if item_def['type'] == 'text' else "raw"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add preprocessing for text items
|
||||||
|
if item_def['type'] == 'text':
|
||||||
|
# Use part number cleaner for items with "Part Number" in the name
|
||||||
|
if 'Part Number' in item_def['name'] or 'part' in item_def.get('key', ''):
|
||||||
|
zabbix_item['preprocessing'] = [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [PART_NUMBER_CLEANER]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
# Use hex preprocessor for other text items
|
||||||
|
zabbix_item['preprocessing'] = [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [HEX_PREPROCESSOR]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
# Add preprocessing for numeric items that can report unknown values
|
||||||
|
# This applies to items marked with 'can_be_unknown' flag
|
||||||
|
if item_def['type'] == 'numeric' and item_def.get('can_be_unknown', False):
|
||||||
|
zabbix_item['preprocessing'] = [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [UNKNOWN_VALUE_PREPROCESSOR]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
# Add units if specified
|
||||||
|
if 'units' in item_def:
|
||||||
|
zabbix_item['units'] = item_def['units']
|
||||||
|
|
||||||
|
# Add triggers if specified
|
||||||
|
if 'triggers' in item_def:
|
||||||
|
zabbix_item['triggers'] = []
|
||||||
|
for trigger_def in item_def['triggers']:
|
||||||
|
severity_map = {"warning": "WARNING", "high": "HIGH", "average": "AVERAGE"}
|
||||||
|
|
||||||
|
# Build expression
|
||||||
|
expression = f"last(/{template_name}/{item_def['key']}){trigger_def['expression']}{trigger_def['threshold']}"
|
||||||
|
|
||||||
|
# Add part number check if specified
|
||||||
|
description = f"{item_def['name']} is {'high' if trigger_def['expression'] == '>' else 'low'} on {{{{HOST.NAME}}}}"
|
||||||
|
if 'part_key' in item_def:
|
||||||
|
expression += f" and length(last(/{template_name}/{item_def['part_key']}))>0"
|
||||||
|
|
||||||
|
# Check if we have compatibility info for common parts
|
||||||
|
# This will be displayed in the trigger description to help with ordering
|
||||||
|
part_recommendation = "{{ITEM.LASTVALUE2}}"
|
||||||
|
|
||||||
|
# Add note about checking compatibility table for alternatives
|
||||||
|
description += f". Current level: {{{{ITEM.LASTVALUE}}}}. Replacement part: {part_recommendation}"
|
||||||
|
description += " (See compatibility notes for potential alternatives)"
|
||||||
|
|
||||||
|
trigger = {
|
||||||
|
"uuid": uuid.uuid4().hex,
|
||||||
|
"expression": expression,
|
||||||
|
"name": description,
|
||||||
|
"priority": severity_map.get(trigger_def['severity'], "WARNING"),
|
||||||
|
"tags": [{"tag": "scope", "value": "availability"}]
|
||||||
|
}
|
||||||
|
|
||||||
|
zabbix_item['triggers'].append(trigger)
|
||||||
|
|
||||||
|
return zabbix_item
|
||||||
|
|
||||||
|
|
||||||
|
def generate_template(template_key):
|
||||||
|
"""Generate a complete Zabbix template"""
|
||||||
|
config = TEMPLATES[template_key]
|
||||||
|
|
||||||
|
template = {
|
||||||
|
"zabbix_export": {
|
||||||
|
"version": "7.4",
|
||||||
|
"template_groups": [
|
||||||
|
{
|
||||||
|
"uuid": "3cd4e8d0b828464e8f4b3becf13a9dbd",
|
||||||
|
"name": "Printers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"templates": [
|
||||||
|
{
|
||||||
|
"uuid": uuid.uuid4().hex,
|
||||||
|
"template": config['name'],
|
||||||
|
"name": config['name'],
|
||||||
|
"description": config['description'],
|
||||||
|
"groups": [{"name": "Printers"}],
|
||||||
|
"items": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add all items
|
||||||
|
for item_def in config['items']:
|
||||||
|
zabbix_item = create_zabbix_item(item_def, config['name'])
|
||||||
|
template["zabbix_export"]["templates"][0]["items"].append(zabbix_item)
|
||||||
|
|
||||||
|
return template
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Generate all templates"""
|
||||||
|
print("=" * 100)
|
||||||
|
print("GENERATING ZABBIX PRINTER TEMPLATES")
|
||||||
|
print("=" * 100)
|
||||||
|
|
||||||
|
for template_key in TEMPLATES.keys():
|
||||||
|
config = TEMPLATES[template_key]
|
||||||
|
print(f"\nGenerating: {config['name']}")
|
||||||
|
print(f"Description: {config['description']}")
|
||||||
|
print(f"Items: {len(config['items'])}")
|
||||||
|
|
||||||
|
template = generate_template(template_key)
|
||||||
|
|
||||||
|
# Save YAML
|
||||||
|
yaml_filename = f"zabbix_template_{template_key}.yaml"
|
||||||
|
yaml_output = yaml.dump(template, default_flow_style=False, sort_keys=False, allow_unicode=True, width=1000)
|
||||||
|
with open(yaml_filename, 'w') as f:
|
||||||
|
f.write(yaml_output)
|
||||||
|
print(f" ✓ Saved: {yaml_filename}")
|
||||||
|
|
||||||
|
# Save JSON
|
||||||
|
json_filename = f"zabbix_template_{template_key}.json"
|
||||||
|
json_output = json.dumps(template, indent=2)
|
||||||
|
with open(json_filename, 'w') as f:
|
||||||
|
f.write(json_output)
|
||||||
|
print(f" ✓ Saved: {json_filename}")
|
||||||
|
|
||||||
|
print("\n" + "=" * 100)
|
||||||
|
print("TEMPLATE USAGE GUIDE")
|
||||||
|
print("=" * 100)
|
||||||
|
print("\n1. HP LaserJet - Monochrome")
|
||||||
|
print(" Use for: HP LaserJet Pro 4xxx, M4xx, M6xx (B&W models)")
|
||||||
|
print(" Monitors: Black toner, Maintenance kit")
|
||||||
|
print()
|
||||||
|
print("2. HP LaserJet - Color")
|
||||||
|
print(" Use for: HP Color LaserJet Pro, M4xx, M2xx (Color models)")
|
||||||
|
print(" Monitors: Black/Cyan/Magenta/Yellow toner")
|
||||||
|
print()
|
||||||
|
print("3. Xerox VersaLink - Color")
|
||||||
|
print(" Use for: Xerox VersaLink C7xxx, C4xxx (Color MFPs)")
|
||||||
|
print(" Monitors: 4 toners, 4 drums, waste, transfer components, fuser")
|
||||||
|
print()
|
||||||
|
print("4. Xerox VersaLink - Monochrome")
|
||||||
|
print(" Use for: Xerox VersaLink B7xxx, B4xxx (B&W MFPs)")
|
||||||
|
print(" Monitors: Toner, drum, transfer roller, fuser")
|
||||||
|
print()
|
||||||
|
print("5. Xerox Enterprise - Color")
|
||||||
|
print(" Use for: Xerox EC8036, AltaLink C8xxx (Enterprise Color MFPs)")
|
||||||
|
print(" Monitors: 4 toners, 4 drums, fuser, waste, 2 transfer components (all percentage-based)")
|
||||||
|
print()
|
||||||
|
print("\n" + "=" * 100)
|
||||||
|
print("IMPORT INSTRUCTIONS")
|
||||||
|
print("=" * 100)
|
||||||
|
print("\n1. In Zabbix web UI: Configuration → Templates → Import")
|
||||||
|
print("2. Select the appropriate YAML or JSON file for each printer type")
|
||||||
|
print("3. Link template to printer hosts")
|
||||||
|
print("4. Configure SNMP interface:")
|
||||||
|
print(" - Port: 161")
|
||||||
|
print(" - SNMP version: SNMPv2")
|
||||||
|
print(" - Community: WestJeff2025")
|
||||||
|
print()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
683
generate_zabbix_config.py
Normal file
683
generate_zabbix_config.py
Normal file
@@ -0,0 +1,683 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Generate Zabbix SNMP Item Configuration
|
||||||
|
Creates Zabbix item definitions for printer monitoring
|
||||||
|
Includes: Toner, Maintenance Kit, Fuser, Drums, Waste
|
||||||
|
"""
|
||||||
|
|
||||||
|
import json
|
||||||
|
import uuid
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
# Zabbix SNMP items configuration for HP & Xerox printers
|
||||||
|
ZABBIX_ITEMS = {
|
||||||
|
"printer_info": [
|
||||||
|
{
|
||||||
|
"name": "Printer Model",
|
||||||
|
"key": "printer.model",
|
||||||
|
"oid": "1.3.6.1.2.1.25.3.2.1.3.1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Device model information"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Printer Hostname",
|
||||||
|
"key": "printer.hostname",
|
||||||
|
"oid": "1.3.6.1.2.1.1.5.0",
|
||||||
|
"type": "text",
|
||||||
|
"description": "System hostname"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Printer Serial Number",
|
||||||
|
"key": "printer.serial",
|
||||||
|
"oid": "1.3.6.1.2.1.43.5.1.1.17.1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Printer serial number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "System Location",
|
||||||
|
"key": "printer.location",
|
||||||
|
"oid": "1.3.6.1.2.1.1.6.0",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Physical location"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "MAC Address",
|
||||||
|
"key": "printer.macaddress",
|
||||||
|
"oid": "1.3.6.1.2.1.2.2.1.6.2",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Primary network interface MAC address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"toner_levels": [
|
||||||
|
{
|
||||||
|
"name": "Black Toner Current",
|
||||||
|
"key": "printer.toner.black.current",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.1",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "",
|
||||||
|
"description": "Black toner current level (raw value)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Black Toner Max",
|
||||||
|
"key": "printer.toner.black.max",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.8.1.1",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "",
|
||||||
|
"description": "Black toner maximum capacity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Black Toner Level",
|
||||||
|
"key": "printer.toner.black",
|
||||||
|
"type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Black toner percentage",
|
||||||
|
"color": "black",
|
||||||
|
"is_percentage": True,
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cyan Toner Current",
|
||||||
|
"key": "printer.toner.cyan.current",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.2",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "",
|
||||||
|
"description": "Cyan toner current level (raw value)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cyan Toner Max",
|
||||||
|
"key": "printer.toner.cyan.max",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.8.1.2",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "",
|
||||||
|
"description": "Cyan toner maximum capacity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cyan Toner Level",
|
||||||
|
"key": "printer.toner.cyan",
|
||||||
|
"type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.cyan.current)/last(//printer.toner.cyan.max))*100,0)",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Cyan toner percentage",
|
||||||
|
"color": "cyan",
|
||||||
|
"is_percentage": True,
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Magenta Toner Current",
|
||||||
|
"key": "printer.toner.magenta.current",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.3",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "",
|
||||||
|
"description": "Magenta toner current level (raw value)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Magenta Toner Max",
|
||||||
|
"key": "printer.toner.magenta.max",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.8.1.3",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "",
|
||||||
|
"description": "Magenta toner maximum capacity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Magenta Toner Level",
|
||||||
|
"key": "printer.toner.magenta",
|
||||||
|
"type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.magenta.current)/last(//printer.toner.magenta.max))*100,0)",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Magenta toner percentage",
|
||||||
|
"color": "magenta",
|
||||||
|
"is_percentage": True,
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Yellow Toner Current",
|
||||||
|
"key": "printer.toner.yellow.current",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.4",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "",
|
||||||
|
"description": "Yellow toner current level (raw value)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Yellow Toner Max",
|
||||||
|
"key": "printer.toner.yellow.max",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.8.1.4",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "",
|
||||||
|
"description": "Yellow toner maximum capacity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Yellow Toner Level",
|
||||||
|
"key": "printer.toner.yellow",
|
||||||
|
"type": "calculated",
|
||||||
|
"formula": "round((last(//printer.toner.yellow.current)/last(//printer.toner.yellow.max))*100,0)",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Yellow toner percentage",
|
||||||
|
"color": "yellow",
|
||||||
|
"is_percentage": True,
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"cartridge_info": [
|
||||||
|
{
|
||||||
|
"name": "Black Cartridge Part Number",
|
||||||
|
"key": "printer.cartridge.black",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Black toner cartridge model/part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cyan Cartridge Part Number",
|
||||||
|
"key": "printer.cartridge.cyan",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.2",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Cyan toner cartridge model/part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Magenta Cartridge Part Number",
|
||||||
|
"key": "printer.cartridge.magenta",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.3",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Magenta toner cartridge model/part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Yellow Cartridge Part Number",
|
||||||
|
"key": "printer.cartridge.yellow",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Yellow toner cartridge model/part number"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"other_supplies": [
|
||||||
|
# Drum Cartridge R1
|
||||||
|
{
|
||||||
|
"name": "Drum Cartridge R1 Part Number",
|
||||||
|
"key": "printer.drum.r1",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.5",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Drum cartridge R1 part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Drum Cartridge R1 Level",
|
||||||
|
"key": "printer.drum.r1.level",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.5",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Drum cartridge R1 remaining life percentage",
|
||||||
|
"part_number_item": "printer.drum.r1",
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
# Drum Cartridge R2
|
||||||
|
{
|
||||||
|
"name": "Drum Cartridge R2 Part Number",
|
||||||
|
"key": "printer.drum.r2",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.6",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Drum cartridge R2 part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Drum Cartridge R2 Level",
|
||||||
|
"key": "printer.drum.r2.level",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.6",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Drum cartridge R2 remaining life percentage",
|
||||||
|
"part_number_item": "printer.drum.r2",
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
# Drum Cartridge R3
|
||||||
|
{
|
||||||
|
"name": "Drum Cartridge R3 Part Number",
|
||||||
|
"key": "printer.drum.r3",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.7",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Drum cartridge R3 part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Drum Cartridge R3 Level",
|
||||||
|
"key": "printer.drum.r3.level",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.7",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Drum cartridge R3 remaining life percentage",
|
||||||
|
"part_number_item": "printer.drum.r3",
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
# Drum Cartridge R4
|
||||||
|
{
|
||||||
|
"name": "Drum Cartridge R4 Part Number",
|
||||||
|
"key": "printer.drum.r4",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.8",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Drum cartridge R4 part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Drum Cartridge R4 Level",
|
||||||
|
"key": "printer.drum.r4.level",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.8",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Drum cartridge R4 remaining life percentage",
|
||||||
|
"part_number_item": "printer.drum.r4",
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
# Waste Toner Container
|
||||||
|
{
|
||||||
|
"name": "Waste Toner Container Part Number",
|
||||||
|
"key": "printer.waste.partnumber",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.9",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Waste toner container part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Waste Toner Container Level",
|
||||||
|
"key": "printer.waste.level",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.9",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Waste toner container fill level (higher is more full)",
|
||||||
|
"part_number_item": "printer.waste.partnumber",
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 80, "expression": ">"},
|
||||||
|
{"severity": "high", "threshold": 90, "expression": ">"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
# Transfer Belt Cleaner
|
||||||
|
{
|
||||||
|
"name": "Transfer Belt Cleaner Part Number",
|
||||||
|
"key": "printer.transfer.belt",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.10",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Transfer belt cleaner part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Transfer Belt Cleaner Level",
|
||||||
|
"key": "printer.transfer.belt.level",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.10",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Transfer belt cleaner remaining life percentage",
|
||||||
|
"part_number_item": "printer.transfer.belt",
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
# Second Bias Transfer Roll
|
||||||
|
{
|
||||||
|
"name": "Second Bias Transfer Roll Part Number",
|
||||||
|
"key": "printer.transfer.roller",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.6.1.11",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Second bias transfer roll part number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Second Bias Transfer Roll Level",
|
||||||
|
"key": "printer.transfer.roller.level",
|
||||||
|
"oid": "1.3.6.1.2.1.43.11.1.1.9.1.11",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "%",
|
||||||
|
"description": "Second bias transfer roll remaining life percentage",
|
||||||
|
"part_number_item": "printer.transfer.roller",
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 20, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 10, "expression": "<"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"maintenance_kit_hp": [
|
||||||
|
{
|
||||||
|
"name": "Maintenance Kit Model (HP)",
|
||||||
|
"key": "printer.maintenance.model",
|
||||||
|
"oid": "1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0",
|
||||||
|
"type": "text",
|
||||||
|
"description": "HP maintenance kit model/serial number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Maintenance Kit Remaining (HP)",
|
||||||
|
"key": "printer.maintenance.remaining",
|
||||||
|
"oid": "1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.0",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"units": "pages",
|
||||||
|
"description": "HP maintenance kit remaining pages",
|
||||||
|
"part_number_item": "printer.maintenance.model",
|
||||||
|
"triggers": [
|
||||||
|
{"severity": "warning", "threshold": 10000, "expression": "<"},
|
||||||
|
{"severity": "high", "threshold": 5000, "expression": "<"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Printer Model (HP MIB)",
|
||||||
|
"key": "printer.maintenance.printer_model",
|
||||||
|
"oid": "1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.2.0",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Printer model from HP maintenance MIB"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supply_capacity": [
|
||||||
|
{
|
||||||
|
"name": "Supply 1 Max Capacity",
|
||||||
|
"key": "printer.supply.1.max",
|
||||||
|
"oid": "1.3.6.1.2.1.43.10.2.1.4.1.1",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"description": "Maximum capacity for supply index 1 (usually black)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Supply 1 Current Level",
|
||||||
|
"key": "printer.supply.1.current",
|
||||||
|
"oid": "1.3.6.1.2.1.43.10.2.1.9.1.1",
|
||||||
|
"type": "numeric_unsigned",
|
||||||
|
"description": "Current level for supply index 1 (usually black)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def generate_zabbix_cli_commands():
|
||||||
|
"""
|
||||||
|
Generate Zabbix CLI commands for adding SNMP items
|
||||||
|
"""
|
||||||
|
print("=" * 80)
|
||||||
|
print("ZABBIX SNMP ITEM CONFIGURATION")
|
||||||
|
print("=" * 80)
|
||||||
|
print("\nThese commands can be used in Zabbix CLI or adapted for the web interface.\n")
|
||||||
|
|
||||||
|
for category, items in ZABBIX_ITEMS.items():
|
||||||
|
print(f"\n## {category.replace('_', ' ').title()}")
|
||||||
|
print("-" * 80)
|
||||||
|
|
||||||
|
for item in items:
|
||||||
|
print(f"\n### {item['name']}")
|
||||||
|
if 'oid' in item:
|
||||||
|
print(f"OID: {item['oid']}")
|
||||||
|
if 'formula' in item:
|
||||||
|
print(f"Formula: {item['formula']}")
|
||||||
|
print(f"Key: {item['key']}")
|
||||||
|
print(f"Type: {item['type']}")
|
||||||
|
if 'units' in item:
|
||||||
|
print(f"Units: {item['units']}")
|
||||||
|
print(f"Description: {item['description']}")
|
||||||
|
|
||||||
|
if 'triggers' in item:
|
||||||
|
print(f"\nRecommended Triggers:")
|
||||||
|
for trigger in item['triggers']:
|
||||||
|
print(f" - {trigger['severity'].upper()}: "
|
||||||
|
f"{item['name']} {trigger['expression']} {trigger['threshold']}{item.get('units', '')}")
|
||||||
|
|
||||||
|
print()
|
||||||
|
|
||||||
|
|
||||||
|
def generate_zabbix_import_json():
|
||||||
|
"""
|
||||||
|
Generate a Zabbix 7.4 importable JSON template
|
||||||
|
Note: Zabbix requires UUIDs to be 32 characters without hyphens
|
||||||
|
"""
|
||||||
|
template = {
|
||||||
|
"zabbix_export": {
|
||||||
|
"version": "7.4",
|
||||||
|
"template_groups": [
|
||||||
|
{
|
||||||
|
"uuid": "3cd4e8d0b828464e8f4b3becf13a9dbd",
|
||||||
|
"name": "Printers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"templates": [
|
||||||
|
{
|
||||||
|
"uuid": uuid.uuid4().hex,
|
||||||
|
"template": "Printer SNMP Monitor",
|
||||||
|
"name": "Printer SNMP Monitor",
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "Printers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build items list with Zabbix 7.4 format
|
||||||
|
for category, items in ZABBIX_ITEMS.items():
|
||||||
|
for item in items:
|
||||||
|
# Handle calculated items differently
|
||||||
|
if item['type'] == 'calculated':
|
||||||
|
# Only add component:toner and color tags if this is a percentage item
|
||||||
|
is_percentage = item.get('is_percentage', False)
|
||||||
|
|
||||||
|
zabbix_item = {
|
||||||
|
"uuid": uuid.uuid4().hex,
|
||||||
|
"name": item['name'],
|
||||||
|
"type": "CALCULATED",
|
||||||
|
"key": item['key'],
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"params": item['formula'],
|
||||||
|
"description": item['description'],
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "toner" if is_percentage else "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "category",
|
||||||
|
"value": category
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add color tag only for toner percentage items
|
||||||
|
if is_percentage and 'color' in item:
|
||||||
|
zabbix_item['tags'].append({
|
||||||
|
"tag": "color",
|
||||||
|
"value": item['color']
|
||||||
|
})
|
||||||
|
else:
|
||||||
|
# Use get[OID] for better performance in Zabbix 7.4
|
||||||
|
snmp_oid = f"get[{item['oid']}]"
|
||||||
|
|
||||||
|
zabbix_item = {
|
||||||
|
"uuid": uuid.uuid4().hex,
|
||||||
|
"name": item['name'],
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": snmp_oid,
|
||||||
|
"key": item['key'],
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d" if item['type'] != 'text' else "0d",
|
||||||
|
"value_type": "TEXT" if item['type'] == 'text' else "FLOAT",
|
||||||
|
"description": item['description'],
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "category",
|
||||||
|
"value": category
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add inventory mapping for specific items
|
||||||
|
if item['key'] == 'printer.model':
|
||||||
|
zabbix_item['inventory_link'] = 'MODEL'
|
||||||
|
elif item['key'] == 'printer.serial':
|
||||||
|
zabbix_item['inventory_link'] = 'SERIALNO_A'
|
||||||
|
elif item['key'] == 'printer.hostname':
|
||||||
|
zabbix_item['inventory_link'] = 'NAME'
|
||||||
|
elif item['key'] == 'printer.macaddress':
|
||||||
|
zabbix_item['inventory_link'] = 'MACADDRESS_A'
|
||||||
|
|
||||||
|
# Add preprocessing for text items to handle hex-encoded strings
|
||||||
|
# Some SNMP values come as hex strings like "FD E8 48 50 20 4C 61..."
|
||||||
|
# or as binary with control chars like "ýèHP LaserJet"
|
||||||
|
if item['type'] == 'text':
|
||||||
|
zabbix_item['preprocessing'] = [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
if 'units' in item:
|
||||||
|
zabbix_item['units'] = item['units']
|
||||||
|
|
||||||
|
# Add triggers if defined - nested inside the item
|
||||||
|
if 'triggers' in item:
|
||||||
|
zabbix_item['triggers'] = []
|
||||||
|
for trigger_def in item['triggers']:
|
||||||
|
severity_map = {
|
||||||
|
"warning": "WARNING",
|
||||||
|
"high": "HIGH",
|
||||||
|
"average": "AVERAGE"
|
||||||
|
}
|
||||||
|
|
||||||
|
template_name = template['zabbix_export']['templates'][0]['template']
|
||||||
|
|
||||||
|
# Build description and expression with part number reference
|
||||||
|
description = f"{item['name']} has dropped below {trigger_def['threshold']}{item.get('units', '')}"
|
||||||
|
|
||||||
|
# Build base expression
|
||||||
|
expression = f"last(/{template_name}/{item['key']}){trigger_def['expression']}{trigger_def['threshold']}"
|
||||||
|
|
||||||
|
# Add replacement part reference for toner items
|
||||||
|
# We need to add the part number item to the expression so we can reference it with {ITEM.LASTVALUE2}
|
||||||
|
if 'color' in item and category == "toner_levels":
|
||||||
|
color = item['color'].lower()
|
||||||
|
part_key = f"printer.cartridge.{color}"
|
||||||
|
# Add the part number item to the expression using "and" so it's evaluated but doesn't affect trigger logic
|
||||||
|
expression = f"last(/{template_name}/{item['key']}){trigger_def['expression']}{trigger_def['threshold']} and length(last(/{template_name}/{part_key}))>0"
|
||||||
|
description += ". Replacement part: {ITEM.LASTVALUE2}"
|
||||||
|
# Add replacement part reference for other items with part_number_item
|
||||||
|
elif 'part_number_item' in item:
|
||||||
|
part_key = item['part_number_item']
|
||||||
|
# Add the part number item to the expression using "and" so it's evaluated but doesn't affect trigger logic
|
||||||
|
expression = f"last(/{template_name}/{item['key']}){trigger_def['expression']}{trigger_def['threshold']} and length(last(/{template_name}/{part_key}))>0"
|
||||||
|
description += ". Replacement part: {ITEM.LASTVALUE2}"
|
||||||
|
|
||||||
|
trigger = {
|
||||||
|
"uuid": uuid.uuid4().hex,
|
||||||
|
"expression": expression,
|
||||||
|
"name": f"{item['name']} is low on {{{{HOST.NAME}}}}",
|
||||||
|
"priority": severity_map.get(trigger_def['severity'], "WARNING"),
|
||||||
|
"description": description,
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
zabbix_item['triggers'].append(trigger)
|
||||||
|
|
||||||
|
template["zabbix_export"]["templates"][0]["items"].append(zabbix_item)
|
||||||
|
|
||||||
|
return template
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""
|
||||||
|
Main function
|
||||||
|
"""
|
||||||
|
print("\n" + "=" * 80)
|
||||||
|
print("ZABBIX CONFIGURATION GENERATOR FOR PRINTER SNMP MONITORING")
|
||||||
|
print("Includes: Toner, Maintenance Kit, Fuser, Drums, Waste, Transfer components")
|
||||||
|
print("=" * 80)
|
||||||
|
|
||||||
|
# Generate CLI-friendly output
|
||||||
|
generate_zabbix_cli_commands()
|
||||||
|
|
||||||
|
# Generate importable template
|
||||||
|
print("\n" + "=" * 80)
|
||||||
|
print("ZABBIX IMPORT TEMPLATE")
|
||||||
|
print("=" * 80)
|
||||||
|
print("\nSave this template to a file and import it into Zabbix:")
|
||||||
|
print("Configuration -> Templates -> Import\n")
|
||||||
|
|
||||||
|
template_data = generate_zabbix_import_json()
|
||||||
|
|
||||||
|
# Save as YAML (like the working example)
|
||||||
|
# Use default_flow_style=None to let PyYAML choose when to quote
|
||||||
|
yaml_output = yaml.dump(template_data, default_flow_style=False, sort_keys=False, allow_unicode=True, width=1000)
|
||||||
|
print(yaml_output)
|
||||||
|
|
||||||
|
with open('zabbix_printer_template.yaml', 'w') as f:
|
||||||
|
f.write(yaml_output)
|
||||||
|
|
||||||
|
# Also save JSON version
|
||||||
|
json_output = json.dumps(template_data, indent=2)
|
||||||
|
with open('zabbix_printer_template.json', 'w') as f:
|
||||||
|
f.write(json_output)
|
||||||
|
|
||||||
|
print("\n" + "=" * 80)
|
||||||
|
print(f"✓ Zabbix template saved to: zabbix_printer_template.yaml (YAML)")
|
||||||
|
print(f"✓ Zabbix template saved to: zabbix_printer_template.json (JSON)")
|
||||||
|
print("=" * 80)
|
||||||
|
|
||||||
|
print("\n## Quick Setup Instructions:")
|
||||||
|
print("1. Import zabbix_printer_template.json into Zabbix")
|
||||||
|
print("2. Create/Edit a host for each printer")
|
||||||
|
print("3. Set the SNMP interface with:")
|
||||||
|
print(" - IP address: [printer IP]")
|
||||||
|
print(" - Port: 161")
|
||||||
|
print(f" - SNMP community: WestJeff2025")
|
||||||
|
print(" - SNMP version: SNMPv2")
|
||||||
|
print("4. Link the 'SNMP Printer Template (HP & Xerox) - Complete' to each host")
|
||||||
|
print("5. Wait 1 hour for data collection to begin (or trigger manual check)")
|
||||||
|
|
||||||
|
print("\n## What Gets Monitored:")
|
||||||
|
print("✓ Toner levels (Black, Cyan, Magenta, Yellow)")
|
||||||
|
print("✓ Cartridge part numbers for ordering")
|
||||||
|
print("✓ Maintenance kit status (HP printers)")
|
||||||
|
print("✓ Fuser assembly part number")
|
||||||
|
print("✓ Drum cartridge part numbers (all colors)")
|
||||||
|
print("✓ Waste cartridge part number")
|
||||||
|
print("✓ Transfer belt/roller part numbers")
|
||||||
|
print("✓ Supply capacity data for percentage calculations")
|
||||||
|
|
||||||
|
print("\n## Triggers Configured:")
|
||||||
|
print("- Warning: Toner < 20%")
|
||||||
|
print("- Critical: Toner < 10%")
|
||||||
|
print("- Warning: Maintenance kit < 10,000 pages")
|
||||||
|
print("- Critical: Maintenance kit < 5,000 pages")
|
||||||
|
|
||||||
|
print("\n## Notes:")
|
||||||
|
print("- Not all OIDs exist on all printers (e.g., drums on HP, maintenance on Xerox)")
|
||||||
|
print("- Color toner OIDs only exist on color printers")
|
||||||
|
print("- HP-specific MIB items only work on HP printers")
|
||||||
|
print("- Check interval is 1 hour (supplies don't change rapidly)")
|
||||||
|
print()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
147
printer_template_mapping.py
Normal file
147
printer_template_mapping.py
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Map each printer IP to the correct Zabbix template
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
MODEL_OID = "1.3.6.1.2.1.25.3.2.1.3.1"
|
||||||
|
|
||||||
|
def parse_csv(filepath):
|
||||||
|
"""Parse printer SNMP CSV file"""
|
||||||
|
data = {}
|
||||||
|
try:
|
||||||
|
with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
|
||||||
|
for line in f:
|
||||||
|
parts = line.strip().split(',', 2)
|
||||||
|
if len(parts) >= 2:
|
||||||
|
oid = parts[0]
|
||||||
|
value = parts[1].strip('"')
|
||||||
|
data[oid] = value
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error reading {filepath}: {e}")
|
||||||
|
return data
|
||||||
|
|
||||||
|
def extract_ip(filename):
|
||||||
|
"""Extract IP from filename like printer-10-80-92-20.printer.geaerospace.net.csv"""
|
||||||
|
# Remove .csv and domain
|
||||||
|
name = filename.replace('.printer.geaerospace.net.csv', '')
|
||||||
|
# Remove printer- prefix
|
||||||
|
name = name.replace('printer-', '')
|
||||||
|
# Convert dashes to dots
|
||||||
|
return name.replace('-', '.')
|
||||||
|
|
||||||
|
def determine_template(model):
|
||||||
|
"""Determine which template to use based on model"""
|
||||||
|
model_lower = model.lower()
|
||||||
|
|
||||||
|
# Xerox Enterprise (EC8036, AltaLink)
|
||||||
|
if 'xerox ec' in model_lower or 'xerox altalink' in model_lower:
|
||||||
|
return "xerox_enterprise", "Xerox Enterprise - Color"
|
||||||
|
|
||||||
|
# Xerox VersaLink Color
|
||||||
|
if 'xerox versalink c' in model_lower:
|
||||||
|
return "xerox_color", "Xerox VersaLink - Color"
|
||||||
|
|
||||||
|
# Xerox VersaLink Mono
|
||||||
|
if 'xerox versalink b' in model_lower:
|
||||||
|
return "xerox_mono", "Xerox VersaLink - Monochrome"
|
||||||
|
|
||||||
|
# HP Color
|
||||||
|
if 'hp color laserjet' in model_lower or 'color laserjet' in model_lower:
|
||||||
|
return "hp_color", "HP LaserJet - Color"
|
||||||
|
|
||||||
|
# HP Mono (includes DesignJet for now - they use different indices but similar structure)
|
||||||
|
if 'hp laserjet' in model_lower or 'hp designjet' in model_lower or 'laserjet' in model_lower:
|
||||||
|
return "hp_mono", "HP LaserJet - Monochrome"
|
||||||
|
|
||||||
|
return "unknown", "UNKNOWN - Manual Assignment Required"
|
||||||
|
|
||||||
|
def main():
|
||||||
|
output_dir = '/home/camp/output'
|
||||||
|
|
||||||
|
# Collect all printers
|
||||||
|
printers = []
|
||||||
|
|
||||||
|
for filename in sorted(os.listdir(output_dir)):
|
||||||
|
if not filename.endswith('.csv'):
|
||||||
|
continue
|
||||||
|
|
||||||
|
filepath = os.path.join(output_dir, filename)
|
||||||
|
data = parse_csv(filepath)
|
||||||
|
model = data.get(MODEL_OID, "Unknown")
|
||||||
|
ip = extract_ip(filename)
|
||||||
|
|
||||||
|
template_key, template_name = determine_template(model)
|
||||||
|
|
||||||
|
printers.append({
|
||||||
|
'ip': ip,
|
||||||
|
'filename': filename,
|
||||||
|
'model': model,
|
||||||
|
'template_key': template_key,
|
||||||
|
'template_name': template_name
|
||||||
|
})
|
||||||
|
|
||||||
|
# Group by template
|
||||||
|
by_template = {}
|
||||||
|
for p in printers:
|
||||||
|
key = p['template_key']
|
||||||
|
if key not in by_template:
|
||||||
|
by_template[key] = []
|
||||||
|
by_template[key].append(p)
|
||||||
|
|
||||||
|
# Print summary
|
||||||
|
print("=" * 120)
|
||||||
|
print("PRINTER TO TEMPLATE MAPPING")
|
||||||
|
print("=" * 120)
|
||||||
|
print()
|
||||||
|
|
||||||
|
# Print by template type
|
||||||
|
for template_key in ['hp_mono', 'hp_color', 'xerox_color', 'xerox_mono', 'unknown']:
|
||||||
|
if template_key not in by_template:
|
||||||
|
continue
|
||||||
|
|
||||||
|
printers_list = by_template[template_key]
|
||||||
|
template_name = printers_list[0]['template_name']
|
||||||
|
|
||||||
|
print(f"\n{'='*120}")
|
||||||
|
print(f"TEMPLATE: {template_name}")
|
||||||
|
print(f"File: zabbix_template_{template_key}.yaml / .json")
|
||||||
|
print(f"Count: {len(printers_list)} printers")
|
||||||
|
print(f"{'='*120}")
|
||||||
|
print(f"{'IP Address':<18} {'Hostname':<45} {'Model':<50}")
|
||||||
|
print("-" * 120)
|
||||||
|
|
||||||
|
for p in sorted(printers_list, key=lambda x: x['ip']):
|
||||||
|
hostname = p['filename'].replace('.csv', '').replace('printer-', '')
|
||||||
|
print(f"{p['ip']:<18} {hostname:<45} {p['model'][:48]:<50}")
|
||||||
|
|
||||||
|
# Create importable CSV for Zabbix bulk operations
|
||||||
|
print("\n" + "=" * 120)
|
||||||
|
print("ZABBIX BULK IMPORT FORMAT")
|
||||||
|
print("=" * 120)
|
||||||
|
print("\nCopy this to use with Zabbix CSV import or manual configuration:\n")
|
||||||
|
print(f"{'IP Address':<18} {'Template':<35} {'SNMP Community':<20} {'Model'}")
|
||||||
|
print("-" * 120)
|
||||||
|
|
||||||
|
for p in sorted(printers, key=lambda x: x['ip']):
|
||||||
|
print(f"{p['ip']:<18} {p['template_name']:<35} WestJeff2025{' '*8} {p['model'][:40]}")
|
||||||
|
|
||||||
|
# Create a quick reference table
|
||||||
|
print("\n" + "=" * 120)
|
||||||
|
print("QUICK REFERENCE - IP TO TEMPLATE")
|
||||||
|
print("=" * 120)
|
||||||
|
print()
|
||||||
|
|
||||||
|
for template_key in ['hp_mono', 'hp_color', 'xerox_color', 'xerox_mono']:
|
||||||
|
if template_key not in by_template:
|
||||||
|
continue
|
||||||
|
|
||||||
|
template_file = f"zabbix_template_{template_key}.yaml"
|
||||||
|
ips = [p['ip'] for p in sorted(by_template[template_key], key=lambda x: x['ip'])]
|
||||||
|
|
||||||
|
print(f"\n{template_file}:")
|
||||||
|
print(" IPs: " + ", ".join(ips))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
282
regenerate_designjet_template.py
Normal file
282
regenerate_designjet_template.py
Normal file
@@ -0,0 +1,282 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Regenerate HP DesignJet T1700 Zabbix template with proper UUIDs
|
||||||
|
Fixes "UUIDv4 is expected" import error
|
||||||
|
"""
|
||||||
|
|
||||||
|
import uuid
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
def generate_uuid():
|
||||||
|
"""Generate UUID without hyphens (Zabbix format)"""
|
||||||
|
return uuid.uuid4().hex
|
||||||
|
|
||||||
|
# HP DesignJet T1700 Template with proper UUID generation
|
||||||
|
template = {
|
||||||
|
'zabbix_export': {
|
||||||
|
'version': '7.4',
|
||||||
|
'template_groups': [
|
||||||
|
{
|
||||||
|
'uuid': '3cd4e8d0b828464e8f4b3becf13a9dbd', # Standard Printers group UUID
|
||||||
|
'name': 'Printers'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'templates': [
|
||||||
|
{
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'template': 'HP DesignJet T1700',
|
||||||
|
'name': 'HP DesignJet T1700',
|
||||||
|
'description': '''HP DesignJet T1700/T1700dr PostScript Large Format Printer (44" wide) with 6-color ink system.
|
||||||
|
Uses HP-specific OIDs for ink levels (1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.X.1.0)
|
||||||
|
|
||||||
|
Correct HP 730 300ml cartridge mapping (verified from actual installation):
|
||||||
|
- P2V68A = Cyan
|
||||||
|
- P2V69A = Magenta
|
||||||
|
- P2V70A = Yellow
|
||||||
|
- P2V71A = Matte Black
|
||||||
|
- P2V72A = Gray
|
||||||
|
- P2V73A = Photo Black''',
|
||||||
|
'groups': [
|
||||||
|
{'name': 'Printers'}
|
||||||
|
],
|
||||||
|
'items': []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ink cartridge definitions with correct SNMP index mapping
|
||||||
|
INK_CARTRIDGES = [
|
||||||
|
{
|
||||||
|
'color': 'Matte Black',
|
||||||
|
'key': 'matte_black',
|
||||||
|
'part_oid': '1.3.6.1.2.1.43.11.1.1.6.1.3', # Index 3
|
||||||
|
'level_oid': '1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.3.1.0',
|
||||||
|
'part_number': 'P2V71A',
|
||||||
|
'description': 'Matte Black Ink'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'color': 'Photo Black',
|
||||||
|
'key': 'photo_black',
|
||||||
|
'part_oid': '1.3.6.1.2.1.43.11.1.1.6.1.2', # Index 2
|
||||||
|
'level_oid': '1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.2.1.0',
|
||||||
|
'part_number': 'P2V73A',
|
||||||
|
'description': 'Photo Black Ink'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'color': 'Cyan',
|
||||||
|
'key': 'cyan',
|
||||||
|
'part_oid': '1.3.6.1.2.1.43.11.1.1.6.1.6', # Index 6
|
||||||
|
'level_oid': '1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.6.1.0',
|
||||||
|
'part_number': 'P2V68A',
|
||||||
|
'description': 'Cyan Ink'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'color': 'Magenta',
|
||||||
|
'key': 'magenta',
|
||||||
|
'part_oid': '1.3.6.1.2.1.43.11.1.1.6.1.5', # Index 5
|
||||||
|
'level_oid': '1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.5.1.0',
|
||||||
|
'part_number': 'P2V69A',
|
||||||
|
'description': 'Magenta Ink'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'color': 'Yellow',
|
||||||
|
'key': 'yellow',
|
||||||
|
'part_oid': '1.3.6.1.2.1.43.11.1.1.6.1.4', # Index 4
|
||||||
|
'level_oid': '1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.4.1.0',
|
||||||
|
'part_number': 'P2V70A',
|
||||||
|
'description': 'Yellow Ink'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'color': 'Gray',
|
||||||
|
'key': 'gray',
|
||||||
|
'part_oid': '1.3.6.1.2.1.43.11.1.1.6.1.1', # Index 1
|
||||||
|
'level_oid': '1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.1.1.0',
|
||||||
|
'part_number': 'P2V72A',
|
||||||
|
'description': 'Gray Ink'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
# Standard preprocessing for text fields (handles hex-encoded and binary SNMP data)
|
||||||
|
TEXT_PREPROCESSING = [
|
||||||
|
{
|
||||||
|
'type': 'JAVASCRIPT',
|
||||||
|
'parameters': [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
# Printer info items
|
||||||
|
items = template['zabbix_export']['templates'][0]['items']
|
||||||
|
|
||||||
|
# Add basic printer info items
|
||||||
|
items.extend([
|
||||||
|
{
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'name': 'Printer Model',
|
||||||
|
'type': 'SNMP_AGENT',
|
||||||
|
'snmp_oid': '1.3.6.1.2.1.25.3.2.1.3.1',
|
||||||
|
'key': 'printer.model',
|
||||||
|
'delay': '1h',
|
||||||
|
'history': '90d',
|
||||||
|
'trends': '0d',
|
||||||
|
'value_type': 'TEXT',
|
||||||
|
'description': 'Printer Model',
|
||||||
|
'preprocessing': TEXT_PREPROCESSING,
|
||||||
|
'tags': [
|
||||||
|
{'tag': 'component', 'value': 'printer'},
|
||||||
|
{'tag': 'type', 'value': 'info'}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'name': 'Printer Hostname',
|
||||||
|
'type': 'SNMP_AGENT',
|
||||||
|
'snmp_oid': '1.3.6.1.2.1.1.5.0',
|
||||||
|
'key': 'printer.hostname',
|
||||||
|
'delay': '1h',
|
||||||
|
'history': '90d',
|
||||||
|
'trends': '0d',
|
||||||
|
'value_type': 'TEXT',
|
||||||
|
'description': 'Printer Hostname',
|
||||||
|
'preprocessing': TEXT_PREPROCESSING,
|
||||||
|
'tags': [
|
||||||
|
{'tag': 'component', 'value': 'printer'},
|
||||||
|
{'tag': 'type', 'value': 'info'}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'name': 'Printer Serial Number',
|
||||||
|
'type': 'SNMP_AGENT',
|
||||||
|
'snmp_oid': '1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0',
|
||||||
|
'key': 'printer.serial',
|
||||||
|
'delay': '1h',
|
||||||
|
'history': '90d',
|
||||||
|
'trends': '0d',
|
||||||
|
'value_type': 'TEXT',
|
||||||
|
'description': 'Printer Serial Number (HP-specific OID)',
|
||||||
|
'preprocessing': TEXT_PREPROCESSING,
|
||||||
|
'tags': [
|
||||||
|
{'tag': 'component', 'value': 'printer'},
|
||||||
|
{'tag': 'type', 'value': 'info'}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'name': 'System Location',
|
||||||
|
'type': 'SNMP_AGENT',
|
||||||
|
'snmp_oid': '1.3.6.1.2.1.1.6.0',
|
||||||
|
'key': 'printer.location',
|
||||||
|
'delay': '1h',
|
||||||
|
'history': '90d',
|
||||||
|
'trends': '0d',
|
||||||
|
'value_type': 'TEXT',
|
||||||
|
'description': 'System Location',
|
||||||
|
'preprocessing': TEXT_PREPROCESSING,
|
||||||
|
'tags': [
|
||||||
|
{'tag': 'component', 'value': 'printer'},
|
||||||
|
{'tag': 'type', 'value': 'info'}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'name': 'Firmware Version',
|
||||||
|
'type': 'SNMP_AGENT',
|
||||||
|
'snmp_oid': '1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.6.0',
|
||||||
|
'key': 'printer.firmware',
|
||||||
|
'delay': '1h',
|
||||||
|
'history': '90d',
|
||||||
|
'trends': '0d',
|
||||||
|
'value_type': 'TEXT',
|
||||||
|
'description': 'Printer Firmware Version',
|
||||||
|
'preprocessing': TEXT_PREPROCESSING,
|
||||||
|
'tags': [
|
||||||
|
{'tag': 'component', 'value': 'printer'},
|
||||||
|
{'tag': 'type', 'value': 'info'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
# Add ink cartridge items
|
||||||
|
for ink in INK_CARTRIDGES:
|
||||||
|
# Part number item
|
||||||
|
items.append({
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'name': f"{ink['color']} Cartridge Part Number",
|
||||||
|
'type': 'SNMP_AGENT',
|
||||||
|
'snmp_oid': ink['part_oid'],
|
||||||
|
'key': f"printer.cartridge.{ink['key']}",
|
||||||
|
'delay': '1h',
|
||||||
|
'history': '90d',
|
||||||
|
'trends': '0d',
|
||||||
|
'value_type': 'TEXT',
|
||||||
|
'description': f"{ink['description']} Cartridge Part Number (HP 730 {ink['part_number']})",
|
||||||
|
'preprocessing': TEXT_PREPROCESSING,
|
||||||
|
'tags': [
|
||||||
|
{'tag': 'component', 'value': 'supplies'},
|
||||||
|
{'tag': 'type', 'value': 'info'}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
# Ink level item with triggers
|
||||||
|
items.append({
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'name': f"{ink['color']} Ink Level",
|
||||||
|
'type': 'SNMP_AGENT',
|
||||||
|
'snmp_oid': ink['level_oid'],
|
||||||
|
'key': f"printer.ink.{ink['key']}",
|
||||||
|
'delay': '1h',
|
||||||
|
'history': '90d',
|
||||||
|
'trends': '365d',
|
||||||
|
'value_type': 'FLOAT',
|
||||||
|
'units': '%',
|
||||||
|
'description': f"{ink['description']} Level Percentage (HP proprietary OID)",
|
||||||
|
'tags': [
|
||||||
|
{'tag': 'component', 'value': 'supplies'},
|
||||||
|
{'tag': 'type', 'value': 'level'},
|
||||||
|
{'tag': 'color', 'value': ink['key']}
|
||||||
|
],
|
||||||
|
'triggers': [
|
||||||
|
{
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'expression': f"last(/HP DesignJet T1700/printer.ink.{ink['key']})<20 and length(last(/HP DesignJet T1700/printer.cartridge.{ink['key']}))>0",
|
||||||
|
'name': f"{ink['color']} Ink Level is low on {{{{HOST.NAME}}}}. Current level: {{{{ITEM.LASTVALUE}}}}%. Replacement part: {{{{ITEM.LASTVALUE2}}}}",
|
||||||
|
'priority': 'WARNING',
|
||||||
|
'tags': [
|
||||||
|
{'tag': 'scope', 'value': 'availability'}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'uuid': generate_uuid(),
|
||||||
|
'expression': f"last(/HP DesignJet T1700/printer.ink.{ink['key']})<10 and length(last(/HP DesignJet T1700/printer.cartridge.{ink['key']}))>0",
|
||||||
|
'name': f"{ink['color']} Ink Level is critically low on {{{{HOST.NAME}}}}. Current level: {{{{ITEM.LASTVALUE}}}}%. Replacement part: {{{{ITEM.LASTVALUE2}}}}",
|
||||||
|
'priority': 'HIGH',
|
||||||
|
'tags': [
|
||||||
|
{'tag': 'scope', 'value': 'availability'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
# Generate YAML output
|
||||||
|
yaml_output = yaml.dump(template, default_flow_style=False, sort_keys=False, allow_unicode=True, width=1000)
|
||||||
|
|
||||||
|
# Save to file
|
||||||
|
with open('zabbix_template_hp_designjet_t1700.yaml', 'w') as f:
|
||||||
|
f.write(yaml_output)
|
||||||
|
|
||||||
|
print("=" * 80)
|
||||||
|
print("HP DesignJet T1700 Zabbix Template Generated")
|
||||||
|
print("=" * 80)
|
||||||
|
print(f"\n✓ Template saved to: zabbix_template_hp_designjet_t1700.yaml")
|
||||||
|
print(f"✓ All UUIDs generated properly (32-char hex format)")
|
||||||
|
print(f"✓ Template includes {len(INK_CARTRIDGES)} ink cartridges with correct OID mapping")
|
||||||
|
print(f"✓ Ready for import into Zabbix 7.4")
|
||||||
|
print("\nImport Instructions:")
|
||||||
|
print("1. Go to Zabbix: Data collection → Templates")
|
||||||
|
print("2. Click 'Import'")
|
||||||
|
print("3. Select zabbix_template_hp_designjet_t1700.yaml")
|
||||||
|
print("4. Click 'Import'")
|
||||||
|
print("\n" + "=" * 80)
|
||||||
243
snmp_scanner.py
Normal file
243
snmp_scanner.py
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
SNMP Scanner for HP and Xerox Printers
|
||||||
|
Walks useful OID ranges and exports to individual CSV files
|
||||||
|
Compatible with pysnmp v7.1 (pysnmp-lextudio)
|
||||||
|
"""
|
||||||
|
|
||||||
|
import asyncio
|
||||||
|
from pysnmp.hlapi.v3arch.asyncio import *
|
||||||
|
import csv
|
||||||
|
import os
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
PRINTERS = [
|
||||||
|
"10.80.92.70",
|
||||||
|
"10.80.92.23",
|
||||||
|
"10.80.92.45",
|
||||||
|
"10.80.92.52",
|
||||||
|
"10.80.92.48",
|
||||||
|
"10.80.92.69",
|
||||||
|
"10.80.92.252",
|
||||||
|
"10.80.92.54",
|
||||||
|
"10.80.92.46",
|
||||||
|
"10.80.92.57",
|
||||||
|
"10.80.92.26",
|
||||||
|
"10.80.92.53",
|
||||||
|
"10.80.92.24",
|
||||||
|
"10.80.92.62",
|
||||||
|
"10.80.92.28",
|
||||||
|
"10.80.92.51",
|
||||||
|
"10.80.92.56",
|
||||||
|
"10.80.92.25",
|
||||||
|
"10.80.92.49",
|
||||||
|
"10.80.92.20",
|
||||||
|
"10.80.92.63",
|
||||||
|
"10.80.92.67",
|
||||||
|
"10.80.92.55",
|
||||||
|
"10.80.92.65",
|
||||||
|
"10.80.92.71",
|
||||||
|
"10.80.92.251",
|
||||||
|
"10.80.92.61",
|
||||||
|
"10.80.92.253",
|
||||||
|
"10.80.92.222"
|
||||||
|
]
|
||||||
|
|
||||||
|
COMMUNITY = "WestJeff2025"
|
||||||
|
OUTPUT_DIR = "output"
|
||||||
|
|
||||||
|
# Optimized OID ranges - only what we need for reports and Zabbix
|
||||||
|
# This significantly speeds up scanning by avoiding unnecessary data
|
||||||
|
OID_RANGES = [
|
||||||
|
"1.3.6.1.2.1.1", # System info (sysDescr, sysName, sysLocation)
|
||||||
|
"1.3.6.1.2.1.25.3.2.1.3", # Device model
|
||||||
|
"1.3.6.1.2.1.43.5.1.1.17", # Printer serial number
|
||||||
|
"1.3.6.1.2.1.43.10.2.1.4", # Supply max capacity
|
||||||
|
"1.3.6.1.2.1.43.10.2.1.9", # Supply current level
|
||||||
|
"1.3.6.1.2.1.43.11.1.1.6", # Supply descriptions (part numbers)
|
||||||
|
"1.3.6.1.2.1.43.11.1.1.8", # Supply max capacity (toner/ink cartridges)
|
||||||
|
"1.3.6.1.2.1.43.11.1.1.9", # Supply level (percentage or pages)
|
||||||
|
"1.3.6.1.2.1.2.2.1.6", # MAC address
|
||||||
|
"1.3.6.1.4.1.11.2.3.9.4.2.1", # HP maintenance kit info
|
||||||
|
"1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4", # HP DesignJet ink level percentages
|
||||||
|
]
|
||||||
|
|
||||||
|
# Specific single OIDs - these are retrieved first for speed
|
||||||
|
SPECIFIC_OIDS = [
|
||||||
|
"1.3.6.1.2.1.1.1.0", # sysDescr (basic model info)
|
||||||
|
"1.3.6.1.2.1.1.5.0", # sysName (hostname)
|
||||||
|
"1.3.6.1.2.1.1.6.0", # sysLocation
|
||||||
|
"1.3.6.1.2.1.25.3.2.1.3.1", # Device model (primary)
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
async def snmp_get(printer_ip, community, oid):
|
||||||
|
"""
|
||||||
|
Perform SNMP GET on a specific OID
|
||||||
|
Returns tuple: (oid, value) or None on error
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
snmpEngine = SnmpEngine()
|
||||||
|
|
||||||
|
errorIndication, errorStatus, errorIndex, varBinds = await get_cmd(
|
||||||
|
snmpEngine,
|
||||||
|
CommunityData(community, mpModel=0),
|
||||||
|
await UdpTransportTarget.create((printer_ip, 161), timeout=2.0, retries=2),
|
||||||
|
ContextData(),
|
||||||
|
ObjectType(ObjectIdentity(oid))
|
||||||
|
)
|
||||||
|
|
||||||
|
snmpEngine.close_dispatcher()
|
||||||
|
|
||||||
|
if errorIndication:
|
||||||
|
return None
|
||||||
|
elif errorStatus:
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
for varBind in varBinds:
|
||||||
|
return (str(varBind[0]), str(varBind[1]))
|
||||||
|
except Exception as e:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
async def snmp_walk(printer_ip, community, oid):
|
||||||
|
"""
|
||||||
|
Perform SNMP walk on a specific OID for a printer
|
||||||
|
Returns list of tuples: (oid, value)
|
||||||
|
"""
|
||||||
|
results = []
|
||||||
|
|
||||||
|
try:
|
||||||
|
snmpEngine = SnmpEngine()
|
||||||
|
|
||||||
|
async for (errorIndication, errorStatus, errorIndex, varBinds) in walk_cmd(
|
||||||
|
snmpEngine,
|
||||||
|
CommunityData(community, mpModel=0),
|
||||||
|
await UdpTransportTarget.create((printer_ip, 161), timeout=2.0, retries=2),
|
||||||
|
ContextData(),
|
||||||
|
ObjectType(ObjectIdentity(oid)),
|
||||||
|
lexicographicMode=False
|
||||||
|
):
|
||||||
|
if errorIndication:
|
||||||
|
print(f" Error on {printer_ip}: {errorIndication}")
|
||||||
|
break
|
||||||
|
elif errorStatus:
|
||||||
|
print(f" Error on {printer_ip}: {errorStatus.prettyPrint()} at {errorIndex}")
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
for varBind in varBinds:
|
||||||
|
oid_str = str(varBind[0])
|
||||||
|
value = str(varBind[1])
|
||||||
|
results.append((oid_str, value))
|
||||||
|
|
||||||
|
snmpEngine.close_dispatcher()
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(f" Exception on {printer_ip}: {e}")
|
||||||
|
|
||||||
|
return results
|
||||||
|
|
||||||
|
|
||||||
|
async def scan_printer(printer_ip):
|
||||||
|
"""
|
||||||
|
Scan a single printer and save results to CSV
|
||||||
|
"""
|
||||||
|
printer_name = f"printer-{printer_ip.replace('.', '-')}.printer.geaerospace.net"
|
||||||
|
csv_filename = os.path.join(OUTPUT_DIR, f"{printer_name}.csv")
|
||||||
|
|
||||||
|
print(f"Scanning {printer_ip}...")
|
||||||
|
|
||||||
|
all_results = []
|
||||||
|
|
||||||
|
# Get specific OIDs concurrently (much faster)
|
||||||
|
get_tasks = [snmp_get(printer_ip, COMMUNITY, oid) for oid in SPECIFIC_OIDS]
|
||||||
|
get_results = await asyncio.gather(*get_tasks, return_exceptions=True)
|
||||||
|
|
||||||
|
for result in get_results:
|
||||||
|
if result and not isinstance(result, Exception):
|
||||||
|
all_results.append(result)
|
||||||
|
|
||||||
|
# Walk each OID range (walks must be sequential per OID)
|
||||||
|
for oid in OID_RANGES:
|
||||||
|
print(f" Walking OID {oid}...")
|
||||||
|
results = await snmp_walk(printer_ip, COMMUNITY, oid)
|
||||||
|
all_results.extend(results)
|
||||||
|
|
||||||
|
# Save to CSV
|
||||||
|
if all_results:
|
||||||
|
with open(csv_filename, 'w', newline='', encoding='utf-8') as csvfile:
|
||||||
|
writer = csv.writer(csvfile)
|
||||||
|
writer.writerow(['OID', 'Value', 'Scanned_At'])
|
||||||
|
|
||||||
|
timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||||
|
for oid, value in all_results:
|
||||||
|
writer.writerow([oid, value, timestamp])
|
||||||
|
|
||||||
|
print(f" ✓ Saved {len(all_results)} OIDs to {csv_filename}")
|
||||||
|
else:
|
||||||
|
print(f" ✗ No data retrieved from {printer_ip}")
|
||||||
|
|
||||||
|
return printer_ip, len(all_results)
|
||||||
|
|
||||||
|
|
||||||
|
async def scan_printers_batch(printers, batch_size=10):
|
||||||
|
"""
|
||||||
|
Scan printers in batches to avoid overwhelming the network
|
||||||
|
Increased to 10 concurrent scans for faster performance
|
||||||
|
"""
|
||||||
|
results = []
|
||||||
|
|
||||||
|
for i in range(0, len(printers), batch_size):
|
||||||
|
batch = printers[i:i + batch_size]
|
||||||
|
print(f"\nBatch {i//batch_size + 1}: Scanning {len(batch)} printers concurrently...")
|
||||||
|
batch_results = await asyncio.gather(*[scan_printer(ip) for ip in batch], return_exceptions=True)
|
||||||
|
|
||||||
|
for result in batch_results:
|
||||||
|
if isinstance(result, Exception):
|
||||||
|
print(f" Error in batch: {result}")
|
||||||
|
else:
|
||||||
|
results.append(result)
|
||||||
|
|
||||||
|
return results
|
||||||
|
|
||||||
|
|
||||||
|
async def main():
|
||||||
|
"""
|
||||||
|
Main function to scan all printers
|
||||||
|
"""
|
||||||
|
print("=" * 60)
|
||||||
|
print("SNMP Printer Scanner - Optimized for Reports & Zabbix")
|
||||||
|
print("=" * 60)
|
||||||
|
print(f"Total printers to scan: {len(PRINTERS)}")
|
||||||
|
print(f"Community string: {COMMUNITY}")
|
||||||
|
print(f"Output directory: {OUTPUT_DIR}")
|
||||||
|
print(f"Scanning {len(OID_RANGES)} optimized OID ranges (supplies, model, serial)")
|
||||||
|
print("=" * 60)
|
||||||
|
print()
|
||||||
|
|
||||||
|
# Create output directory if it doesn't exist
|
||||||
|
os.makedirs(OUTPUT_DIR, exist_ok=True)
|
||||||
|
|
||||||
|
start_time = datetime.now()
|
||||||
|
|
||||||
|
# Scan printers in batches (10 concurrent scans for speed)
|
||||||
|
results = await scan_printers_batch(PRINTERS, batch_size=10)
|
||||||
|
|
||||||
|
end_time = datetime.now()
|
||||||
|
duration = (end_time - start_time).total_seconds()
|
||||||
|
|
||||||
|
# Summary
|
||||||
|
print()
|
||||||
|
print("=" * 60)
|
||||||
|
print("Scan Complete")
|
||||||
|
print("=" * 60)
|
||||||
|
successful = sum(1 for _, count in results if count > 0)
|
||||||
|
print(f"Successful scans: {successful}/{len(PRINTERS)}")
|
||||||
|
print(f"Total time: {duration:.2f} seconds")
|
||||||
|
print(f"Results saved to: {OUTPUT_DIR}/")
|
||||||
|
print("=" * 60)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
asyncio.run(main())
|
||||||
1425
zabbix_printer_template.json
Normal file
1425
zabbix_printer_template.json
Normal file
File diff suppressed because it is too large
Load Diff
920
zabbix_printer_template.yaml
Normal file
920
zabbix_printer_template.yaml
Normal file
@@ -0,0 +1,920 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.4'
|
||||||
|
template_groups:
|
||||||
|
- uuid: 3cd4e8d0b828464e8f4b3becf13a9dbd
|
||||||
|
name: Printers
|
||||||
|
templates:
|
||||||
|
- uuid: 8559e8ebcbb849eca59287790b707168
|
||||||
|
template: Printer SNMP Monitor
|
||||||
|
name: Printer SNMP Monitor
|
||||||
|
groups:
|
||||||
|
- name: Printers
|
||||||
|
items:
|
||||||
|
- uuid: f14061bd0a6f4b4aae84fa631c06ad06
|
||||||
|
name: Printer Model
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.25.3.2.1.3.1]
|
||||||
|
key: printer.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Device model information
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: printer_info
|
||||||
|
inventory_link: MODEL
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 8cdc1529f9b94279bbb82376f5384197
|
||||||
|
name: Printer Hostname
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.5.0]
|
||||||
|
key: printer.hostname
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: System hostname
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: printer_info
|
||||||
|
inventory_link: NAME
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: a1a7295be9a5424192c33d37160792de
|
||||||
|
name: Printer Serial Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.5.1.1.17.1]
|
||||||
|
key: printer.serial
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer serial number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: printer_info
|
||||||
|
inventory_link: SERIALNO_A
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 77ef807ba8214781a162252ca8d47b49
|
||||||
|
name: System Location
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.6.0]
|
||||||
|
key: printer.location
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Physical location
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: printer_info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 5ec3baa71dd94dd588dfdbdabd5bdb74
|
||||||
|
name: MAC Address
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.2.2.1.6.2]
|
||||||
|
key: printer.macaddress
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Primary network interface MAC address
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: printer_info
|
||||||
|
inventory_link: MACADDRESS_A
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 1ca63a9ace904cb9953d8073939d80b1
|
||||||
|
name: Black Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.1]
|
||||||
|
key: printer.toner.black.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black toner current level (raw value)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
units: ''
|
||||||
|
- uuid: 8425ee5c66984653bb93325a0fa00e6e
|
||||||
|
name: Black Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.1]
|
||||||
|
key: printer.toner.black.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black toner maximum capacity
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
units: ''
|
||||||
|
- uuid: a30f2233f3e8460b9888716fa0545fd0
|
||||||
|
name: Black Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)
|
||||||
|
description: Black toner percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: toner
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
- tag: color
|
||||||
|
value: black
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 67c0cc9e72734c79a09ad5bdeaf341ff
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.toner.black)<20 and length(last(/Printer SNMP Monitor/printer.cartridge.black))>0
|
||||||
|
name: Black Toner Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Black Toner Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 6a585ec7829b4c2d8d8a22b6510383b6
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.toner.black)<10 and length(last(/Printer SNMP Monitor/printer.cartridge.black))>0
|
||||||
|
name: Black Toner Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Black Toner Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 210e86285b074d828a8dfb02ff5839f8
|
||||||
|
name: Cyan Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.2]
|
||||||
|
key: printer.toner.cyan.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan toner current level (raw value)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
units: ''
|
||||||
|
- uuid: 55e83440391e49d6bba87f3a9b5895e7
|
||||||
|
name: Cyan Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.2]
|
||||||
|
key: printer.toner.cyan.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan toner maximum capacity
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
units: ''
|
||||||
|
- uuid: ae0c1782f0b74d6f88be391a446d661e
|
||||||
|
name: Cyan Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.cyan.current)/last(//printer.toner.cyan.max))*100,0)
|
||||||
|
description: Cyan toner percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: toner
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
- tag: color
|
||||||
|
value: cyan
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 221671dfccdb44579cd7dc9f0abad794
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.toner.cyan)<20 and length(last(/Printer SNMP Monitor/printer.cartridge.cyan))>0
|
||||||
|
name: Cyan Toner Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Cyan Toner Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 63b13139e7374ac689072ec7d8e2ba27
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.toner.cyan)<10 and length(last(/Printer SNMP Monitor/printer.cartridge.cyan))>0
|
||||||
|
name: Cyan Toner Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Cyan Toner Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: b74db9fdbf3642d7b27433d553636293
|
||||||
|
name: Magenta Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.3]
|
||||||
|
key: printer.toner.magenta.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta toner current level (raw value)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
units: ''
|
||||||
|
- uuid: bbd164aed85d4f7db496dded965080ee
|
||||||
|
name: Magenta Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.3]
|
||||||
|
key: printer.toner.magenta.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta toner maximum capacity
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
units: ''
|
||||||
|
- uuid: 3a93c394f95b4c959cc3c20b2f18e014
|
||||||
|
name: Magenta Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.magenta.current)/last(//printer.toner.magenta.max))*100,0)
|
||||||
|
description: Magenta toner percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: toner
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
- tag: color
|
||||||
|
value: magenta
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: c0bc98d818d440ccbdc0e2d9c3f68cdf
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.toner.magenta)<20 and length(last(/Printer SNMP Monitor/printer.cartridge.magenta))>0
|
||||||
|
name: Magenta Toner Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Magenta Toner Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: a880d1f24ce24c56ab420bd2d3d46961
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.toner.magenta)<10 and length(last(/Printer SNMP Monitor/printer.cartridge.magenta))>0
|
||||||
|
name: Magenta Toner Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Magenta Toner Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: e6131ba3c3a84901a62e46fb3e1a558d
|
||||||
|
name: Yellow Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.4]
|
||||||
|
key: printer.toner.yellow.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow toner current level (raw value)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
units: ''
|
||||||
|
- uuid: 9efc8706ede34244a3f6146aa329fcc3
|
||||||
|
name: Yellow Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.4]
|
||||||
|
key: printer.toner.yellow.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow toner maximum capacity
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
units: ''
|
||||||
|
- uuid: 4b6760dc4b9d4b2eb10e88a130d93a31
|
||||||
|
name: Yellow Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.yellow.current)/last(//printer.toner.yellow.max))*100,0)
|
||||||
|
description: Yellow toner percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: toner
|
||||||
|
- tag: category
|
||||||
|
value: toner_levels
|
||||||
|
- tag: color
|
||||||
|
value: yellow
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 65ed6a1b74db412d927656c90a265136
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.toner.yellow)<20 and length(last(/Printer SNMP Monitor/printer.cartridge.yellow))>0
|
||||||
|
name: Yellow Toner Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Yellow Toner Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: af4da363f9a04f8a8fdd41927e7c71fd
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.toner.yellow)<10 and length(last(/Printer SNMP Monitor/printer.cartridge.yellow))>0
|
||||||
|
name: Yellow Toner Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Yellow Toner Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 197a06c64c204e4d977cef902d0503b2
|
||||||
|
name: Black Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.1]
|
||||||
|
key: printer.cartridge.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Black toner cartridge model/part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: cartridge_info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 6f07f404171946b697f1bfa3850036ff
|
||||||
|
name: Cyan Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.2]
|
||||||
|
key: printer.cartridge.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Cyan toner cartridge model/part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: cartridge_info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 52e13188182649c2a788326288e0cd6d
|
||||||
|
name: Magenta Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.3]
|
||||||
|
key: printer.cartridge.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Magenta toner cartridge model/part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: cartridge_info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: fd58812f0fde467c8444b0b6c2dcb337
|
||||||
|
name: Yellow Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.4]
|
||||||
|
key: printer.cartridge.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Yellow toner cartridge model/part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: cartridge_info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: eaa234629c2443cfaa2c6679239ddb53
|
||||||
|
name: Drum Cartridge R1 Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.5]
|
||||||
|
key: printer.drum.r1
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Drum cartridge R1 part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 94b6b40dfffa4a8eb4386cb345e33d64
|
||||||
|
name: Drum Cartridge R1 Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.5]
|
||||||
|
key: printer.drum.r1.level
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum cartridge R1 remaining life percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: ae07bd0a7f214d92ad84c1b5b0f333d7
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.drum.r1.level)<20 and length(last(/Printer SNMP Monitor/printer.drum.r1))>0
|
||||||
|
name: Drum Cartridge R1 Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Drum Cartridge R1 Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 87029b70ab414d3aa9370e01468e0bc9
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.drum.r1.level)<10 and length(last(/Printer SNMP Monitor/printer.drum.r1))>0
|
||||||
|
name: Drum Cartridge R1 Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Drum Cartridge R1 Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: a05ab2cbf4384a6a93e12d006bc8f8ed
|
||||||
|
name: Drum Cartridge R2 Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.6]
|
||||||
|
key: printer.drum.r2
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Drum cartridge R2 part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 55250c2fc46d4086a7d3c110db50dc46
|
||||||
|
name: Drum Cartridge R2 Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.6]
|
||||||
|
key: printer.drum.r2.level
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum cartridge R2 remaining life percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: da956bb03a7145558ceed46f22f59180
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.drum.r2.level)<20 and length(last(/Printer SNMP Monitor/printer.drum.r2))>0
|
||||||
|
name: Drum Cartridge R2 Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Drum Cartridge R2 Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 606e8d5f08f7460eae72015cab07d789
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.drum.r2.level)<10 and length(last(/Printer SNMP Monitor/printer.drum.r2))>0
|
||||||
|
name: Drum Cartridge R2 Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Drum Cartridge R2 Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: b582a5b3352a4406aa1a28fefa6b929c
|
||||||
|
name: Drum Cartridge R3 Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.7]
|
||||||
|
key: printer.drum.r3
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Drum cartridge R3 part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: a8646395156b4fbb90438347522ee6fa
|
||||||
|
name: Drum Cartridge R3 Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.7]
|
||||||
|
key: printer.drum.r3.level
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum cartridge R3 remaining life percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: ab6425f3dc484e6fbc029be8de0ea6eb
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.drum.r3.level)<20 and length(last(/Printer SNMP Monitor/printer.drum.r3))>0
|
||||||
|
name: Drum Cartridge R3 Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Drum Cartridge R3 Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 2b04057e9e4e43c5bcbfdd8cdd69de58
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.drum.r3.level)<10 and length(last(/Printer SNMP Monitor/printer.drum.r3))>0
|
||||||
|
name: Drum Cartridge R3 Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Drum Cartridge R3 Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 31a2f55026c94912a41049bfb22834b4
|
||||||
|
name: Drum Cartridge R4 Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.8]
|
||||||
|
key: printer.drum.r4
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Drum cartridge R4 part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: d90ac9cf6dd041eca83fa23b339de473
|
||||||
|
name: Drum Cartridge R4 Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.8]
|
||||||
|
key: printer.drum.r4.level
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum cartridge R4 remaining life percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 07c79834c5b848c298ed090f8d1e7b8b
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.drum.r4.level)<20 and length(last(/Printer SNMP Monitor/printer.drum.r4))>0
|
||||||
|
name: Drum Cartridge R4 Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Drum Cartridge R4 Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 7241561532a24d7fa9598ed3ea74e44e
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.drum.r4.level)<10 and length(last(/Printer SNMP Monitor/printer.drum.r4))>0
|
||||||
|
name: Drum Cartridge R4 Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Drum Cartridge R4 Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: cdfce3b4df8c49859d454a8883c1cec4
|
||||||
|
name: Waste Toner Container Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.9]
|
||||||
|
key: printer.waste.partnumber
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Waste toner container part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 38a4a4150ba949b2ae62d1d20e411c4e
|
||||||
|
name: Waste Toner Container Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.9]
|
||||||
|
key: printer.waste.level
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Waste toner container fill level (higher is more full)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: fbf34636cdf242f2850b73d77a339220
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.waste.level)>80 and length(last(/Printer SNMP Monitor/printer.waste.partnumber))>0
|
||||||
|
name: Waste Toner Container Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Waste Toner Container Level has dropped below 80%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: f8f3473f933749e88eb9b6b08bf0bd4a
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.waste.level)>90 and length(last(/Printer SNMP Monitor/printer.waste.partnumber))>0
|
||||||
|
name: Waste Toner Container Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Waste Toner Container Level has dropped below 90%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1210838ab6df401ab235653b975421f2
|
||||||
|
name: Transfer Belt Cleaner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.10]
|
||||||
|
key: printer.transfer.belt
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Transfer belt cleaner part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: d5e1f76785cd4198a3170a5c55856627
|
||||||
|
name: Transfer Belt Cleaner Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.10]
|
||||||
|
key: printer.transfer.belt.level
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Transfer belt cleaner remaining life percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 87789c39b16d41e5843846e6f33a41d5
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.transfer.belt.level)<20 and length(last(/Printer SNMP Monitor/printer.transfer.belt))>0
|
||||||
|
name: Transfer Belt Cleaner Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Transfer Belt Cleaner Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 8bfab1ce66734b8e99729fb9dd8a0821
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.transfer.belt.level)<10 and length(last(/Printer SNMP Monitor/printer.transfer.belt))>0
|
||||||
|
name: Transfer Belt Cleaner Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Transfer Belt Cleaner Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 06718c135cf8495ab4f64a248bed0597
|
||||||
|
name: Second Bias Transfer Roll Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.11]
|
||||||
|
key: printer.transfer.roller
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Second bias transfer roll part number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: fc3a32dba72945d89809c0c202fab5d2
|
||||||
|
name: Second Bias Transfer Roll Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.11]
|
||||||
|
key: printer.transfer.roller.level
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Second bias transfer roll remaining life percentage
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: other_supplies
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 371a3230e24c4f41841a0f2f58a81e34
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.transfer.roller.level)<20 and length(last(/Printer SNMP Monitor/printer.transfer.roller))>0
|
||||||
|
name: Second Bias Transfer Roll Level is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Second Bias Transfer Roll Level has dropped below 20%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 6210babed1284bfc890a00d05328dedf
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.transfer.roller.level)<10 and length(last(/Printer SNMP Monitor/printer.transfer.roller))>0
|
||||||
|
name: Second Bias Transfer Roll Level is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Second Bias Transfer Roll Level has dropped below 10%. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 94f4bb2c7f8c494ead740f091846f978
|
||||||
|
name: Maintenance Kit Model (HP)
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0]
|
||||||
|
key: printer.maintenance.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: HP maintenance kit model/serial number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: maintenance_kit_hp
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: dfa98041e7b24981bc41bb3d05dacd77
|
||||||
|
name: Maintenance Kit Remaining (HP)
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.0]
|
||||||
|
key: printer.maintenance.remaining
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: HP maintenance kit remaining pages
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: maintenance_kit_hp
|
||||||
|
units: pages
|
||||||
|
triggers:
|
||||||
|
- uuid: 30b01b873ae643e99c1b55efa7584313
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.maintenance.remaining)<10000 and length(last(/Printer SNMP Monitor/printer.maintenance.model))>0
|
||||||
|
name: Maintenance Kit Remaining (HP) is low on {{HOST.NAME}}
|
||||||
|
priority: WARNING
|
||||||
|
description: 'Maintenance Kit Remaining (HP) has dropped below 10000pages. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 59b58b9fb96e448f8907a68ab21a68bd
|
||||||
|
expression: last(/Printer SNMP Monitor/printer.maintenance.remaining)<5000 and length(last(/Printer SNMP Monitor/printer.maintenance.model))>0
|
||||||
|
name: Maintenance Kit Remaining (HP) is low on {{HOST.NAME}}
|
||||||
|
priority: HIGH
|
||||||
|
description: 'Maintenance Kit Remaining (HP) has dropped below 5000pages. Replacement part: {ITEM.LASTVALUE2}'
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 3352d313b0cf499f8a22e14d9f36e7ce
|
||||||
|
name: Printer Model (HP MIB)
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.2.0]
|
||||||
|
key: printer.maintenance.printer_model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer model from HP maintenance MIB
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: maintenance_kit_hp
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 3126905128cc4eb78326021449df7d67
|
||||||
|
name: Supply 1 Max Capacity
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.10.2.1.4.1.1]
|
||||||
|
key: printer.supply.1.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Maximum capacity for supply index 1 (usually black)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: supply_capacity
|
||||||
|
- uuid: 329ab388b8664648877bedf551dd370d
|
||||||
|
name: Supply 1 Current Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.10.2.1.9.1.1]
|
||||||
|
key: printer.supply.1.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Current level for supply index 1 (usually black)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: category
|
||||||
|
value: supply_capacity
|
||||||
718
zabbix_template_hp_color.json
Normal file
718
zabbix_template_hp_color.json
Normal file
@@ -0,0 +1,718 @@
|
|||||||
|
{
|
||||||
|
"zabbix_export": {
|
||||||
|
"version": "7.4",
|
||||||
|
"template_groups": [
|
||||||
|
{
|
||||||
|
"uuid": "3cd4e8d0b828464e8f4b3becf13a9dbd",
|
||||||
|
"name": "Printers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"templates": [
|
||||||
|
{
|
||||||
|
"uuid": "5b4251076337468bb04052554407101c",
|
||||||
|
"template": "HP LaserJet - Color",
|
||||||
|
"name": "HP LaserJet - Color",
|
||||||
|
"description": "HP Color LaserJet printers (all models)",
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "Printers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"uuid": "cd75da9e4de041e0bb9f3e57900f8b6d",
|
||||||
|
"name": "Printer Model",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.25.3.2.1.3.1]",
|
||||||
|
"key": "printer.model",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Printer Model",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "374e92b48ce549f3a04d675bf9bb6e70",
|
||||||
|
"name": "Printer Hostname",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.1.5.0]",
|
||||||
|
"key": "printer.hostname",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Printer Hostname",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "8aaaf6bdd8e84052bcb8bb596f5a1d43",
|
||||||
|
"name": "Printer Serial Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.5.1.1.17.1]",
|
||||||
|
"key": "printer.serial",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Printer Serial Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "132dfbc5a4884d7ba499bc2fe91c0f84",
|
||||||
|
"name": "System Location",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.1.6.0]",
|
||||||
|
"key": "printer.location",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "System Location",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "d31c61cec36f4ae68468e27e694e3218",
|
||||||
|
"name": "Black Toner Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.6.1.1]",
|
||||||
|
"key": "printer.cartridge.black",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Black Toner Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "bb6a571308fd46bc85988ce6477efc55",
|
||||||
|
"name": "Black Toner Current",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.9.1.1]",
|
||||||
|
"key": "printer.toner.black.current",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Black Toner Current",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "45367819a65141f893c7b7bd507953a1",
|
||||||
|
"name": "Black Toner Max",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.8.1.1]",
|
||||||
|
"key": "printer.toner.black.max",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Black Toner Max",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "b569608c9cdf40f5819a84720033b034",
|
||||||
|
"name": "Black Toner Level",
|
||||||
|
"type": "CALCULATED",
|
||||||
|
"key": "printer.toner.black",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"params": "round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)",
|
||||||
|
"description": "Black Toner Level",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "supplies"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "level"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "color",
|
||||||
|
"value": "black"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"units": "%",
|
||||||
|
"triggers": [
|
||||||
|
{
|
||||||
|
"uuid": "3a0f279ecf0f4556a29f2a40c2208827",
|
||||||
|
"expression": "last(/HP LaserJet - Color/printer.toner.black)<20 and length(last(/HP LaserJet - Color/printer.cartridge.black))>0",
|
||||||
|
"name": "Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "WARNING",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "50969fda64a24d43bdbeca9fe95fc91b",
|
||||||
|
"expression": "last(/HP LaserJet - Color/printer.toner.black)<10 and length(last(/HP LaserJet - Color/printer.cartridge.black))>0",
|
||||||
|
"name": "Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "HIGH",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "a6fd78dc1d36425bac353be9c51d14f3",
|
||||||
|
"name": "Cyan Toner Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.6.1.2]",
|
||||||
|
"key": "printer.cartridge.cyan",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Cyan Toner Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "a4babdb9346a4dc7b571ce91338d942f",
|
||||||
|
"name": "Cyan Toner Current",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.9.1.2]",
|
||||||
|
"key": "printer.toner.cyan.current",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Cyan Toner Current",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "10c4d323bd0f4382915198aa164d4841",
|
||||||
|
"name": "Cyan Toner Max",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.8.1.2]",
|
||||||
|
"key": "printer.toner.cyan.max",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Cyan Toner Max",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "cc368936127a4d79b96770b2d7617525",
|
||||||
|
"name": "Cyan Toner Level",
|
||||||
|
"type": "CALCULATED",
|
||||||
|
"key": "printer.toner.cyan",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"params": "round((last(//printer.toner.cyan.current)/last(//printer.toner.cyan.max))*100,0)",
|
||||||
|
"description": "Cyan Toner Level",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "supplies"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "level"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "color",
|
||||||
|
"value": "cyan"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"units": "%",
|
||||||
|
"triggers": [
|
||||||
|
{
|
||||||
|
"uuid": "c8a211b0cfb445d8b1425f7c9d8a50f8",
|
||||||
|
"expression": "last(/HP LaserJet - Color/printer.toner.cyan)<20 and length(last(/HP LaserJet - Color/printer.cartridge.cyan))>0",
|
||||||
|
"name": "Cyan Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "WARNING",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "7de45329db3143fe8ba99c7ec88d01fa",
|
||||||
|
"expression": "last(/HP LaserJet - Color/printer.toner.cyan)<10 and length(last(/HP LaserJet - Color/printer.cartridge.cyan))>0",
|
||||||
|
"name": "Cyan Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "HIGH",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "8308972f1147410faa4a860d3029a2f7",
|
||||||
|
"name": "Magenta Toner Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.6.1.3]",
|
||||||
|
"key": "printer.cartridge.magenta",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Magenta Toner Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "c676b81f7ae248388105333b1a0e232d",
|
||||||
|
"name": "Magenta Toner Current",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.9.1.3]",
|
||||||
|
"key": "printer.toner.magenta.current",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Magenta Toner Current",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "deb6ac4789814d948a0e51c25c6dd7e6",
|
||||||
|
"name": "Magenta Toner Max",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.8.1.3]",
|
||||||
|
"key": "printer.toner.magenta.max",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Magenta Toner Max",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "684ef735b4994be081507955dbb2c739",
|
||||||
|
"name": "Magenta Toner Level",
|
||||||
|
"type": "CALCULATED",
|
||||||
|
"key": "printer.toner.magenta",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"params": "round((last(//printer.toner.magenta.current)/last(//printer.toner.magenta.max))*100,0)",
|
||||||
|
"description": "Magenta Toner Level",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "supplies"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "level"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "color",
|
||||||
|
"value": "magenta"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"units": "%",
|
||||||
|
"triggers": [
|
||||||
|
{
|
||||||
|
"uuid": "e2fe4c5aa88543329b92feb052851fad",
|
||||||
|
"expression": "last(/HP LaserJet - Color/printer.toner.magenta)<20 and length(last(/HP LaserJet - Color/printer.cartridge.magenta))>0",
|
||||||
|
"name": "Magenta Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "WARNING",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "452b391488114b42b2a8790d494f4797",
|
||||||
|
"expression": "last(/HP LaserJet - Color/printer.toner.magenta)<10 and length(last(/HP LaserJet - Color/printer.cartridge.magenta))>0",
|
||||||
|
"name": "Magenta Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "HIGH",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "01469d513b354c09ac4391ea1ed29a31",
|
||||||
|
"name": "Yellow Toner Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.6.1.4]",
|
||||||
|
"key": "printer.cartridge.yellow",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Yellow Toner Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "cee83b3849644ea08de1d9d2b8ab9925",
|
||||||
|
"name": "Yellow Toner Current",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.9.1.4]",
|
||||||
|
"key": "printer.toner.yellow.current",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Yellow Toner Current",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "e42d93341a2a44dc9cc8017c50984753",
|
||||||
|
"name": "Yellow Toner Max",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.8.1.4]",
|
||||||
|
"key": "printer.toner.yellow.max",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Yellow Toner Max",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "1930935043d34c279c57c14558bb8504",
|
||||||
|
"name": "Yellow Toner Level",
|
||||||
|
"type": "CALCULATED",
|
||||||
|
"key": "printer.toner.yellow",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"params": "round((last(//printer.toner.yellow.current)/last(//printer.toner.yellow.max))*100,0)",
|
||||||
|
"description": "Yellow Toner Level",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "supplies"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "level"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "color",
|
||||||
|
"value": "yellow"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"units": "%",
|
||||||
|
"triggers": [
|
||||||
|
{
|
||||||
|
"uuid": "9388fa0b74d947c1962023be87118bd2",
|
||||||
|
"expression": "last(/HP LaserJet - Color/printer.toner.yellow)<20 and length(last(/HP LaserJet - Color/printer.cartridge.yellow))>0",
|
||||||
|
"name": "Yellow Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "WARNING",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "35ab015073364b8897b00b7e1beeb368",
|
||||||
|
"expression": "last(/HP LaserJet - Color/printer.toner.yellow)<10 and length(last(/HP LaserJet - Color/printer.cartridge.yellow))>0",
|
||||||
|
"name": "Yellow Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "HIGH",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
453
zabbix_template_hp_color.yaml
Normal file
453
zabbix_template_hp_color.yaml
Normal file
@@ -0,0 +1,453 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.4'
|
||||||
|
template_groups:
|
||||||
|
- uuid: 3cd4e8d0b828464e8f4b3becf13a9dbd
|
||||||
|
name: Printers
|
||||||
|
templates:
|
||||||
|
- uuid: 5b4251076337468bb04052554407101c
|
||||||
|
template: HP LaserJet - Color
|
||||||
|
name: HP LaserJet - Color
|
||||||
|
description: HP Color LaserJet printers (all models)
|
||||||
|
groups:
|
||||||
|
- name: Printers
|
||||||
|
items:
|
||||||
|
- uuid: cd75da9e4de041e0bb9f3e57900f8b6d
|
||||||
|
name: Printer Model
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.25.3.2.1.3.1]
|
||||||
|
key: printer.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Model
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 374e92b48ce549f3a04d675bf9bb6e70
|
||||||
|
name: Printer Hostname
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.5.0]
|
||||||
|
key: printer.hostname
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Hostname
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 8aaaf6bdd8e84052bcb8bb596f5a1d43
|
||||||
|
name: Printer Serial Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.5.1.1.17.1]
|
||||||
|
key: printer.serial
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Serial Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 132dfbc5a4884d7ba499bc2fe91c0f84
|
||||||
|
name: System Location
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.6.0]
|
||||||
|
key: printer.location
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: System Location
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: d31c61cec36f4ae68468e27e694e3218
|
||||||
|
name: Black Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.1]
|
||||||
|
key: printer.cartridge.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Black Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: bb6a571308fd46bc85988ce6477efc55
|
||||||
|
name: Black Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.1]
|
||||||
|
key: printer.toner.black.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 45367819a65141f893c7b7bd507953a1
|
||||||
|
name: Black Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.1]
|
||||||
|
key: printer.toner.black.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: b569608c9cdf40f5819a84720033b034
|
||||||
|
name: Black Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)
|
||||||
|
description: Black Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: black
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 3a0f279ecf0f4556a29f2a40c2208827
|
||||||
|
expression: last(/HP LaserJet - Color/printer.toner.black)<20 and length(last(/HP LaserJet - Color/printer.cartridge.black))>0
|
||||||
|
name: 'Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 50969fda64a24d43bdbeca9fe95fc91b
|
||||||
|
expression: last(/HP LaserJet - Color/printer.toner.black)<10 and length(last(/HP LaserJet - Color/printer.cartridge.black))>0
|
||||||
|
name: 'Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: a6fd78dc1d36425bac353be9c51d14f3
|
||||||
|
name: Cyan Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.2]
|
||||||
|
key: printer.cartridge.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Cyan Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: a4babdb9346a4dc7b571ce91338d942f
|
||||||
|
name: Cyan Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.2]
|
||||||
|
key: printer.toner.cyan.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 10c4d323bd0f4382915198aa164d4841
|
||||||
|
name: Cyan Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.2]
|
||||||
|
key: printer.toner.cyan.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: cc368936127a4d79b96770b2d7617525
|
||||||
|
name: Cyan Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.cyan.current)/last(//printer.toner.cyan.max))*100,0)
|
||||||
|
description: Cyan Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: cyan
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: c8a211b0cfb445d8b1425f7c9d8a50f8
|
||||||
|
expression: last(/HP LaserJet - Color/printer.toner.cyan)<20 and length(last(/HP LaserJet - Color/printer.cartridge.cyan))>0
|
||||||
|
name: 'Cyan Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 7de45329db3143fe8ba99c7ec88d01fa
|
||||||
|
expression: last(/HP LaserJet - Color/printer.toner.cyan)<10 and length(last(/HP LaserJet - Color/printer.cartridge.cyan))>0
|
||||||
|
name: 'Cyan Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 8308972f1147410faa4a860d3029a2f7
|
||||||
|
name: Magenta Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.3]
|
||||||
|
key: printer.cartridge.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Magenta Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: c676b81f7ae248388105333b1a0e232d
|
||||||
|
name: Magenta Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.3]
|
||||||
|
key: printer.toner.magenta.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: deb6ac4789814d948a0e51c25c6dd7e6
|
||||||
|
name: Magenta Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.3]
|
||||||
|
key: printer.toner.magenta.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 684ef735b4994be081507955dbb2c739
|
||||||
|
name: Magenta Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.magenta.current)/last(//printer.toner.magenta.max))*100,0)
|
||||||
|
description: Magenta Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: magenta
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: e2fe4c5aa88543329b92feb052851fad
|
||||||
|
expression: last(/HP LaserJet - Color/printer.toner.magenta)<20 and length(last(/HP LaserJet - Color/printer.cartridge.magenta))>0
|
||||||
|
name: 'Magenta Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 452b391488114b42b2a8790d494f4797
|
||||||
|
expression: last(/HP LaserJet - Color/printer.toner.magenta)<10 and length(last(/HP LaserJet - Color/printer.cartridge.magenta))>0
|
||||||
|
name: 'Magenta Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 01469d513b354c09ac4391ea1ed29a31
|
||||||
|
name: Yellow Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.4]
|
||||||
|
key: printer.cartridge.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Yellow Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: cee83b3849644ea08de1d9d2b8ab9925
|
||||||
|
name: Yellow Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.4]
|
||||||
|
key: printer.toner.yellow.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: e42d93341a2a44dc9cc8017c50984753
|
||||||
|
name: Yellow Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.4]
|
||||||
|
key: printer.toner.yellow.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 1930935043d34c279c57c14558bb8504
|
||||||
|
name: Yellow Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.yellow.current)/last(//printer.toner.yellow.max))*100,0)
|
||||||
|
description: Yellow Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: yellow
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 9388fa0b74d947c1962023be87118bd2
|
||||||
|
expression: last(/HP LaserJet - Color/printer.toner.yellow)<20 and length(last(/HP LaserJet - Color/printer.cartridge.yellow))>0
|
||||||
|
name: 'Yellow Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 35ab015073364b8897b00b7e1beeb368
|
||||||
|
expression: last(/HP LaserJet - Color/printer.toner.yellow)<10 and length(last(/HP LaserJet - Color/printer.cartridge.yellow))>0
|
||||||
|
name: 'Yellow Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
407
zabbix_template_hp_designjet_t1700.yaml
Normal file
407
zabbix_template_hp_designjet_t1700.yaml
Normal file
@@ -0,0 +1,407 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.4'
|
||||||
|
template_groups:
|
||||||
|
- uuid: 3cd4e8d0b828464e8f4b3becf13a9dbd
|
||||||
|
name: Printers
|
||||||
|
templates:
|
||||||
|
- uuid: cc0010f556eb4cb2bad376dcc3a9ad48
|
||||||
|
template: HP DesignJet T1700
|
||||||
|
name: HP DesignJet T1700
|
||||||
|
description: 'HP DesignJet T1700/T1700dr PostScript Large Format Printer (44" wide) with 6-color ink system.
|
||||||
|
|
||||||
|
Uses HP-specific OIDs for ink levels (1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.X.1.0)
|
||||||
|
|
||||||
|
|
||||||
|
Correct HP 730 300ml cartridge mapping (verified from actual installation):
|
||||||
|
|
||||||
|
- P2V68A = Cyan
|
||||||
|
|
||||||
|
- P2V69A = Magenta
|
||||||
|
|
||||||
|
- P2V70A = Yellow
|
||||||
|
|
||||||
|
- P2V71A = Matte Black
|
||||||
|
|
||||||
|
- P2V72A = Gray
|
||||||
|
|
||||||
|
- P2V73A = Photo Black'
|
||||||
|
groups:
|
||||||
|
- name: Printers
|
||||||
|
items:
|
||||||
|
- uuid: 28f681e3fa0c4dd1a770bd84f537c01f
|
||||||
|
name: Printer Model
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.25.3.2.1.3.1
|
||||||
|
key: printer.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Model
|
||||||
|
preprocessing: &id001
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 24c3f04df954430d9afa4af057edf563
|
||||||
|
name: Printer Hostname
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.1.5.0
|
||||||
|
key: printer.hostname
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Hostname
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 92c3223b193546b89d43ab18e831e518
|
||||||
|
name: Printer Serial Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0
|
||||||
|
key: printer.serial
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Serial Number (HP-specific OID)
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 42c7f27d030b4498a083bd9837dadf28
|
||||||
|
name: System Location
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.1.6.0
|
||||||
|
key: printer.location
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: System Location
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 31edf9cd21fb444a8df1ca6d8f3208ac
|
||||||
|
name: Firmware Version
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.6.0
|
||||||
|
key: printer.firmware
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Firmware Version
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: edb403c646ac4b80af0473dce49569e3
|
||||||
|
name: Matte Black Ink Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.3
|
||||||
|
key: printer.cartridge.matte_black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Matte Black Ink Cartridge Part Number (HP 730 P2V71A)
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: b59e604c50684e1a93b42e2c5ff9193b
|
||||||
|
name: Matte Black Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.3.1.0
|
||||||
|
key: printer.ink.matte_black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Matte Black Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: matte_black
|
||||||
|
triggers:
|
||||||
|
- uuid: 11a36271e33b464590c4004f14779875
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.matte_black)<20 and length(last(/HP DesignJet T1700/printer.cartridge.matte_black))>0
|
||||||
|
name: 'Matte Black Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: c74bea431f284f99a226303bd1a8c4fa
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.matte_black)<10 and length(last(/HP DesignJet T1700/printer.cartridge.matte_black))>0
|
||||||
|
name: 'Matte Black Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: ca0401e4b6ad4ea4a3997aa784f0cf44
|
||||||
|
name: Photo Black Ink Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.2
|
||||||
|
key: printer.cartridge.photo_black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Photo Black Ink Cartridge Part Number (HP 730 P2V73A)
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 696a16edeec14b8eb49e8faaecc620a0
|
||||||
|
name: Photo Black Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.2.1.0
|
||||||
|
key: printer.ink.photo_black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Photo Black Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: photo_black
|
||||||
|
triggers:
|
||||||
|
- uuid: 3546b3857d41408dbe0c9bdca2894d3d
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.photo_black)<20 and length(last(/HP DesignJet T1700/printer.cartridge.photo_black))>0
|
||||||
|
name: 'Photo Black Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 86bdf2ac709c4aa190fff165854d1ac1
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.photo_black)<10 and length(last(/HP DesignJet T1700/printer.cartridge.photo_black))>0
|
||||||
|
name: 'Photo Black Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: f556642dedc0478199756286434e402e
|
||||||
|
name: Cyan Ink Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.6
|
||||||
|
key: printer.cartridge.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Cyan Ink Cartridge Part Number (HP 730 P2V68A)
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 08bdb3aae6d241b3b7deb7710e3a975c
|
||||||
|
name: Cyan Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.6.1.0
|
||||||
|
key: printer.ink.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Cyan Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: cyan
|
||||||
|
triggers:
|
||||||
|
- uuid: 1631b17f908a4f3db74f64d1d5d8777e
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.cyan)<20 and length(last(/HP DesignJet T1700/printer.cartridge.cyan))>0
|
||||||
|
name: 'Cyan Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 0e9990ee0cd9456b9ceb1f92296aa6de
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.cyan)<10 and length(last(/HP DesignJet T1700/printer.cartridge.cyan))>0
|
||||||
|
name: 'Cyan Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 3b5fa9757ad94156853abcc84835f2e7
|
||||||
|
name: Magenta Ink Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.5
|
||||||
|
key: printer.cartridge.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Magenta Ink Cartridge Part Number (HP 730 P2V69A)
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 2f282ed4cf084d08a979c55950cef358
|
||||||
|
name: Magenta Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.5.1.0
|
||||||
|
key: printer.ink.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Magenta Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: magenta
|
||||||
|
triggers:
|
||||||
|
- uuid: 919c27a3aedb4f76a9f59e603e5dcded
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.magenta)<20 and length(last(/HP DesignJet T1700/printer.cartridge.magenta))>0
|
||||||
|
name: 'Magenta Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: a25e8aeaba3f4e18ba40708d66c07094
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.magenta)<10 and length(last(/HP DesignJet T1700/printer.cartridge.magenta))>0
|
||||||
|
name: 'Magenta Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 8066d531aeef4232a2f86c7673dcb0ca
|
||||||
|
name: Yellow Ink Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.4
|
||||||
|
key: printer.cartridge.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Yellow Ink Cartridge Part Number (HP 730 P2V70A)
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: b4c3b5b7a70e4479adc666bfa2b5dee5
|
||||||
|
name: Yellow Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.4.1.0
|
||||||
|
key: printer.ink.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Yellow Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: yellow
|
||||||
|
triggers:
|
||||||
|
- uuid: 45590af45de840b691c9ce240ea59358
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.yellow)<20 and length(last(/HP DesignJet T1700/printer.cartridge.yellow))>0
|
||||||
|
name: 'Yellow Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 0a60116b422e44398fe9965e78efde24
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.yellow)<10 and length(last(/HP DesignJet T1700/printer.cartridge.yellow))>0
|
||||||
|
name: 'Yellow Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: d2d5e4c992b1430b96a0c81001bda0f4
|
||||||
|
name: Gray Ink Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.1
|
||||||
|
key: printer.cartridge.gray
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Gray Ink Cartridge Part Number (HP 730 P2V72A)
|
||||||
|
preprocessing: *id001
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 62fd4c82a74c405993e2133fc2482bdf
|
||||||
|
name: Gray Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.1.1.0
|
||||||
|
key: printer.ink.gray
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Gray Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: gray
|
||||||
|
triggers:
|
||||||
|
- uuid: d4ff92150d2b4cc693ab656efe57748f
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.gray)<20 and length(last(/HP DesignJet T1700/printer.cartridge.gray))>0
|
||||||
|
name: 'Gray Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: d99de94b22c24ef69154f5719f5b865f
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.gray)<10 and length(last(/HP DesignJet T1700/printer.cartridge.gray))>0
|
||||||
|
name: 'Gray Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
378
zabbix_template_hp_designjet_t1700_v2.yaml
Normal file
378
zabbix_template_hp_designjet_t1700_v2.yaml
Normal file
@@ -0,0 +1,378 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.4'
|
||||||
|
template_groups:
|
||||||
|
- uuid: 3cd4e8d0b828464e8f4b3becf13a9dbd
|
||||||
|
name: Printers
|
||||||
|
templates:
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d
|
||||||
|
template: HP DesignJet T1700
|
||||||
|
name: HP DesignJet T1700
|
||||||
|
description: |
|
||||||
|
HP DesignJet T1700/T1700dr PostScript Large Format Printer (44" wide) with 6-color ink system.
|
||||||
|
Uses HP-specific OIDs for ink levels (1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.X.1.0)
|
||||||
|
groups:
|
||||||
|
- name: Printers
|
||||||
|
items:
|
||||||
|
- uuid: fafe30cd886a4101ad26dcb05a350c00
|
||||||
|
name: Printer Model
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.25.3.2.1.3.1
|
||||||
|
key: printer.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Model
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: ffacedf934484723bc7a4172b88885ec
|
||||||
|
name: Printer Hostname
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.1.5.0
|
||||||
|
key: printer.hostname
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Hostname
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: feedac9ef35b4d47a8811460c68d571d
|
||||||
|
name: Printer Serial Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0
|
||||||
|
key: printer.serial
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Serial Number (HP-specific OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 8be8122000a344f4b047ecae6d8fcd9b
|
||||||
|
name: System Location
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.1.6.0
|
||||||
|
key: printer.location
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: System Location
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c01
|
||||||
|
name: Matte Black Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.1
|
||||||
|
key: printer.cartridge.matte_black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Matte Black Ink Cartridge Part Number (HP 730 P2V72A)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c04
|
||||||
|
name: Matte Black Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.1.1.0
|
||||||
|
key: printer.ink.matte_black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Matte Black Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: matte_black
|
||||||
|
triggers:
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c05
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.matte_black)<20 and length(last(/HP DesignJet T1700/printer.cartridge.matte_black))>0
|
||||||
|
name: 'Matte Black Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c06
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.matte_black)<10 and length(last(/HP DesignJet T1700/printer.cartridge.matte_black))>0
|
||||||
|
name: 'Matte Black Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c07
|
||||||
|
name: Cyan Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.2
|
||||||
|
key: printer.cartridge.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Cyan Ink Cartridge Part Number (HP 730 P2V73A)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c0a
|
||||||
|
name: Cyan Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.2.1.0
|
||||||
|
key: printer.ink.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Cyan Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: cyan
|
||||||
|
triggers:
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c0b
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.cyan)<20 and length(last(/HP DesignJet T1700/printer.cartridge.cyan))>0
|
||||||
|
name: 'Cyan Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c0c
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.cyan)<10 and length(last(/HP DesignJet T1700/printer.cartridge.cyan))>0
|
||||||
|
name: 'Cyan Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c0d
|
||||||
|
name: Magenta Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.3
|
||||||
|
key: printer.cartridge.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Magenta Ink Cartridge Part Number (HP 730 P2V71A)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c10
|
||||||
|
name: Magenta Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.3.1.0
|
||||||
|
key: printer.ink.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Magenta Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: magenta
|
||||||
|
triggers:
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c11
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.magenta)<20 and length(last(/HP DesignJet T1700/printer.cartridge.magenta))>0
|
||||||
|
name: 'Magenta Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c12
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.magenta)<10 and length(last(/HP DesignJet T1700/printer.cartridge.magenta))>0
|
||||||
|
name: 'Magenta Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c13
|
||||||
|
name: Yellow Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.4
|
||||||
|
key: printer.cartridge.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Yellow Ink Cartridge Part Number (HP 730 P2V70A)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c16
|
||||||
|
name: Yellow Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.4.1.0
|
||||||
|
key: printer.ink.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Yellow Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: yellow
|
||||||
|
triggers:
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c17
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.yellow)<20 and length(last(/HP DesignJet T1700/printer.cartridge.yellow))>0
|
||||||
|
name: 'Yellow Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c18
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.yellow)<10 and length(last(/HP DesignJet T1700/printer.cartridge.yellow))>0
|
||||||
|
name: 'Yellow Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c19
|
||||||
|
name: Photo Black Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.5
|
||||||
|
key: printer.cartridge.photo_black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Photo Black Ink Cartridge Part Number (HP 730 P2V69A)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c1c
|
||||||
|
name: Photo Black Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.5.1.0
|
||||||
|
key: printer.ink.photo_black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Photo Black Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: photo_black
|
||||||
|
triggers:
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c1d
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.photo_black)<20 and length(last(/HP DesignJet T1700/printer.cartridge.photo_black))>0
|
||||||
|
name: 'Photo Black Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c1e
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.photo_black)<10 and length(last(/HP DesignJet T1700/printer.cartridge.photo_black))>0
|
||||||
|
name: 'Photo Black Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c1f
|
||||||
|
name: Gray Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.2.1.43.11.1.1.6.1.6
|
||||||
|
key: printer.cartridge.gray
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Gray Ink Cartridge Part Number (HP 730 P2V68A)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c22
|
||||||
|
name: Gray Ink Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.5.4.6.1.0
|
||||||
|
key: printer.ink.gray
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
units: '%'
|
||||||
|
description: Gray Ink Level Percentage (HP proprietary OID)
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: gray
|
||||||
|
triggers:
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c23
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.gray)<20 and length(last(/HP DesignJet T1700/printer.cartridge.gray))>0
|
||||||
|
name: 'Gray Ink Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c24
|
||||||
|
expression: last(/HP DesignJet T1700/printer.ink.gray)<10 and length(last(/HP DesignJet T1700/printer.cartridge.gray))>0
|
||||||
|
name: 'Gray Ink Level is critically low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}%. Replacement part: {{ITEM.LASTVALUE2}}'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c25
|
||||||
|
name: Firmware Version
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: 1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.6.0
|
||||||
|
key: printer.firmware
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Firmware Version
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
364
zabbix_template_hp_mono.json
Normal file
364
zabbix_template_hp_mono.json
Normal file
@@ -0,0 +1,364 @@
|
|||||||
|
{
|
||||||
|
"zabbix_export": {
|
||||||
|
"version": "7.4",
|
||||||
|
"template_groups": [
|
||||||
|
{
|
||||||
|
"uuid": "3cd4e8d0b828464e8f4b3becf13a9dbd",
|
||||||
|
"name": "Printers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"templates": [
|
||||||
|
{
|
||||||
|
"uuid": "737fbe29a53540109e13ebbf61ed6eec",
|
||||||
|
"template": "HP LaserJet - Monochrome",
|
||||||
|
"name": "HP LaserJet - Monochrome",
|
||||||
|
"description": "HP LaserJet printers (all models - mono)",
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "Printers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"uuid": "227f072b96694bff9c5d908652957c23",
|
||||||
|
"name": "Printer Model",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.25.3.2.1.3.1]",
|
||||||
|
"key": "printer.model",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Printer Model",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "7e8af2ec750a4ca59fd36cb431ad406c",
|
||||||
|
"name": "Printer Hostname",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.1.5.0]",
|
||||||
|
"key": "printer.hostname",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Printer Hostname",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "845eb41cb4c44404a30cf25b3dd27625",
|
||||||
|
"name": "Printer Serial Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.5.1.1.17.1]",
|
||||||
|
"key": "printer.serial",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Printer Serial Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "9b6c3fe6dc57455ab27e0fc37dda9548",
|
||||||
|
"name": "System Location",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.1.6.0]",
|
||||||
|
"key": "printer.location",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "System Location",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "8048a1831e60432d92d68ed84b14337b",
|
||||||
|
"name": "Black Toner Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.6.1.1]",
|
||||||
|
"key": "printer.cartridge.black",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Black Toner Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "e8a6e88325684ba7becb20cd7594e3ee",
|
||||||
|
"name": "Black Toner Current",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.9.1.1]",
|
||||||
|
"key": "printer.toner.black.current",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Black Toner Current",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "fcb17eb74a054da9956f58b1fc6f1966",
|
||||||
|
"name": "Black Toner Max",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.8.1.1]",
|
||||||
|
"key": "printer.toner.black.max",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Black Toner Max",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "fa8cdd36a1c145aba509a1fa1cb45fa6",
|
||||||
|
"name": "Black Toner Level",
|
||||||
|
"type": "CALCULATED",
|
||||||
|
"key": "printer.toner.black",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"params": "round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)",
|
||||||
|
"description": "Black Toner Level",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "supplies"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "level"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"units": "%",
|
||||||
|
"triggers": [
|
||||||
|
{
|
||||||
|
"uuid": "50d1ec3985124431b218e560976a7f74",
|
||||||
|
"expression": "last(/HP LaserJet - Monochrome/printer.toner.black)<20 and length(last(/HP LaserJet - Monochrome/printer.cartridge.black))>0",
|
||||||
|
"name": "Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "WARNING",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "8b3fd779d96242a283b4e624da3fd84c",
|
||||||
|
"expression": "last(/HP LaserJet - Monochrome/printer.toner.black)<10 and length(last(/HP LaserJet - Monochrome/printer.cartridge.black))>0",
|
||||||
|
"name": "Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "HIGH",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "2f42ce1f233c4d8cb5e3b1dedd4d7ddb",
|
||||||
|
"name": "Maintenance Kit Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0]",
|
||||||
|
"key": "printer.maintenance.model",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Maintenance Kit Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "6dd361f669354c1f8e4c7d8a06de531d",
|
||||||
|
"name": "Maintenance Kit Remaining",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.0]",
|
||||||
|
"key": "printer.maintenance.remaining",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Maintenance Kit Remaining",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"units": "pages",
|
||||||
|
"triggers": [
|
||||||
|
{
|
||||||
|
"uuid": "2f962a6eab824126b1270e464e265d97",
|
||||||
|
"expression": "last(/HP LaserJet - Monochrome/printer.maintenance.remaining)<10000 and length(last(/HP LaserJet - Monochrome/printer.maintenance.model))>0",
|
||||||
|
"name": "Maintenance Kit Remaining is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "WARNING",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "67f1ab49058d4be89b40ba9eff8c027b",
|
||||||
|
"expression": "last(/HP LaserJet - Monochrome/printer.maintenance.remaining)<5000 and length(last(/HP LaserJet - Monochrome/printer.maintenance.model))>0",
|
||||||
|
"name": "Maintenance Kit Remaining is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "HIGH",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
229
zabbix_template_hp_mono.yaml
Normal file
229
zabbix_template_hp_mono.yaml
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.4'
|
||||||
|
template_groups:
|
||||||
|
- uuid: 3cd4e8d0b828464e8f4b3becf13a9dbd
|
||||||
|
name: Printers
|
||||||
|
templates:
|
||||||
|
- uuid: 737fbe29a53540109e13ebbf61ed6eec
|
||||||
|
template: HP LaserJet - Monochrome
|
||||||
|
name: HP LaserJet - Monochrome
|
||||||
|
description: HP LaserJet printers (all models - mono)
|
||||||
|
groups:
|
||||||
|
- name: Printers
|
||||||
|
items:
|
||||||
|
- uuid: 227f072b96694bff9c5d908652957c23
|
||||||
|
name: Printer Model
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.25.3.2.1.3.1]
|
||||||
|
key: printer.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Model
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 7e8af2ec750a4ca59fd36cb431ad406c
|
||||||
|
name: Printer Hostname
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.5.0]
|
||||||
|
key: printer.hostname
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Hostname
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 845eb41cb4c44404a30cf25b3dd27625
|
||||||
|
name: Printer Serial Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.5.1.1.17.1]
|
||||||
|
key: printer.serial
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Serial Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 9b6c3fe6dc57455ab27e0fc37dda9548
|
||||||
|
name: System Location
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.6.0]
|
||||||
|
key: printer.location
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: System Location
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 8048a1831e60432d92d68ed84b14337b
|
||||||
|
name: Black Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.1]
|
||||||
|
key: printer.cartridge.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Black Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: e8a6e88325684ba7becb20cd7594e3ee
|
||||||
|
name: Black Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.1]
|
||||||
|
key: printer.toner.black.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: fcb17eb74a054da9956f58b1fc6f1966
|
||||||
|
name: Black Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.1]
|
||||||
|
key: printer.toner.black.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: fa8cdd36a1c145aba509a1fa1cb45fa6
|
||||||
|
name: Black Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)
|
||||||
|
description: Black Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 50d1ec3985124431b218e560976a7f74
|
||||||
|
expression: last(/HP LaserJet - Monochrome/printer.toner.black)<20 and length(last(/HP LaserJet - Monochrome/printer.cartridge.black))>0
|
||||||
|
name: 'Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 8b3fd779d96242a283b4e624da3fd84c
|
||||||
|
expression: last(/HP LaserJet - Monochrome/printer.toner.black)<10 and length(last(/HP LaserJet - Monochrome/printer.cartridge.black))>0
|
||||||
|
name: 'Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 2f42ce1f233c4d8cb5e3b1dedd4d7ddb
|
||||||
|
name: Maintenance Kit Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0]
|
||||||
|
key: printer.maintenance.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Maintenance Kit Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 6dd361f669354c1f8e4c7d8a06de531d
|
||||||
|
name: Maintenance Kit Remaining
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.0]
|
||||||
|
key: printer.maintenance.remaining
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Maintenance Kit Remaining
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
units: pages
|
||||||
|
triggers:
|
||||||
|
- uuid: 2f962a6eab824126b1270e464e265d97
|
||||||
|
expression: last(/HP LaserJet - Monochrome/printer.maintenance.remaining)<10000 and length(last(/HP LaserJet - Monochrome/printer.maintenance.model))>0
|
||||||
|
name: 'Maintenance Kit Remaining is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 67f1ab49058d4be89b40ba9eff8c027b
|
||||||
|
expression: last(/HP LaserJet - Monochrome/printer.maintenance.remaining)<5000 and length(last(/HP LaserJet - Monochrome/printer.maintenance.model))>0
|
||||||
|
name: 'Maintenance Kit Remaining is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
1451
zabbix_template_xerox_color.json
Normal file
1451
zabbix_template_xerox_color.json
Normal file
File diff suppressed because it is too large
Load Diff
924
zabbix_template_xerox_color.yaml
Normal file
924
zabbix_template_xerox_color.yaml
Normal file
@@ -0,0 +1,924 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.4'
|
||||||
|
template_groups:
|
||||||
|
- uuid: 3cd4e8d0b828464e8f4b3becf13a9dbd
|
||||||
|
name: Printers
|
||||||
|
templates:
|
||||||
|
- uuid: b642a0ea839c4027a7e6a52a245c3451
|
||||||
|
template: Xerox VersaLink - Color
|
||||||
|
name: Xerox VersaLink - Color
|
||||||
|
description: Xerox VersaLink Color multifunction printers
|
||||||
|
groups:
|
||||||
|
- name: Printers
|
||||||
|
items:
|
||||||
|
- uuid: f7107cc25a854f6fb68e9b2c861cc421
|
||||||
|
name: Printer Model
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.25.3.2.1.3.1]
|
||||||
|
key: printer.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Model
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: daba1e575ed04f31b7bcf9b453cd4e6c
|
||||||
|
name: Printer Hostname
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.5.0]
|
||||||
|
key: printer.hostname
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Hostname
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: d094a9080b214036abc973111d6dd8ff
|
||||||
|
name: Printer Serial Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.5.1.1.17.1]
|
||||||
|
key: printer.serial
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Serial Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: f72c5fccc0274c1598df4c93fd7ee3e3
|
||||||
|
name: System Location
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.6.0]
|
||||||
|
key: printer.location
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: System Location
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: d76926198de641309eccc0b46f5e424d
|
||||||
|
name: Black Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.1]
|
||||||
|
key: printer.toner.black.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Black Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 31b5eeb9e1d44f498bb7f0dd66c668e3
|
||||||
|
name: Black Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.1]
|
||||||
|
key: printer.toner.black.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: a9f68b277d794eb5861b9586c06bec4d
|
||||||
|
name: Black Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.1]
|
||||||
|
key: printer.toner.black.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 2d2a13236f2d4a4c820102f1ebd473c2
|
||||||
|
name: Black Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)
|
||||||
|
description: Black Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: black
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 79797eefe8004698b02d45aee88d2f46
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.toner.black)<20 and length(last(/Xerox VersaLink - Color/printer.toner.black.part))>0
|
||||||
|
name: 'Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 97a49eb30be44c449ad15236c3a2292f
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.toner.black)<10 and length(last(/Xerox VersaLink - Color/printer.toner.black.part))>0
|
||||||
|
name: 'Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: b4b21d5261e1493586a87d4a737b83ae
|
||||||
|
name: Yellow Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.2]
|
||||||
|
key: printer.toner.yellow.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Yellow Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 52631b827a7947329514736e841f3ffb
|
||||||
|
name: Yellow Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.2]
|
||||||
|
key: printer.toner.yellow.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 3e3471b5a153410a93043806d141baa2
|
||||||
|
name: Yellow Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.2]
|
||||||
|
key: printer.toner.yellow.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 9d16978ccef6495e8a5c3c4135df15e0
|
||||||
|
name: Yellow Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.yellow.current)/last(//printer.toner.yellow.max))*100,0)
|
||||||
|
description: Yellow Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: yellow
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 70a7e1c08a394f9bad35f851bc2e9b0a
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.toner.yellow)<20 and length(last(/Xerox VersaLink - Color/printer.toner.yellow.part))>0
|
||||||
|
name: 'Yellow Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 1e5d6d55cb894bb1a4c30a1810e69cb5
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.toner.yellow)<10 and length(last(/Xerox VersaLink - Color/printer.toner.yellow.part))>0
|
||||||
|
name: 'Yellow Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 46add5511ed049a6987e4383f4744683
|
||||||
|
name: Magenta Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.3]
|
||||||
|
key: printer.toner.magenta.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Magenta Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: ce99e1d2f0784fe9ab2b935277b2b602
|
||||||
|
name: Magenta Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.3]
|
||||||
|
key: printer.toner.magenta.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 045b02be84c64edfa6371195073c7548
|
||||||
|
name: Magenta Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.3]
|
||||||
|
key: printer.toner.magenta.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: f0f5ee2d31e54cdebdfbca234d344af7
|
||||||
|
name: Magenta Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.magenta.current)/last(//printer.toner.magenta.max))*100,0)
|
||||||
|
description: Magenta Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: magenta
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 961f014b9e2941e4bf497cc07e0433ac
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.toner.magenta)<20 and length(last(/Xerox VersaLink - Color/printer.toner.magenta.part))>0
|
||||||
|
name: 'Magenta Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 8101c478181547848351b9584aa8c5d8
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.toner.magenta)<10 and length(last(/Xerox VersaLink - Color/printer.toner.magenta.part))>0
|
||||||
|
name: 'Magenta Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: e6995a3e91b748cca3aafea261c5dfdb
|
||||||
|
name: Cyan Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.4]
|
||||||
|
key: printer.toner.cyan.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Cyan Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 7aa03745aedb4dd094fd3fd891d105bd
|
||||||
|
name: Cyan Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.4]
|
||||||
|
key: printer.toner.cyan.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 61cd61ec69dc443db8baa0c6fbacd49b
|
||||||
|
name: Cyan Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.4]
|
||||||
|
key: printer.toner.cyan.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 99aa1d37060045bdb1f1b71d11a58209
|
||||||
|
name: Cyan Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.cyan.current)/last(//printer.toner.cyan.max))*100,0)
|
||||||
|
description: Cyan Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: cyan
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: ad2d9b2805af40a180c4be0e2af1e4be
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.toner.cyan)<20 and length(last(/Xerox VersaLink - Color/printer.toner.cyan.part))>0
|
||||||
|
name: 'Cyan Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: a3baaeec40a94734a1caa8a5acdb9bb2
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.toner.cyan)<10 and length(last(/Xerox VersaLink - Color/printer.toner.cyan.part))>0
|
||||||
|
name: 'Cyan Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 13a5a1cfbe4d4acdb76cf2ac824a7558
|
||||||
|
name: Waste Cartridge Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.5]
|
||||||
|
key: printer.waste.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Waste Cartridge Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 8ef52118a55f4ab8b3ffc33a6568584f
|
||||||
|
name: Waste Cartridge Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.5]
|
||||||
|
key: printer.waste.level
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Waste Cartridge Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 1303b15de2c444f297476f0ac76814ca
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.waste.level)>80 and length(last(/Xerox VersaLink - Color/printer.waste.part))>0
|
||||||
|
name: 'Waste Cartridge Level is high on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 9c0e8ebd1c8144c7b370c7a48845532c
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.waste.level)>90 and length(last(/Xerox VersaLink - Color/printer.waste.part))>0
|
||||||
|
name: 'Waste Cartridge Level is high on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 948e14983e8f4118813dc71ecd71fa07
|
||||||
|
name: Black Drum Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.6]
|
||||||
|
key: printer.drum.black.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Black Drum Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 2e6e9de29ab041d6bb76db2805899c70
|
||||||
|
name: Black Drum Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.6]
|
||||||
|
key: printer.drum.black.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Drum Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: fc814174ee7349239e18616b77e3d48b
|
||||||
|
name: Black Drum Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.6]
|
||||||
|
key: printer.drum.black.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Drum Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 48873ffb49724bdf9579adb2da0e5cdb
|
||||||
|
name: Black Drum Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.drum.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.drum.black.current)/last(//printer.drum.black.max))*100,0)
|
||||||
|
description: Black Drum Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: a26f322ae0a043b9bbabb779221b81bf
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.drum.black)<20 and length(last(/Xerox VersaLink - Color/printer.drum.black.part))>0
|
||||||
|
name: 'Black Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 278f30be2a40424dbc3af0be623c3a37
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.drum.black)<10 and length(last(/Xerox VersaLink - Color/printer.drum.black.part))>0
|
||||||
|
name: 'Black Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 09cd943b26c34c659a864d15fcaa1774
|
||||||
|
name: Yellow Drum Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.7]
|
||||||
|
key: printer.drum.yellow.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Yellow Drum Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 4425c4cd54404217b876de974d417f97
|
||||||
|
name: Yellow Drum Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.7]
|
||||||
|
key: printer.drum.yellow.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow Drum Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 3607ac3861f64384a6296b70ff3bfdf8
|
||||||
|
name: Yellow Drum Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.7]
|
||||||
|
key: printer.drum.yellow.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow Drum Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: d0afd17fec7d40188aa14f260d73fa13
|
||||||
|
name: Yellow Drum Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.drum.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.drum.yellow.current)/last(//printer.drum.yellow.max))*100,0)
|
||||||
|
description: Yellow Drum Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: e5767395d8e2439aaa24bd8700d2467a
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.drum.yellow)<20 and length(last(/Xerox VersaLink - Color/printer.drum.yellow.part))>0
|
||||||
|
name: 'Yellow Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 73b6ac5dddc9444da35e05053332ae93
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.drum.yellow)<10 and length(last(/Xerox VersaLink - Color/printer.drum.yellow.part))>0
|
||||||
|
name: 'Yellow Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: e856ccb45cac41adafc2edcb67098dbe
|
||||||
|
name: Magenta Drum Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.8]
|
||||||
|
key: printer.drum.magenta.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Magenta Drum Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 06f01b9113214dcd82aced4b448740b6
|
||||||
|
name: Magenta Drum Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.8]
|
||||||
|
key: printer.drum.magenta.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta Drum Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 21697c90516b4c3c9bf738fba4435823
|
||||||
|
name: Magenta Drum Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.8]
|
||||||
|
key: printer.drum.magenta.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta Drum Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 6da2c8a87be14926b8d1006bc3f61d7e
|
||||||
|
name: Magenta Drum Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.drum.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.drum.magenta.current)/last(//printer.drum.magenta.max))*100,0)
|
||||||
|
description: Magenta Drum Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 13ac161870e5470a97e7da6963972967
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.drum.magenta)<20 and length(last(/Xerox VersaLink - Color/printer.drum.magenta.part))>0
|
||||||
|
name: 'Magenta Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: de333dcd0cf046d1a5109334de1f014c
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.drum.magenta)<10 and length(last(/Xerox VersaLink - Color/printer.drum.magenta.part))>0
|
||||||
|
name: 'Magenta Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: cb41e58df07e4eb2bf11fcaa6cf7b390
|
||||||
|
name: Cyan Drum Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.9]
|
||||||
|
key: printer.drum.cyan.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Cyan Drum Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: d4d0f2562edc4f73aae2efcacc159137
|
||||||
|
name: Cyan Drum Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.9]
|
||||||
|
key: printer.drum.cyan.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan Drum Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 90e0d130a32d47fa81fce7adc54a661d
|
||||||
|
name: Cyan Drum Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.9]
|
||||||
|
key: printer.drum.cyan.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan Drum Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: fa59b63b6fae47a190ae838200069d79
|
||||||
|
name: Cyan Drum Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.drum.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.drum.cyan.current)/last(//printer.drum.cyan.max))*100,0)
|
||||||
|
description: Cyan Drum Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 4540db9127f4454aa6d1c084b87139aa
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.drum.cyan)<20 and length(last(/Xerox VersaLink - Color/printer.drum.cyan.part))>0
|
||||||
|
name: 'Cyan Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: e188954e41a242e39a9f262ed82eaaee
|
||||||
|
expression: last(/Xerox VersaLink - Color/printer.drum.cyan)<10 and length(last(/Xerox VersaLink - Color/printer.drum.cyan.part))>0
|
||||||
|
name: 'Cyan Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: cd898e728e4e4b41b34edc2b23d22d6f
|
||||||
|
name: Transfer Roller Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.10]
|
||||||
|
key: printer.transfer.roller.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Transfer Roller Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 6961fd351bf440efb54c3ac7bc2c1a84
|
||||||
|
name: Transfer Belt Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.11]
|
||||||
|
key: printer.transfer.belt.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Transfer Belt Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 3bc8a2cbb96b4b8185240e9ffeb79a83
|
||||||
|
name: Fuser Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.12]
|
||||||
|
key: printer.fuser.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Fuser Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
1414
zabbix_template_xerox_enterprise.json
Normal file
1414
zabbix_template_xerox_enterprise.json
Normal file
File diff suppressed because it is too large
Load Diff
893
zabbix_template_xerox_enterprise.yaml
Normal file
893
zabbix_template_xerox_enterprise.yaml
Normal file
@@ -0,0 +1,893 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.4'
|
||||||
|
template_groups:
|
||||||
|
- uuid: 3cd4e8d0b828464e8f4b3becf13a9dbd
|
||||||
|
name: Printers
|
||||||
|
templates:
|
||||||
|
- uuid: c2e2302205ce4d249e7edfe6db933ee9
|
||||||
|
template: Xerox Enterprise - Color
|
||||||
|
name: Xerox Enterprise - Color
|
||||||
|
description: Xerox EC8036, AltaLink C8xxx enterprise color printers
|
||||||
|
groups:
|
||||||
|
- name: Printers
|
||||||
|
items:
|
||||||
|
- uuid: d03e698d55fc45d191884bbdf7810be1
|
||||||
|
name: Printer Model
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.25.3.2.1.3.1]
|
||||||
|
key: printer.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Model
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 4e7860eb0b2047ac919bd4a097982eca
|
||||||
|
name: Printer Hostname
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.5.0]
|
||||||
|
key: printer.hostname
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Hostname
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: d6aff78eb5c84fccb4db51612fb72b23
|
||||||
|
name: Printer Serial Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.5.1.1.17.1]
|
||||||
|
key: printer.serial
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Serial Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 7adc5e990d914b6386a631a24d78e86d
|
||||||
|
name: System Location
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.6.0]
|
||||||
|
key: printer.location
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: System Location
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: df2c66eb2cab4842908c61a853a8fa42
|
||||||
|
name: Black Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.1]
|
||||||
|
key: printer.toner.black.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Black Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 5711ef102f0d425aa56dea64fb513fc5
|
||||||
|
name: Black Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.1]
|
||||||
|
key: printer.toner.black.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 5cc49eed0ed54341b1b3219becd3defb
|
||||||
|
name: Black Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.1]
|
||||||
|
key: printer.toner.black.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Black Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 6e5ae3d685a44b80ae8cc46a5317dd89
|
||||||
|
name: Black Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)
|
||||||
|
description: Black Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: black
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: f29c9298c8de4b00b1ad9afff3a26b29
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.toner.black)<20 and length(last(/Xerox Enterprise - Color/printer.toner.black.part))>0
|
||||||
|
name: 'Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 6d9174594b6a45158cbedda71528f045
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.toner.black)<10 and length(last(/Xerox Enterprise - Color/printer.toner.black.part))>0
|
||||||
|
name: 'Black Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 8a5caec5e00a4bbb922d6d5ecec81b84
|
||||||
|
name: Cyan Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.2]
|
||||||
|
key: printer.toner.cyan.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Cyan Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: f1f57074096546e38f06f3a72b49eac1
|
||||||
|
name: Cyan Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.2]
|
||||||
|
key: printer.toner.cyan.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 5c7fa001b3824adaae4bb329c9d457a3
|
||||||
|
name: Cyan Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.2]
|
||||||
|
key: printer.toner.cyan.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Cyan Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 5d5521b20f7446358bcc983548393146
|
||||||
|
name: Cyan Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.cyan
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.cyan.current)/last(//printer.toner.cyan.max))*100,0)
|
||||||
|
description: Cyan Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: cyan
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 9cceff0affe946d2bb479494b5a53856
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.toner.cyan)<20 and length(last(/Xerox Enterprise - Color/printer.toner.cyan.part))>0
|
||||||
|
name: 'Cyan Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: d3e2fd3d21384222bbdbeaf7f3a4ddfb
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.toner.cyan)<10 and length(last(/Xerox Enterprise - Color/printer.toner.cyan.part))>0
|
||||||
|
name: 'Cyan Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: d5f3c36c00ea46a98db8d55d94ea4877
|
||||||
|
name: Magenta Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.3]
|
||||||
|
key: printer.toner.magenta.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Magenta Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: cfb2aa9afdac4888a5b308a36fe691f2
|
||||||
|
name: Magenta Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.3]
|
||||||
|
key: printer.toner.magenta.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: fe63cabb3aab41a890680844bc154b8d
|
||||||
|
name: Magenta Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.3]
|
||||||
|
key: printer.toner.magenta.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Magenta Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 48f16d55b5b94699b7c130e754780a06
|
||||||
|
name: Magenta Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.magenta
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.magenta.current)/last(//printer.toner.magenta.max))*100,0)
|
||||||
|
description: Magenta Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: magenta
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 86631cefe7c340da8f3d43fbd48675f7
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.toner.magenta)<20 and length(last(/Xerox Enterprise - Color/printer.toner.magenta.part))>0
|
||||||
|
name: 'Magenta Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 24d3aa508eec4b33a19151ffbace424c
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.toner.magenta)<10 and length(last(/Xerox Enterprise - Color/printer.toner.magenta.part))>0
|
||||||
|
name: 'Magenta Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 5c9f0b5d390f4fbe9fa6eed25484bc91
|
||||||
|
name: Yellow Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.4]
|
||||||
|
key: printer.toner.yellow.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Yellow Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: a59e1595e3b148dc911c33780d96955a
|
||||||
|
name: Yellow Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.4]
|
||||||
|
key: printer.toner.yellow.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 5e73fae1f51e435884faab2f3bc67918
|
||||||
|
name: Yellow Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.4]
|
||||||
|
key: printer.toner.yellow.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Yellow Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 54baecbcfbb347619038285724e22c25
|
||||||
|
name: Yellow Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.yellow
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.yellow.current)/last(//printer.toner.yellow.max))*100,0)
|
||||||
|
description: Yellow Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
- tag: color
|
||||||
|
value: yellow
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 4f7e80ea7a3b469f83a27b1940ea64a3
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.toner.yellow)<20 and length(last(/Xerox Enterprise - Color/printer.toner.yellow.part))>0
|
||||||
|
name: 'Yellow Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: c2a3e67d116a4f71b4285b6a0179d57c
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.toner.yellow)<10 and length(last(/Xerox Enterprise - Color/printer.toner.yellow.part))>0
|
||||||
|
name: 'Yellow Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 8c4813f0619a4c89a5c97c11bed56ffd
|
||||||
|
name: Drum Cartridge R1 Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.5]
|
||||||
|
key: printer.drum.r1.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Drum Cartridge R1 Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 548923c9cd58485194efca4680bde2da
|
||||||
|
name: Drum Cartridge R1 Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.5]
|
||||||
|
key: printer.drum.r1
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum Cartridge R1 Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: b147995cef044decaa97b143eb039d6a
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.drum.r1)<20 and length(last(/Xerox Enterprise - Color/printer.drum.r1.part))>0
|
||||||
|
name: 'Drum Cartridge R1 Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 53c3b15d79394f758e1d8b836d796dea
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.drum.r1)<10 and length(last(/Xerox Enterprise - Color/printer.drum.r1.part))>0
|
||||||
|
name: 'Drum Cartridge R1 Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 45ff64acfd41458a8a12f0992f710c23
|
||||||
|
name: Drum Cartridge R2 Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.6]
|
||||||
|
key: printer.drum.r2.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Drum Cartridge R2 Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: c9039db77e4c4132968c21abe8112b72
|
||||||
|
name: Drum Cartridge R2 Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.6]
|
||||||
|
key: printer.drum.r2
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum Cartridge R2 Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 2ed60d3a355443dca8be5d7fce0ed5f2
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.drum.r2)<20 and length(last(/Xerox Enterprise - Color/printer.drum.r2.part))>0
|
||||||
|
name: 'Drum Cartridge R2 Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 6d2ee2c9445340f1b93c12266cb9e10e
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.drum.r2)<10 and length(last(/Xerox Enterprise - Color/printer.drum.r2.part))>0
|
||||||
|
name: 'Drum Cartridge R2 Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 4875f060efad49e7881975478a3f6ed9
|
||||||
|
name: Drum Cartridge R3 Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.7]
|
||||||
|
key: printer.drum.r3.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Drum Cartridge R3 Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: d21017456aad4c92aca5546af3a7b0f8
|
||||||
|
name: Drum Cartridge R3 Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.7]
|
||||||
|
key: printer.drum.r3
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum Cartridge R3 Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: a7855fb69aea4988b9dc3dfde7ea3524
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.drum.r3)<20 and length(last(/Xerox Enterprise - Color/printer.drum.r3.part))>0
|
||||||
|
name: 'Drum Cartridge R3 Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 32b7fe7831d140e3946f47e74e8c88dc
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.drum.r3)<10 and length(last(/Xerox Enterprise - Color/printer.drum.r3.part))>0
|
||||||
|
name: 'Drum Cartridge R3 Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 53a1563fc0f6455fa1d71513c1587c60
|
||||||
|
name: Drum Cartridge R4 Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.8]
|
||||||
|
key: printer.drum.r4.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Drum Cartridge R4 Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 3a70d28a36df4f068993add946713716
|
||||||
|
name: Drum Cartridge R4 Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.8]
|
||||||
|
key: printer.drum.r4
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum Cartridge R4 Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 52794d11f96644c08b2e14d628375650
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.drum.r4)<20 and length(last(/Xerox Enterprise - Color/printer.drum.r4.part))>0
|
||||||
|
name: 'Drum Cartridge R4 Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: ab90cd28b6f6423d914e9455f5927167
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.drum.r4)<10 and length(last(/Xerox Enterprise - Color/printer.drum.r4.part))>0
|
||||||
|
name: 'Drum Cartridge R4 Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: e2c246f9da8544eba92924b3706ff944
|
||||||
|
name: Fuser Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.9]
|
||||||
|
key: printer.fuser.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Fuser Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 3b5628120c194bfda5c55572c13db316
|
||||||
|
name: Fuser Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.9]
|
||||||
|
key: printer.fuser
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Fuser Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: d79ee4c1ef014b7c81a3f4b9d4a4f2a1
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.fuser)<20 and length(last(/Xerox Enterprise - Color/printer.fuser.part))>0
|
||||||
|
name: 'Fuser Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: a268fed950074c46a574b4eb86c208d7
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.fuser)<10 and length(last(/Xerox Enterprise - Color/printer.fuser.part))>0
|
||||||
|
name: 'Fuser Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: ee5eeacfd5024775ad40b302811ba2f2
|
||||||
|
name: Waste Container Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.10]
|
||||||
|
key: printer.waste.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Waste Container Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 90417fd5f0a740b499c8d27943973736
|
||||||
|
name: Waste Container Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.10]
|
||||||
|
key: printer.waste
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Waste Container Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 69cebca1efb3446c8c383465991a80af
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.waste)>80 and length(last(/Xerox Enterprise - Color/printer.waste.part))>0
|
||||||
|
name: 'Waste Container Level is high on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 0a88c88dd7f3424e948647264e83b6ed
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.waste)>90 and length(last(/Xerox Enterprise - Color/printer.waste.part))>0
|
||||||
|
name: 'Waste Container Level is high on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 232ac58feeea45299b525cca72effa4a
|
||||||
|
name: Transfer Belt Cleaner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.11]
|
||||||
|
key: printer.transfer.belt.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Transfer Belt Cleaner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 3836d9fa2d674f97a3405162a88f2c25
|
||||||
|
name: Transfer Belt Cleaner Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.11]
|
||||||
|
key: printer.transfer.belt
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Transfer Belt Cleaner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 7354e1f37e894f05be032edf493e3721
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.transfer.belt)<20 and length(last(/Xerox Enterprise - Color/printer.transfer.belt.part))>0
|
||||||
|
name: 'Transfer Belt Cleaner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: b30fc1c454bc460e9c70e9ac83af48d3
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.transfer.belt)<10 and length(last(/Xerox Enterprise - Color/printer.transfer.belt.part))>0
|
||||||
|
name: 'Transfer Belt Cleaner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: a3619eef02a74c49aecf1b955fe27f27
|
||||||
|
name: Second Bias Transfer Roll Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.12]
|
||||||
|
key: printer.transfer.roller.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Second Bias Transfer Roll Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 49f8bd6f255049adb329327fbec53e6a
|
||||||
|
name: Second Bias Transfer Roll Level
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.12]
|
||||||
|
key: printer.transfer.roller
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Second Bias Transfer Roll Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 0a369a1a8b464ef29337d37b25eda6f7
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.transfer.roller)<20 and length(last(/Xerox Enterprise - Color/printer.transfer.roller.part))>0
|
||||||
|
name: 'Second Bias Transfer Roll Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 54af07ea4601435c90b2478881944397
|
||||||
|
expression: last(/Xerox Enterprise - Color/printer.transfer.roller)<10 and length(last(/Xerox Enterprise - Color/printer.transfer.roller.part))>0
|
||||||
|
name: 'Second Bias Transfer Roll Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
484
zabbix_template_xerox_mono.json
Normal file
484
zabbix_template_xerox_mono.json
Normal file
@@ -0,0 +1,484 @@
|
|||||||
|
{
|
||||||
|
"zabbix_export": {
|
||||||
|
"version": "7.4",
|
||||||
|
"template_groups": [
|
||||||
|
{
|
||||||
|
"uuid": "3cd4e8d0b828464e8f4b3becf13a9dbd",
|
||||||
|
"name": "Printers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"templates": [
|
||||||
|
{
|
||||||
|
"uuid": "4202e75f163c4232bb172916de8afa2d",
|
||||||
|
"template": "Xerox VersaLink - Monochrome",
|
||||||
|
"name": "Xerox VersaLink - Monochrome",
|
||||||
|
"description": "Xerox VersaLink B&W multifunction printers",
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "Printers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"uuid": "45364a48593a41e89b13ec0392f4f582",
|
||||||
|
"name": "Printer Model",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.25.3.2.1.3.1]",
|
||||||
|
"key": "printer.model",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Printer Model",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "983382594f0a43c895d7951f7161a2b6",
|
||||||
|
"name": "Printer Hostname",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.1.5.0]",
|
||||||
|
"key": "printer.hostname",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Printer Hostname",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "aefae29a7396430e8bb1e743f62d733d",
|
||||||
|
"name": "Printer Serial Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.5.1.1.17.1]",
|
||||||
|
"key": "printer.serial",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Printer Serial Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "ba0b6019551241d883f7982c461a674b",
|
||||||
|
"name": "System Location",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.1.6.0]",
|
||||||
|
"key": "printer.location",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "System Location",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "5d450a90003a4586b7e6c25cd5229a31",
|
||||||
|
"name": "Toner Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.6.1.1]",
|
||||||
|
"key": "printer.toner.black.part",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Toner Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "6c2f31435baf4f32bd38d451ce07011a",
|
||||||
|
"name": "Toner Current",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.9.1.1]",
|
||||||
|
"key": "printer.toner.black.current",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Toner Current",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "1b9c7a9bba0b47b7acf20bb3bf0d95fa",
|
||||||
|
"name": "Toner Max",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.8.1.1]",
|
||||||
|
"key": "printer.toner.black.max",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Toner Max",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "816299e412684db39226c258978c4980",
|
||||||
|
"name": "Toner Level",
|
||||||
|
"type": "CALCULATED",
|
||||||
|
"key": "printer.toner.black",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"params": "round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)",
|
||||||
|
"description": "Toner Level",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "supplies"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "level"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"units": "%",
|
||||||
|
"triggers": [
|
||||||
|
{
|
||||||
|
"uuid": "9434fe5b914f438b84541e3d379e25d9",
|
||||||
|
"expression": "last(/Xerox VersaLink - Monochrome/printer.toner.black)<20 and length(last(/Xerox VersaLink - Monochrome/printer.toner.black.part))>0",
|
||||||
|
"name": "Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "WARNING",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "132e12902ef74bd2bb6664842b009e8f",
|
||||||
|
"expression": "last(/Xerox VersaLink - Monochrome/printer.toner.black)<10 and length(last(/Xerox VersaLink - Monochrome/printer.toner.black.part))>0",
|
||||||
|
"name": "Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "HIGH",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "d461fd1c161e4f7a89a30cf272b5eb29",
|
||||||
|
"name": "Drum Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.6.1.6]",
|
||||||
|
"key": "printer.drum.part",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Drum Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "0a4d3dc0852744b7a6bc52d1471cb89c",
|
||||||
|
"name": "Drum Current",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.9.1.6]",
|
||||||
|
"key": "printer.drum.current",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Drum Current",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "727bd2d798bd4659ae2d9ce8dd06c82c",
|
||||||
|
"name": "Drum Max",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.8.1.6]",
|
||||||
|
"key": "printer.drum.max",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"description": "Drum Max",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "raw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "6f3a650b617249629098c046a0016825",
|
||||||
|
"name": "Drum Level",
|
||||||
|
"type": "CALCULATED",
|
||||||
|
"key": "printer.drum",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "365d",
|
||||||
|
"value_type": "FLOAT",
|
||||||
|
"params": "round((last(//printer.drum.current)/last(//printer.drum.max))*100,0)",
|
||||||
|
"description": "Drum Level",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "supplies"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "level"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"units": "%",
|
||||||
|
"triggers": [
|
||||||
|
{
|
||||||
|
"uuid": "5e95825e6d61431bbcf023b906905947",
|
||||||
|
"expression": "last(/Xerox VersaLink - Monochrome/printer.drum)<20 and length(last(/Xerox VersaLink - Monochrome/printer.drum.part))>0",
|
||||||
|
"name": "Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "WARNING",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "c60c7f50ea824ee48d58a0ffcfd9a602",
|
||||||
|
"expression": "last(/Xerox VersaLink - Monochrome/printer.drum)<10 and length(last(/Xerox VersaLink - Monochrome/printer.drum.part))>0",
|
||||||
|
"name": "Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)",
|
||||||
|
"priority": "HIGH",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "scope",
|
||||||
|
"value": "availability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "77ed4ed118ab4694b8dac4a4d66ea6f8",
|
||||||
|
"name": "Transfer Roller Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.6.1.10]",
|
||||||
|
"key": "printer.transfer.roller.part",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Transfer Roller Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "39ea5ea68c644db79aa6d72cb5af74b6",
|
||||||
|
"name": "Fuser Part Number",
|
||||||
|
"type": "SNMP_AGENT",
|
||||||
|
"snmp_oid": "get[1.3.6.1.2.1.43.11.1.1.6.1.12]",
|
||||||
|
"key": "printer.fuser.part",
|
||||||
|
"delay": "1h",
|
||||||
|
"history": "90d",
|
||||||
|
"trends": "0d",
|
||||||
|
"value_type": "TEXT",
|
||||||
|
"description": "Fuser Part Number",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"tag": "component",
|
||||||
|
"value": "printer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "type",
|
||||||
|
"value": "info"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preprocessing": [
|
||||||
|
{
|
||||||
|
"type": "JAVASCRIPT",
|
||||||
|
"parameters": [
|
||||||
|
"// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
307
zabbix_template_xerox_mono.yaml
Normal file
307
zabbix_template_xerox_mono.yaml
Normal file
@@ -0,0 +1,307 @@
|
|||||||
|
zabbix_export:
|
||||||
|
version: '7.4'
|
||||||
|
template_groups:
|
||||||
|
- uuid: 3cd4e8d0b828464e8f4b3becf13a9dbd
|
||||||
|
name: Printers
|
||||||
|
templates:
|
||||||
|
- uuid: 4202e75f163c4232bb172916de8afa2d
|
||||||
|
template: Xerox VersaLink - Monochrome
|
||||||
|
name: Xerox VersaLink - Monochrome
|
||||||
|
description: Xerox VersaLink B&W multifunction printers
|
||||||
|
groups:
|
||||||
|
- name: Printers
|
||||||
|
items:
|
||||||
|
- uuid: 45364a48593a41e89b13ec0392f4f582
|
||||||
|
name: Printer Model
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.25.3.2.1.3.1]
|
||||||
|
key: printer.model
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Model
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 983382594f0a43c895d7951f7161a2b6
|
||||||
|
name: Printer Hostname
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.5.0]
|
||||||
|
key: printer.hostname
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Hostname
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: aefae29a7396430e8bb1e743f62d733d
|
||||||
|
name: Printer Serial Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.5.1.1.17.1]
|
||||||
|
key: printer.serial
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Printer Serial Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: ba0b6019551241d883f7982c461a674b
|
||||||
|
name: System Location
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.1.6.0]
|
||||||
|
key: printer.location
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: System Location
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle hex-encoded SNMP strings\n// Try multiple approaches to convert hex to ASCII\n\n// First, check if it looks like hex (with spaces, newlines, or other separators)\nvar hexPattern = /^[0-9A-Fa-f\\s]+$/;\nif (hexPattern.test(value) && value.length > 4) {\n // Extract all hex pairs (2 characters)\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 // Only keep printable ASCII (0x20-0x7E)\n if (code >= 32 && code <= 126) {\n result += String.fromCharCode(code);\n }\n }\n if (result.length > 0) {\n return result;\n }\n }\n}\n\n// Fallback: Remove non-printable characters\nreturn value.replace(/[^\\x20-\\x7E]/g, '');"
|
||||||
|
- uuid: 5d450a90003a4586b7e6c25cd5229a31
|
||||||
|
name: Toner Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.1]
|
||||||
|
key: printer.toner.black.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Toner Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 6c2f31435baf4f32bd38d451ce07011a
|
||||||
|
name: Toner Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.1]
|
||||||
|
key: printer.toner.black.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Toner Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 1b9c7a9bba0b47b7acf20bb3bf0d95fa
|
||||||
|
name: Toner Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.1]
|
||||||
|
key: printer.toner.black.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Toner Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 816299e412684db39226c258978c4980
|
||||||
|
name: Toner Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.toner.black
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.toner.black.current)/last(//printer.toner.black.max))*100,0)
|
||||||
|
description: Toner Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 9434fe5b914f438b84541e3d379e25d9
|
||||||
|
expression: last(/Xerox VersaLink - Monochrome/printer.toner.black)<20 and length(last(/Xerox VersaLink - Monochrome/printer.toner.black.part))>0
|
||||||
|
name: 'Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 132e12902ef74bd2bb6664842b009e8f
|
||||||
|
expression: last(/Xerox VersaLink - Monochrome/printer.toner.black)<10 and length(last(/Xerox VersaLink - Monochrome/printer.toner.black.part))>0
|
||||||
|
name: 'Toner Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: d461fd1c161e4f7a89a30cf272b5eb29
|
||||||
|
name: Drum Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.6]
|
||||||
|
key: printer.drum.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Drum Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 0a4d3dc0852744b7a6bc52d1471cb89c
|
||||||
|
name: Drum Current
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.9.1.6]
|
||||||
|
key: printer.drum.current
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum Current
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 727bd2d798bd4659ae2d9ce8dd06c82c
|
||||||
|
name: Drum Max
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.8.1.6]
|
||||||
|
key: printer.drum.max
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
description: Drum Max
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: raw
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Handle SNMP unknown values (-3, -2, etc.)\n// Per RFC 3805: -1 = other, -2 = unknown, -3 = unknown\n// Convert to 0 to indicate empty/problem state\nvar numValue = parseInt(value);\nif (numValue < 0) {\n return '0';\n}\nreturn value;"
|
||||||
|
- uuid: 6f3a650b617249629098c046a0016825
|
||||||
|
name: Drum Level
|
||||||
|
type: CALCULATED
|
||||||
|
key: printer.drum
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 365d
|
||||||
|
value_type: FLOAT
|
||||||
|
params: round((last(//printer.drum.current)/last(//printer.drum.max))*100,0)
|
||||||
|
description: Drum Level
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: supplies
|
||||||
|
- tag: type
|
||||||
|
value: level
|
||||||
|
units: '%'
|
||||||
|
triggers:
|
||||||
|
- uuid: 5e95825e6d61431bbcf023b906905947
|
||||||
|
expression: last(/Xerox VersaLink - Monochrome/printer.drum)<20 and length(last(/Xerox VersaLink - Monochrome/printer.drum.part))>0
|
||||||
|
name: 'Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: WARNING
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: c60c7f50ea824ee48d58a0ffcfd9a602
|
||||||
|
expression: last(/Xerox VersaLink - Monochrome/printer.drum)<10 and length(last(/Xerox VersaLink - Monochrome/printer.drum.part))>0
|
||||||
|
name: 'Drum Level is low on {{HOST.NAME}}. Current level: {{ITEM.LASTVALUE}}. Replacement part: {{ITEM.LASTVALUE2}} (See compatibility notes for potential alternatives)'
|
||||||
|
priority: HIGH
|
||||||
|
tags:
|
||||||
|
- tag: scope
|
||||||
|
value: availability
|
||||||
|
- uuid: 77ed4ed118ab4694b8dac4a4d66ea6f8
|
||||||
|
name: Transfer Roller Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.10]
|
||||||
|
key: printer.transfer.roller.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Transfer Roller Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
|
- uuid: 39ea5ea68c644db79aa6d72cb5af74b6
|
||||||
|
name: Fuser Part Number
|
||||||
|
type: SNMP_AGENT
|
||||||
|
snmp_oid: get[1.3.6.1.2.1.43.11.1.1.6.1.12]
|
||||||
|
key: printer.fuser.part
|
||||||
|
delay: 1h
|
||||||
|
history: 90d
|
||||||
|
trends: 0d
|
||||||
|
value_type: TEXT
|
||||||
|
description: Fuser Part Number
|
||||||
|
tags:
|
||||||
|
- tag: component
|
||||||
|
value: printer
|
||||||
|
- tag: type
|
||||||
|
value: info
|
||||||
|
preprocessing:
|
||||||
|
- type: JAVASCRIPT
|
||||||
|
parameters:
|
||||||
|
- "// Clean up part number by removing serial numbers and firmware\n// Handles formats like:\n// \"Toner Cartridge;SNACC7952D80730000\" -> \"Toner Cartridge\"\n// \"Black Cartridge HP 58A (CF258A);FW:V4.23.3\" -> \"Black Cartridge HP 58A (CF258A)\"\n// \"Drum Cartridge, PN 101R00554;SN2600A90008100000\" -> \"Drum Cartridge, PN 101R00554\"\n\n// First, apply hex conversion if needed\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) {\n value = result;\n }\n }\n}\n\n// Remove serial numbers (;SN followed by anything)\nvalue = value.replace(/;SN[^;]*/g, '');\n\n// Remove firmware info (;FW: or ;FW\
|
||||||
|
\ followed by anything)\nvalue = value.replace(/;FW[^;]*/g, '');\n\n// Remove any other semicolon-separated metadata\n// (but keep the main description before first semicolon)\nvar parts = value.split(';');\nvalue = parts[0];\n\n// Trim whitespace\nvalue = value.trim();\n\n// For Xerox printers reporting just \"Toner Cartridge\" without PN,\n// try to add known part numbers (must match model-specific logic)\n// This is handled by triggers showing compatibility notes instead\n\nreturn value;"
|
||||||
Reference in New Issue
Block a user