SNMP Printer Template

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: SNMP Printer Template

Post by noname »

BTW, here is a sample template for Xerox Multi-Copier.
This query tries to retrieve several printing counters from XEROX-HOST-RESOURCES-EXT-MIB:xcmHrDevDetailEntry table (.1.3.6.1.4.1.253.8.53.13.2.1).
cacti_data_query_xcmhrdevdetailentry.xml
Sample data query
(13.97 KiB) Downloaded 979 times
xcmhrdevdetailentry.xml
This should be placed under cacti/resource/snmp_queries/
(1.07 KiB) Downloaded 811 times
Import Results
Image

Graphs to be created (on my device)
Image

Sample graph
Image

Image
linvinus
Posts: 2
Joined: Thu Feb 09, 2012 5:34 am

Re: SNMP Printer Template

Post by linvinus »

at first page printer_supply.xml is incorrect
to resolve empty graphs problem, replace printer_supply.xml with following data.

Code: Select all

<interface>
	<name>Get Printer Supply Information</name>
	<index_order_type>numeric</index_order_type>
	<oid_index>.1.3.6.1.2.1.43.11.1.1.2</oid_index>
	<oid_index_parse>OID/REGEXP:.*\.([0-9]+)$</oid_index_parse>

	<fields>
        <prtMarkersSupplyIndex>
           <name>Index</name>
              <source>index</source>
             <direction>input</direction>
         </prtMarkersSupplyIndex>
		<prtMarkersSupplyDesc>
			<name>Description</name>
			<method>walk</method>
			<source>value</source>
			<direction>input</direction>
			<oid>.1.3.6.1.2.1.43.11.1.1.6.1</oid>
		</prtMarkersSupplyDesc>
		<prtMarkersSupplyUnits>
			<name>Supply Units</name>
			<method>walk</method>
			<source>value</source>
			<direction>input</direction>
			<oid>.1.3.6.1.2.1.43.11.1.1.7.1</oid>
		</prtMarkersSupplyUnits>

		<prtMarkersSupplySize>
			<name>Total Capacity</name>
			<method>walk</method>
			<source>value</source>
			<direction>output</direction>
			<oid>.1.3.6.1.2.1.43.11.1.1.8.1</oid>
		</prtMarkersSupplySize>
		<prtMarkersSupplyUsed>
			<name>Total Used</name>
			<method>walk</method>
			<source>value</source>
			<direction>output</direction>
			<oid>.1.3.6.1.2.1.43.11.1.1.9.1</oid>
		</prtMarkersSupplyUsed>
	</fields>
</interface>
at Console -> Data Templates ->Host MIB - Get Printer Total Pages
change Data Source Type from COUNTER to GAUGE
recreate all graphs, if it was created width incorrect printer_supply.xml
my version tested on:
Xerox Phaser 3300MFP
hp-CP5520
hp-lj3525
hp-2055
soulraven
Posts: 18
Joined: Mon Jan 08, 2007 2:40 am
Location: Campulung Muscel
Contact:

Re: SNMP Printer Template

Post by soulraven »

anyone try to use a Lexmark T430 printer? i try to find some information and template for this printer, but nothing, the only information is this:

http://ubuntuforums.org/showthread.php?t=572593
http://www.oidview.com/mibs/641/LEXMARK-PVT-MIB.html
http://support.lexmark.com/index?pmv=pr ... S&id=FA703

any user with a lexmark laser printer?
xtdv
Posts: 2
Joined: Mon Dec 03, 2012 5:05 am
Location: Vietnam
Contact:

Re: SNMP Printer Template

Post by xtdv »

Who uses Ricoh printer may try this template...

I tested with 3510 and C240.

Code: Select all

iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.1 = STRING: "Cyan"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.2 = STRING: "Magenta"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.3 = STRING: "Yellow"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.4 = STRING: "Black"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.1 = STRING: "Cyan Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.2 = STRING: "Magenta Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.3 = STRING: "Yellow Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.4 = STRING: "Black Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.1 = INTEGER: 10
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.2 = INTEGER: 11
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.3 = INTEGER: 12
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.4 = INTEGER: 13
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.1 = INTEGER: 100
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.2 = INTEGER: 100
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.3 = INTEGER: 100
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.4 = INTEGER: 100
Image

