
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on
09-19-2024
12:49 PM
- edited on
10-10-2024
01:21 PM
by
Selva Arun
Issue / Use Case: I recently faced the challenge of ensuring that the serial numbers of Zebra Printers were accurately fetched and populated in our CMDB, which were missing or not being populated every time the discovery ran. In this article, I’ll share the steps I took to successfully set up SNMP discovery for Zebra Printers with aid of ServiceNow Support Team.
Step 1: Install MIB Files:
First, we need to install the appropriate Management Information Base (MIB) files into the MID Server’s SNMP file table. This step is essential for properly interpreting the Object Identifiers (OIDs) related to our Zebra Printers. Please check source link where I downloaded the MIB file-https://www.zebra.com/ap/en/support-downloads/printers/print-servers/print-server-2.html
Step 2: Fetch the OID:
Next, we’ll use the **SnmpWalk** tool to retrieve the OIDs associated with our printers. Run the following command in your command prompt:
C:\Tools>SnmpWalk.exe -r:10.34.XXX.XXX -c:public
Make sure to replace `10.34.XXX.XXX ` with the IP address of your Zebra Printer. This command allows us to connect to the device and collect the necessary information below.
OID=.1.3.6.1.4.1.10642.2.3.27.0, Type=OctetString, Value=31422GCI4143RHH
Step 3: Create a Custom SNMP Probe: we need to create a custom SNMP probe on discovery_probes table. This probe will define how to collect and process SNMP data from the Zebra Printers.
Step 4: Create a Custom/ new SNMP Field: Under SNMP Fields tab and click on new.
By selecting scalar as command and add the OID and save the record.
Step 5: Create a Custom Sensor Script: After setting up the probe, create a custom sensor script by clicking on sensors tab and click on New. Please copy the script below and change the OIDText enterprise value for different printers (Brothers and others)- var serialNum =snmp.getOIDText('iso.org.dod.internet.private.enterprises.unk_10642.unk_2.unk_3.unk_27');
new DiscoverySensor({
process: function(result){
this.parseOutput(result);
},
parseOutput: function(document){
var snmp = new SNMPResponse(document);
var serialNum = snmp.getOIDText('iso.org.dod.internet.private.enterprises.unk_10642.unk_2.unk_3.unk_27');
current.serial_number = serialNum;
},
type: 'DiscoverySensor'
});
This script will extract the serial number of the Zebra Printer, ensuring this vital information is captured accurately.
Step 5: Create a Classifier Probe: Go to discovery_classifier_probe table, click on New, select the newly created probe, select the Standard Network Printer as classifier, condition script as values.get("sysdescr").indexOf('Zebra') > -1 and save the record.
This step will help us identify Zebra Printers within our network.
Step 6: Test / Link the newly created Classifier Probe: Now it’s time to check if the newly created classifier probe is linked to Standard Network Printer by going to Triggers probes.
Step 7: Run the Quick Discovery: Finally, we are ready to run the discovery process! This will help us identify the Zebra Printers on the network and populate the CMDB with their serial numbers.
Conclusion:
By following these steps, you can successfully set up SNMP discovery for Zebra Printers and ensure that your CMDB is populated with accurate serial numbers. This not only enhances asset management but also improves visibility into your hardware inventory. Please follow this process for other printer models as well (Brother, Canon, and others). According to the ServiceNow Support Team, this is a customization for the instance, and we should reach out to our SAM (Account Manager) for any questions or queries related to this kind of customization.
If you have any questions or need further assistance, feel free to reach out! Let’s keep our asset management practices sharp and effective.
- 6,040 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello Community Alums,
We are also facing the similar issue for Zebra Printers serial no is not getting populated via servicenow discovery.
Even i have also tried as per the article with same configuration still its not working for me .
We have Link OS and NonLink OS printer for Zebra and will it work for both are it will work only for specific model?
Can you suggest and help on this topic please.
Thanks and Regards,
Balaji Kanniah
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I too tried this per the article with same configuration still its not working for me. Reviewing again to verify I didn't miss something.
I have struggled to find OIDs and thought I would I would pass along what has worked for some of our Zebra models.
I DO have a couple that are returning NULLs, when I SNMP Walk the base OID does not return anything. Would love if someone has a working 'Zerbra ZTC 105SL-200dpi' discovery. Thanks!
Zebra ZTC ZD421-203dpi ZPL OID = 1.3.6.1.4.1.10642.1.1.0
3/10/2025 10:20:02 AM (30 ms) : Value: ZTC ZD421-203dpi ZPL
Zebra ZT411-203dpi ZPL OID = 1.3.6.1.4.1.10642.1.1.0
3/10/2025 10:20:37 AM (20 ms) : Value: ZTC ZT411-203dpi ZPL
Zebra ZTC GK420d OID = 1.3.6.1.4.1.10642.1.1.0
3/10/2025 10:21:18 AM (31 ms) : Value: ZTC GK420d
Zebra ZTC GK420t OID = 1.3.6.1.4.1.10642.1.1.0
3/10/2025 10:21:50 AM (33 ms) : Value: ZTC GK420t
ZebraNet PrintServer OID = 1.3.6.1.4.1.10642.1.1.0
3/10/2025 10:24:00 AM (28 ms) : Value: NULL2
Zerbra ZTC 105SL-200dpi OID = 1.3.6.1.4.1.10642.1.1.0
3/10/2025 10:24:41 AM (39 ms) : Value: NULL2
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello Selva Arun, thanks for the great post.
I tried to follow all the steps, my OID is 1.3.6.1.4.1.10642.1.1.
When I updating the SNMP field & Custom Sensor Script, I get this serial number as output:
This doesn't look like a serial number, do you have any idea which steps I am not making right?
I also try LinkOS MIB file from Zebra, it is the same.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hey,
I wanted to add that this method introduces the Zebra printer serial number after identification is complete, so it would still result in a duplicate CI, potentially.
I've found a solution expanding on this idea while remain OOTB-friendly. This way introduces the serial number in the identification phase, ensuring it is used by IRE.
Steps:
1. Create Multiprobe (SNMP - Zebra - Identity)
Include 2 probes: SNMP - Identity Info and (create) SNMP - Identity - Zebra - Serial. In the new probe, set stage to Classify/Identify and add the SNMP field (in my case: 1.3.6.1.4.1.10642.1.9.0)
Add a MultiSensor script:
function(result, ciData, debug, sensor){
var ZEBRA_SERIAL_OID = 'iso.org.dod.internet.private.enterprises.unk_10642.unk_1.unk_9'
var snmp = new SNMPResponse(result);
var serialNumber = snmp.getOIDText(ZEBRA_SERIAL_OID);
if (serialNumber){
ciData.getData()['serial_number'] = serialNumber;
}
}
In SNMP Identity Info, add a multisensor script for SNMP - Zebra - Identity
function(result, ciData, debug, sensor){
new SnmpIdentityInfoParser(ciData).process(result);
}
2. Back in SNMP - Zebra - Identity, create a sensor called SNMP - Zebra - Identity. In the script block use:
new DiscoveryIDSensor({});
3. Create a new cmdb_ci_printer classifier and add SNMP-Zebra-Identity as the identification trigger script. Add in DNS and SNMP - Printing.
4. Go to discovery_snmp_oid.list and find your Zebra OIDs, change the classifier to the new one you created.
5. Done.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @SHansen1 ,
Thank you for the information. I am trying to replicate the same and got syntax error in multisensor.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @SHansen1 ,
Thank you. Please check below the other error:
And may I know do what do we need to set as "Parent" or leave it as blank?
Same goes to SNMP Identity Info
And may you share in detail in steps where can I create cmdb_ci_printer classifier as Step 3? I tried to create in discovery_classy_snmp_list and discovery_classifier_probe_list but it seems incorrect. I cannot see "identification trigger script" where to add in DNS and SNMP - Printing.
I am new to this. Appreciated if you can help further, I think I am almost there.
I now can retrieve the serial number I just need to solve the duplication issue.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
No . in there. So should be ciData.getData()['serial_number'] = serialNumber;
Parent is SNMP - Zebra - Identity
You create the classifier here: discovery_classy_snmp. You should already have one for Default Network Printer. Create a second one targeting the cmdb_ci_printer table. It doesn't need Classification Criteria. When you move the Zebra OIDs in Step 4, they will move to this new classifier (SNMP OID Classifications). You will add Trigger probes: DNS, SNMP - Printing, SNMP - Zebra - Identify (open this record from the related list after you add it and make sure it is set for identification phase. Others should be Exploration.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Sorry to trouble again.
We don't have any multisensor called SNMP - Zebra - Identity so I cannot put it as Parent.
We only have "SNMP - Zebra - Identity" as sensor and multiprobe.
Let me know if I missing any steps.
You will add Trigger probes: DNS, SNMP - Zebra - Identify
I think in previous comment you are saying to add in DNS and SNMP - Printing, pleaes confirm do we need SNMP - Identity - Zebra - Serial as well?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Stephen,
We have two version one is for Link OS and the OID 1.3.6.1.4.1.10642.X.X and Non-Link OS 1.3.6.1.4.1.683.6.0
How to get the serial no for Non-Link OS for 1.3.6.1.4.1.683.6.0 OID and we tried with MIB File as well and its not working as expected.
Please let me know if you have any solution to fix the issue .
Than
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
We don't need SNMP - Identity - Zebra - Serial as a trigger probe. It will run on it's own when activated. You should have 3 trigger probes: DNS, SNMP - Identity - Zebra, and SNMP - Printing
The SNMP - Zebra - Identity sensor needs to be a MultiSensor. You may need to remove it and re-add as a MS. For script, it should only have:
new DiscoveryIDSensor({});
If it helps, these essentially mirror the OOTB mutiprobes for Load Balancers, etc. in SNMP - Identity Info. The structure should be nearly the same.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
In your SNMP Field related list on your probe, add an OID: 1.3.6.1.4.1.683. Set the Command to Walk. Run a quick discovery on the offending IP. Check the Probe's ECC Input to see everything in the Printer for that OID and select the proper OID to add a scalar. Don't leave this Walk SNMP Field on your probe, it will bog during Discovery schedules.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @SHansen1 ,
Sorry but it appears what you suggested earlier is contracting with what you are saying at the moment.
As your first comment you are saying to create SNMP - Identity - Zebra as multiprobe.
But now you are saying it should be multisensor.
And then for trigger probe, I actually cannot select "SNMP - Zebra - Identity" at all because it is multiprobe..
Are you able to check and edit the comment that you guide on creating the stuff? I think if that's updated correctly I can try to replicate all of them again.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @SHansen1 ,
Finally I sorted that out. We have a multiprobe and sensor called "SNMP - Zebra - Identity" that causing the confusion. I recreate the "SNMP - Zebra - Identity" as multisensor as you suggested.
For the SNMP OID Classification, should we keep the model ID as it is or it need to be updated as well?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Stephan,
In your SNMP Field related list on your probe, add an OID: 1.3.6.1.4.1.683. Set the Command to Walk. Run a quick discovery on the offending IP. Check the Probe's ECC Input to see everything in the Printer for that OID and select the proper OID to add a scalar. Don't leave this Walk SNMP Field on your probe, it will bog during Discovery schedules.
Ans: This is older version and in MIB file also don't have the details about the serial no and also tried in SNMP WALK as well.
I ran discovery got the details Sysname and OID details but not for serial no OID .
Could you please suggest or any solution or above solution will work for same Non-Link OS printer model?
I appreciate your help if the issue could fix it .
Thanks and Regards,
Balaji Kanniah.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@ZW-C The model is normally wrong. I'm working on that now on my end. You can keep it, or change it to the model you are expecting, but I'm getting multiple models for this OID and it sets them all as ZT230.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
The SNMP walk should have given you a lot of information. Make sure you check for the correct ECC record. If the MIB doesn't have a method to retrieve the serial number, you may have to search for an updated MIB.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Stephan ,
There are two OID for Zebra one is for 1.3.6.1.4.1.10642 this is Link OS that means latest version and we do have the MIB file for it and its works for me a
another one :1.3.6.1.4.1.683.6.0 this is for Non Link OS and don't have the MIB file with serial no details .
We are expecting for solution to fix for older version and its not easy to upgrade the version any other possible solution to bring the details via discovery into ServiceNow.
Thanks and Regards,
Balaji Kanniah
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Balaji34 I'm not sure I understand. 1.3.6.1.4.1.683.6.0 doesn't seem correct for a Zebra printer. It is for Transition Networks and could be a ZebraNet Print Server. It is likely not the printer's core MIB but could be a mis-reported OID.
Use my instructions above. Add a walk for 1.3.6.1.4.1.683 and a walk for 1.3.6.1.4.1.10642. Run quick discovery on that IP. Post the SNMP - Zebra - Identity SNMP sensor input xml here or message it to me.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@ZW-C
It could be a missing MIB. I would need more context. If nothing else changed and it was working, I would try a different Mid.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Helo @SHansen1 , Nope, actually it was never success yet. I tried configured everything but failed to get the serial number, it was working if I am using the original post here; however that brings the IRE issue that creating duplicates. Then I use the method you told but it's just unable to get the serial number; thus I noticed the error in the screenshot.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@ZW-C
If you go to the SNMP - Zebra - Identity MultiProbe record, you should see these related list entries:
Includes Probes (2)
SNMP - Identity - Zebra - Serial
SNMP - Identity Info
Sensors (1)
SNMP - Zebra - Identity
If you click through on SNMP - Identity Info, you should see SNMP - Zebra - Identity entries in Included by Multiprobe and Multisensor Scripts.
Do you see those settings?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @SHansen1 Thanks for your time on this! Here you are:
function(result, ciData, debug, sensor){
var ZEBRA_SERIAL_OID = 'iso.org.dod.internet.private.enterprises.unk_10642.unk_1.unk_9';
var snmp = new SNMPResponse(result);
var serialNumber = snmp.getOIDText(ZEBRA_SERIAL_OID);
if (serialNumber){
ciData.getData()['serial_number'] = serialNumber;
}
}
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @SHansen1
The issue was resolved; it is due to the ECC topic and wrong OID.
All is good now. Thank you for the great solution shared in this topic and guide me too.
Absolutely Enlighten me thru my first custom setup on these. Thanks again!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@ZW-C It all looks correct. The only thing I've found different is the middle SNMP Field on your Classifier record and the duplicate for 1.1. I would remove the duplicate and verify you don't have the middle OID in your SNMP OID Classification table from Sync and remove it.
All of those OIDs should be linked to that classifier from discovery_snmp_oid table (at least, that is how I did it). Search by Zebra and change classifier to your Zebra classifier. If those were manually created by you, I would remove them. I would check for duplicates there as well.
My version has three SNMP OID classifications for the Zebra classifier:
1.3.6.1.4.1.10642.1.1 (is)
1.3.6.1.4.1.10642.200 (is)
1.3.6.1.4.1.10642 (starts with)
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@ZW-C , how did you fix the "right" serial number? I also got something that is not right:
Using the snmpwalk tool, I can see the serial number here:
OID=.1.3.6.1.4.1.10642.1.4.0, Type=OctetString, Value=ZBR4652561
However if only use this OID in the solution creayed by @SHansen1, discovery does not even trigger the probes/sensors. Script looks like this:
SNMP classification:
Thanks.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@ZW-C I am receiving the same error as you and serial numbers are not populating. When you say "ECC topic and wrong OID," can you elaborate on what you changed? I am not able to get this solution to work. Thanks!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
in case anyone else reads this and is stuck, the ECC topic needs to simply be SNMP and the Java worker error will go away. As far as the wrong OID, in my case, the OID that was needed in the multisensor script was
I also used this same concept to return the model ID string value and pass it to a script include to return the sys_id of the proper model and set that as the model ID. In my case, neither serial number nor model ID was being populated. Now, after following this article and a little tweaking, it is working as expected.
Additionally, I had to created two different classifiers, one for the newer Zebra printers that use one OID and one for older Zebra printers that use a different.