Hello,
I want to use Template SNMP Printer with Preprocessing steps on discovery and regex. I'm on Zabbix 4.4.1 server.
On this template, we have a discovery rule for supplies. The discovery scan on SNMP device and create items.
By default, the discovery creates items with this values :
Or I want to keep only the supplie name like Black Toner and not Black Toner, PN 006R01509;SN421A9880E00004F4
I tried somes regex on the discovery rules but without results.
OR
I have this error :


I have set debug level in server without explanations on this error.
Thanks for your answers,
I want to use Template SNMP Printer with Preprocessing steps on discovery and regex. I'm on Zabbix 4.4.1 server.
On this template, we have a discovery rule for supplies. The discovery scan on SNMP device and create items.
By default, the discovery creates items with this values :
Code:
root@zabbix:~# snmpwalk -v 2c -c public 10.1.7.14 .1.3.6.1.2.1.43.11.1.1.6 Printer-MIB::prtMarkerSuppliesDescription.1.1 = STRING: "Black Toner, PN 006R01509;SN421A9880E00004F4" Printer-MIB::prtMarkerSuppliesDescription.1.2 = STRING: "Cyan Toner, PN 006R01512;SN4322C880E00004F4" Printer-MIB::prtMarkerSuppliesDescription.1.3 = STRING: "Magenta Toner, PN 006R01511;SN53079F80E00004F1" Printer-MIB::prtMarkerSuppliesDescription.1.4 = STRING: "Yellow Toner, PN 006R01510;SN420FEB80E00004F2" Printer-MIB::prtMarkerSuppliesDescription.1.5 = STRING: "Drum Cartridge (R1), PN 013R00662;SN510EA080E00004F2" Printer-MIB::prtMarkerSuppliesDescription.1.6 = STRING: "Drum Cartridge (R2), PN 013R00662;SN511BB980E00004F2" Printer-MIB::prtMarkerSuppliesDescription.1.7 = STRING: "Drum Cartridge (R3), PN 013R00662;SN51242980E00004F2" Printer-MIB::prtMarkerSuppliesDescription.1.8 = STRING: "Drum Cartridge (R4), PN 013R00662;SN48066A80E0000413" Printer-MIB::prtMarkerSuppliesDescription.1.9 = STRING: "Fuser, PN unknown;SNunknown" Printer-MIB::prtMarkerSuppliesDescription.1.10 = STRING: "Waste Toner Container, PN 008R13061;SNunknown" Printer-MIB::prtMarkerSuppliesDescription.1.11 = STRING: "Transfer Belt Cleaner, PN 001R00613;SNunknown" Printer-MIB::prtMarkerSuppliesDescription.1.12 = STRING: "Second Bias Transfer Roll, PN 008R13064;SNunknown" Printer-MIB::prtMarkerSuppliesDescription.1.13 = STRING: "Fan Filter, PN 008R13248;SNunknown"
I tried somes regex on the discovery rules but without results.
^.*?(?=,)
([^,]+)
Invalid discovery rule value: cannot parse as a valid JSON object: invalid character following JSON object at: ',{"{#SNMPINDEX}":"1.2","{#SNMPVALUE}":"Cyan Toner, PN 006R01512;SN51334480E00004F1"},{"{#SNMPINDEX}":"1. 3","{#SNMPVALUE}":"Magenta Toner, PN 006R01511;SN531E1880E00004F1"},


I have set debug level in server without explanations on this error.
Thanks for your answers,

Comment