Image
Attachments
Cacti_Ricoh_SNMP.zip
(21.64 KiB) Downloaded 943 times
ndvuser
Posts: 5
Joined: Sat Nov 13, 2010 10:21 am

Re: SNMP Printer Template

Post by ndvuser »

Ricoh c2500 and Ricoh 171
Data Query Debug Information
+ Running data query [25].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/printer_supply.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.43.11.1.1.1' Index Count: 0
+ No SNMP data returned
xtdv wrote:Who uses Ricoh printer may try this template...

I tested with 3510 and C240.

Code: Select all

iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.1 = STRING: "Cyan"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.2 = STRING: "Magenta"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.3 = STRING: "Yellow"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.4 = STRING: "Black"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.1 = STRING: "Cyan Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.2 = STRING: "Magenta Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.3 = STRING: "Yellow Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.4 = STRING: "Black Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.1 = INTEGER: 10
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.2 = INTEGER: 11
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.3 = INTEGER: 12
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.4 = INTEGER: 13
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.1 = INTEGER: 100
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.2 = INTEGER: 100
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.3 = INTEGER: 100
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.4 = INTEGER: 100
Image

Image
xtdv
Posts: 2
Joined: Mon Dec 03, 2012 5:05 am
Location: Vietnam
Contact:

Re: SNMP Printer Template

Post by xtdv »

ndvuser wrote:Ricoh c2500 and Ricoh 171
Data Query Debug Information
+ Running data query [25].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/printer_supply.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.43.11.1.1.1' Index Count: 0
+ No SNMP data returned
You have to edit printer_supply.xml with correct MIB values.
keithh
Posts: 9
Joined: Sat Sep 17, 2011 1:16 am

Re: SNMP Printer Template

Post by keithh »

I am seeking the wisdom of the experienced to get the printer toner reporting going.

Printer is a HP LJ2200 connected via a Jet Direct card.

I have loaded the latest SNMP query and used the OID returned within Cacti:

Code: Select all

<interface>
	<name>Get Printer Supply Information</name>
	<index_order_type>numeric</index_order_type>
	<oid_index>.1.3.6.1.4.1.11.2.3.9.1</oid_index>
	<oid_index_parse>OID/REGEXP:.*\.([0-9]+)$</oid_index_parse>
	<fields>
		<prtMarkersSupplyIndex>
			<name>Index</name>
			<source>index</source>
			<direction>input</direction>
		</prtMarkersSupplyIndex>
		<prtMarkersSupplyDesc>
			<name>Description</name>
			<method>walk</method>
			<source>value</source>
			<direction>input</direction>
			<oid>.1.3.6.1.2.1.43.11.1.1.6.1</oid>
		</prtMarkersSupplyDesc>
		<prtMarkersSupplyUnits>
			<name>Supply Units</name>
			<method>walk</method>
			<source>value</source>
			<direction>input</direction>
			<oid>.1.3.6.1.2.1.43.11.1.1.7.1</oid>
		</prtMarkersSupplyUnits>
		<prtMarkersSupplySize>
			<name>Total Capacity</name>
			<method>walk</method>
			<source>value</source>
			<direction>output</direction>
			<oid>.1.3.6.1.2.1.43.11.1.1.8.1</oid>
		</prtMarkersSupplySize>
		<prtMarkersSupplyUsed>
			<name>Total Used</name>
			<method>walk</method>
			<source>value</source>
			<direction>output</direction>
			<oid>.1.3.6.1.2.1.43.11.1.1.9.1</oid>
		</prtMarkersSupplyUsed>
	</fields>
</interface>
That returns this:

Code: Select all

+ Running data query [12].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/volume1/web/cacti/resource/snmp_queries/printer_supply.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.11.2.3.9.1' Index Count: 47
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.1.0' value: '32'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.1.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.2.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.3.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.4.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.5.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.6.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.8.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.9.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.10.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.11.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.12.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.13.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.14.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.15.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.16.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.17.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.18.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.19.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.20.0' value: '00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.21.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.22.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.23.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.3.0' value: 'READY'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.4.0' value: ''
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.5.0' value: ''
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.6.0' value: ''
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.7.0' value: 'G:Hewlett-Packard;CMD:PJL,MLC,PCL,PCLXL,POSTSCRIPT;MDL:HP LaserJet 2200;CLS:PRINTER;DES:Hewlett-Packard LaserJet 2200;MEM:16MB;OPTRAY:500Sheets'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.8.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.9.0' value: '0'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.12.0' value: '7'
+ Index found at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.13.0' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ Index found at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "' value: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.1.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.1.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.2.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.3.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.4.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.5.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.6.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.8.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.9.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.10.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.11.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.12.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.13.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.14.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.15.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.16.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.17.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.18.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.19.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.20.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.21.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.22.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.2.23.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.3.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.4.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.5.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.6.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.7.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.8.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.9.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.12.0' results: '0'
+ index_parse at OID: '.1.3.6.1.4.1.11.2.3.9.1.1.13.0' results: '0'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ index_parse at OID: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "' results: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "'
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='0']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00']
+ Inserting index data for field 'prtMarkersSupplyIndex' [value='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "']
+ Located input field 'prtMarkersSupplyDesc' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.43.11.1.1.6.1'
+ Found item [prtMarkersSupplyDesc='Toner Cartridge'] index: 1 [from value]
+ Located input field 'prtMarkersSupplyUnits' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.43.11.1.1.7.1'
+ Found item [prtMarkersSupplyUnits='13'] index: 1 [from value]
I am encouraged to see supply desc and supply units returning values. Sadly the capacity and current level are not returned which is kind of important for getting the graphing going. :wink:

Worth pointing out the OID's shown in the LJ2100 MIB are nothing like the ones in the query. I have tried them and they don't work at all.

Would any kind soul care to point me down the path to enlightenment.

Many thanks in advance.

Keith
Attachments
ScreenShot790.jpg
ScreenShot790.jpg (71.04 KiB) Viewed 14571 times
keithh
Posts: 9
Joined: Sat Sep 17, 2011 1:16 am

Re: SNMP Printer Template

Post by keithh »

I may have answered my own question. Thie 2100 mib says the printer cannot sense toner level. It appears the 2200 may be the same. It returns -2 "unknown" for supply size and supply used values.

Code: Select all

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.43.11.1.1.6.1'
+ Found item [prtMarkersSupplyDesc='Toner Cartridge'] index: 1 [from value]
+ Located input field 'prtMarkersSupplyUnits' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.43.11.1.1.7.1'
+ Found item [prtMarkersSupplyUnits='13'] index: 1 [from value]
+ Located input field 'prtMarkersSupplySize' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.43.11.1.1.8.1'
+ Found item [prtMarkersSupplySize='-2'] index: 1 [from value]
+ Located input field 'prtMarkersSupplyUsed' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.43.11.1.1.9.1'
+ Found item [prtMarkersSupplyUsed='-2'] index: 1 [from value]
sammy66
Posts: 2
Joined: Wed Jul 30, 2014 1:23 am

Re: SNMP Printer Template

Post by sammy66 »

Hi All, i just installed this printer script, and i have a couple questions. I am getting graph data for the amount of prints, but when i look at the graphs, the current pages is always 0. Does anyone know why this is like this?
Duiveltje
Posts: 1
Joined: Wed Aug 20, 2014 12:35 pm

Re: SNMP Printer Template

Post by Duiveltje »

xtdv wrote:Who uses Ricoh printer may try this template...

I tested with 3510 and C240.

Code: Select all

iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.1 = STRING: "Cyan"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.2 = STRING: "Magenta"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.3 = STRING: "Yellow"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.2.4 = STRING: "Black"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.1 = STRING: "Cyan Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.2 = STRING: "Magenta Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.3 = STRING: "Yellow Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.3.4 = STRING: "Black Toner"
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.1 = INTEGER: 10
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.2 = INTEGER: 11
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.3 = INTEGER: 12
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.4.4 = INTEGER: 13
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.1 = INTEGER: 100
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.2 = INTEGER: 100
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.3 = INTEGER: 100
iso.3.6.1.4.1.367.3.2.1.2.24.1.1.5.4 = INTEGER: 100
Image

Image

Nice! How did you get all supplies colors on 1 graph if i may ask?
sledzik1984
Posts: 4
Joined: Mon Nov 15, 2010 4:04 am

Re: SNMP Printer Template

Post by sledzik1984 »

Version modified for Samsung Ethernet Printers
Attachments
samsung_snmp_printer.rar
(32.12 KiB) Downloaded 484 times
marius
Posts: 1
Joined: Tue May 03, 2016 10:06 am

Re: SNMP Printer Template

Post by marius »

Using snmp ,how to count toner per page (a kind of Cost per Page)
?
What I need is to know is the average toner used after I print a page compared with a standard , or the percent(area, square) of the page when the printer effectively used toner. Ex.: When I print a page I can print only on halp on it , or I can print full on all page. How IO can know this info?(printer square footage ) I am filing somehow this OIDS can be used : prtMarkerSuppliesGroup prtMarkerCounterUnit prtMarkerLifeCount prtMediaPathMedia prtInputMediaWeight
UnAfraid
Posts: 1
Joined: Thu Oct 06, 2016 11:47 pm

Re: SNMP Printer Template

Post by UnAfraid »

Hello,

I've HP LaserJet Pro P1102w and only 1 template managed to get any query data, others doesn't shows much.

Here's snmpwalk dump
https://gist.github.com/UnAfraid/95f99d ... f90b1487ff

Does anyone have template for similar?

Regards!
tyrr
Posts: 17
Joined: Wed Apr 26, 2017 4:35 am

Re: SNMP Printer Template

Post by tyrr »

Hi all !
Sorry for my post, i have resolv my problem before someone answer. But i don't find how delete it...
User avatar
RaduAlexandru
Posts: 43
Joined: Mon Mar 28, 2005 5:06 pm
Location: Bucharest, Romania
Contact:

Re: SNMP Printer Template

Post by RaduAlexandru »

Good day all!

I know this is an old thread, and I apologize for disturbing it's slumber, but I was wondering if someone might be able to help me, as I am at a loss.

The printer I am attempting to graph apears to have it's own version of reality, where the table column prtMarkerSuppliesIndex does not exist and in stead it adds another "level" for each table entry, as you may see below.

Code: Select all

user@serv:~$ snmptable -v2c -c public 10.1.0.50 Printer-MIB::prtMarkerSuppliesTable
SNMP table: Printer-MIB::prtMarkerSuppliesTable

 prtMarkerSuppliesMarkerIndex prtMarkerSuppliesColorantIndex prtMarkerSuppliesClass prtMarkerSuppliesType    prtMarkerSuppliesDescription prtMarkerSuppliesSupplyUnit prtMarkerSuppliesMaxCapacity prtMarkerSuppliesLevel
                            1                              1   supplyThatIsConsumed                 toner   "Canon TONER 034 Black Toner"                     percent                          100                      5
                            1                              2   supplyThatIsConsumed                 toner    "Canon TONER 034 Cyan Toner"                     percent                          100                     49
                            1                              3   supplyThatIsConsumed                 toner "Canon TONER 034 Magenta Toner"                     percent                          100                     53
                            1                              4   supplyThatIsConsumed                 toner  "Canon TONER 034 Yellow Toner"                     percent                          100                     49

Code: Select all

user@serv:~$ snmpwalk -On -v2c -c public 10.1.0.50 Printer-MIB::prtMarkerSuppliesTable
.1.3.6.1.2.1.43.11.1.1.2.1.1 = INTEGER: 1
.1.3.6.1.2.1.43.11.1.1.2.1.2 = INTEGER: 1
.1.3.6.1.2.1.43.11.1.1.2.1.3 = INTEGER: 1
.1.3.6.1.2.1.43.11.1.1.2.1.4 = INTEGER: 1
.1.3.6.1.2.1.43.11.1.1.3.1.1 = INTEGER: 1
.1.3.6.1.2.1.43.11.1.1.3.1.2 = INTEGER: 2
.1.3.6.1.2.1.43.11.1.1.3.1.3 = INTEGER: 3
.1.3.6.1.2.1.43.11.1.1.3.1.4 = INTEGER: 4
.1.3.6.1.2.1.43.11.1.1.4.1.1 = INTEGER: supplyThatIsConsumed(3)
.1.3.6.1.2.1.43.11.1.1.4.1.2 = INTEGER: supplyThatIsConsumed(3)
.1.3.6.1.2.1.43.11.1.1.4.1.3 = INTEGER: supplyThatIsConsumed(3)
.1.3.6.1.2.1.43.11.1.1.4.1.4 = INTEGER: supplyThatIsConsumed(3)
.1.3.6.1.2.1.43.11.1.1.5.1.1 = INTEGER: toner(3)
.1.3.6.1.2.1.43.11.1.1.5.1.2 = INTEGER: toner(3)
.1.3.6.1.2.1.43.11.1.1.5.1.3 = INTEGER: toner(3)
.1.3.6.1.2.1.43.11.1.1.5.1.4 = INTEGER: toner(3)
.1.3.6.1.2.1.43.11.1.1.6.1.1 = STRING: "Canon TONER 034 Black Toner"
.1.3.6.1.2.1.43.11.1.1.6.1.2 = STRING: "Canon TONER 034 Cyan Toner"
.1.3.6.1.2.1.43.11.1.1.6.1.3 = STRING: "Canon TONER 034 Magenta Toner"
.1.3.6.1.2.1.43.11.1.1.6.1.4 = STRING: "Canon TONER 034 Yellow Toner"
.1.3.6.1.2.1.43.11.1.1.7.1.1 = INTEGER: percent(19)
.1.3.6.1.2.1.43.11.1.1.7.1.2 = INTEGER: percent(19)
.1.3.6.1.2.1.43.11.1.1.7.1.3 = INTEGER: percent(19)
.1.3.6.1.2.1.43.11.1.1.7.1.4 = INTEGER: percent(19)
.1.3.6.1.2.1.43.11.1.1.8.1.1 = INTEGER: 100
.1.3.6.1.2.1.43.11.1.1.8.1.2 = INTEGER: 100
.1.3.6.1.2.1.43.11.1.1.8.1.3 = INTEGER: 100
.1.3.6.1.2.1.43.11.1.1.8.1.4 = INTEGER: 100
.1.3.6.1.2.1.43.11.1.1.9.1.1 = INTEGER: 5
.1.3.6.1.2.1.43.11.1.1.9.1.2 = INTEGER: 49
.1.3.6.1.2.1.43.11.1.1.9.1.3 = INTEGER: 53
.1.3.6.1.2.1.43.11.1.1.9.1.4 = INTEGER: 49

Code: Select all

user@serv:~$ snmpwalk -v2c -c public 10.1.0.50 Printer-MIB::prtMarkerSuppliesTable
Printer-MIB::prtMarkerSuppliesMarkerIndex.1.1 = INTEGER: 1
Printer-MIB::prtMarkerSuppliesMarkerIndex.1.2 = INTEGER: 1
Printer-MIB::prtMarkerSuppliesMarkerIndex.1.3 = INTEGER: 1
Printer-MIB::prtMarkerSuppliesMarkerIndex.1.4 = INTEGER: 1
Printer-MIB::prtMarkerSuppliesColorantIndex.1.1 = INTEGER: 1
Printer-MIB::prtMarkerSuppliesColorantIndex.1.2 = INTEGER: 2
Printer-MIB::prtMarkerSuppliesColorantIndex.1.3 = INTEGER: 3
Printer-MIB::prtMarkerSuppliesColorantIndex.1.4 = INTEGER: 4
Printer-MIB::prtMarkerSuppliesClass.1.1 = INTEGER: supplyThatIsConsumed(3)
Printer-MIB::prtMarkerSuppliesClass.1.2 = INTEGER: supplyThatIsConsumed(3)
Printer-MIB::prtMarkerSuppliesClass.1.3 = INTEGER: supplyThatIsConsumed(3)
Printer-MIB::prtMarkerSuppliesClass.1.4 = INTEGER: supplyThatIsConsumed(3)
Printer-MIB::prtMarkerSuppliesType.1.1 = INTEGER: toner(3)
Printer-MIB::prtMarkerSuppliesType.1.2 = INTEGER: toner(3)
Printer-MIB::prtMarkerSuppliesType.1.3 = INTEGER: toner(3)
Printer-MIB::prtMarkerSuppliesType.1.4 = INTEGER: toner(3)
Printer-MIB::prtMarkerSuppliesDescription.1.1 = STRING: "Canon TONER 034 Black Toner"
Printer-MIB::prtMarkerSuppliesDescription.1.2 = STRING: "Canon TONER 034 Cyan Toner"
Printer-MIB::prtMarkerSuppliesDescription.1.3 = STRING: "Canon TONER 034 Magenta Toner"
Printer-MIB::prtMarkerSuppliesDescription.1.4 = STRING: "Canon TONER 034 Yellow Toner"
Printer-MIB::prtMarkerSuppliesSupplyUnit.1.1 = INTEGER: percent(19)
Printer-MIB::prtMarkerSuppliesSupplyUnit.1.2 = INTEGER: percent(19)
Printer-MIB::prtMarkerSuppliesSupplyUnit.1.3 = INTEGER: percent(19)
Printer-MIB::prtMarkerSuppliesSupplyUnit.1.4 = INTEGER: percent(19)
Printer-MIB::prtMarkerSuppliesMaxCapacity.1.1 = INTEGER: 100
Printer-MIB::prtMarkerSuppliesMaxCapacity.1.2 = INTEGER: 100
Printer-MIB::prtMarkerSuppliesMaxCapacity.1.3 = INTEGER: 100
Printer-MIB::prtMarkerSuppliesMaxCapacity.1.4 = INTEGER: 100
Printer-MIB::prtMarkerSuppliesLevel.1.1 = INTEGER: 5
Printer-MIB::prtMarkerSuppliesLevel.1.2 = INTEGER: 49
Printer-MIB::prtMarkerSuppliesLevel.1.3 = INTEGER: 53
Printer-MIB::prtMarkerSuppliesLevel.1.4 = INTEGER: 49
I managed (sort of) to get around the lack of a proper index column by using prtMarkerSuppliesColorantIndex and this works for generating the graph title, etc. and for verbose query, but it does not work for getting data. I surmised that it's due to the use of snmpwalk vs snmpget.

Any suggestions as to get around this issue would be greatly appreciated.


Later Edit:
Apparently, you have to delete and recreate the graphs if you edit the snmp query xml. Or the changes do not get picked up.
In the end, this query works in my case:

Code: Select all

<interface>
        <name>Get Printer Supply Information</name>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.2.1.43.11.1.1.3</oid_index>

        <fields>
                <prtMarkersSupplyIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.2.1.43.11.1.1.3.1</oid>
                </prtMarkersSupplyIndex>
                <prtMarkersSupplyDesc>
                        <name>Description</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.2.1.43.11.1.1.6.1</oid>
                </prtMarkersSupplyDesc>
                <prtMarkersSupplyUnits>
                        <name>Supply Units</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.2.1.43.11.1.1.7.1</oid>
                </prtMarkersSupplyUnits>

                <prtMarkersSupplySize>
                        <name>Total Capacity</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.2.1.43.11.1.1.8.1</oid>
                </prtMarkersSupplySize>
                <prtMarkersSupplyUsed>
                        <name>Total Used</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.2.1.43.11.1.1.9.1</oid>
                </prtMarkersSupplyUsed>
        </fields>
</interface>
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests