Monitoring HP Printer Toner Levels

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

Moderators: Moderators, Developers

Author
Message
rex
Posts: 7
Joined: Mon Nov 17, 2003 5:12 pm
Location: US/California/Bay Area

Monitoring HP Printer Toner Levels

#1 Post by rex » Thu Nov 20, 2003 11:57 pm

I took a quick peek through the forums and didn't see any posts with examples of how to monitor the toner level on HP printers (my apologies if I'm duplicating somone's work here) so I set out to create a graph template for doing just that.

Here are the OIDs involved:
.1.3.6.1.2.1.43.11.1.1.9.1.1 is the amount of black toner remaining
.1.3.6.1.2.1.43.11.1.1.8.1.1 is the maximum black toner level

I have attached an export of a graph template (Printer - HP - Toner Level) and two data templates (Printer - HP - Black Toner Max and Printer -HP -Black Toner Level).

This is my first real attempt at using user defined graph templates and data source templates (this is my first week playing with cacti) so feedback is welcome!
Attachments
printer-hp-toner.xml
One graph and two data source templates for HP Printer toner level.
(10.29 KiB) Downloaded 10521 times

Linzer
Posts: 31
Joined: Tue Sep 24, 2002 12:26 pm

Question regarding this export

#2 Post by Linzer » Tue Nov 25, 2003 12:02 pm

Shouldn't the imported max data template be of type SNMP and polling the .1.3.6.1.2.1.43.11.1.1.8.1.1 OID?

Steve

No rrd file

#3 Post by Steve » Fri Nov 28, 2003 6:35 am

Apologies but I'm quite new to Cacti and rrd in general.
I've imported your script but my images appear broken...
When debugging it says there is no rrd file.
Any idea why one has not been created??

Yvan
Posts: 7
Joined: Wed Apr 02, 2003 2:28 pm
Location: Balegem, BE

#4 Post by Yvan » Fri Nov 28, 2003 7:50 am

I run into the same problem. Here's what I did

1. imported the xml-template
2. modified the data template 'Printer - HP - Black Toner Max'
2.1. changed the data input source to 'Get SNMP Data'
2.2. and set the OID to .1.3.6.1.2.1.43.11.1.1.8.1.1
3. created a new polling host
3.1 host template set 'Generic SNMP-enabled host'
4. created the data sources
4.1. set data template to the HP Toner Templates
4.2. and the host to the host we just made
5. created a new graph in Graph Management
5.1. selected Graph Template: Printer HP oner Level
5.2. selected the host we made

But somewhere I missed something because cacti refuses to create a graph
When I debug the graph, the DEF fields are missing. :(
This is what is looks like:

Code: Select all

/usr/local/rrdtool-1.0.45/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--title="lexmark OptraColor 1200 - Toner Level" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
AREA:#CDCFC4:"Maximum Toner Level"  \
LINE1:#000000:"Current Toner Level"  \
GPRINT::LAST:"mg of toner remaining\:%8.0lf" 
And this is what is should look like:

Code: Select all

/usr/local/rrdtool-1.0.45/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--title="lexmark OptraColor 1200 - Toner Level" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
DEF:a=/home/www/htdocs/cacti/rra/lexmark_optracolor_1200_blk_toner_level_133.rrd:blk_toner_level:AVERAGE \
DEF:b=/home/www/htdocs/cacti/rra/lexmark_optracolor_1200_blk_toner_max_133.rrd:blk_toner_level:AVERAGE \
AREA:b#CDCFC4:"Maximum Toner Level"  \
LINE1:a#000000:"Current Toner Level"  \
GPRINT:a:LAST:"mg of toner remaining\:%8.0lf" 
Where did we go wrong? (Novastar would ask :D)

Additional information can be found in http://www.raxnet.net/board/viewtopic.php?t=2831

cya,

Yvan

jweinraub
Cacti User
Posts: 61
Joined: Fri Apr 13, 2007 9:21 am

#5 Post by jweinraub » Fri Apr 13, 2007 9:22 am

anyway for this to work with the 2600n? Its a colour laser so I'd like to monitor levels of all toners.

Thanks!

User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

#6 Post by cyrill » Fri Feb 01, 2008 8:59 am

Hello ! I'm a newbie with cacti.

It's a graph template, host template or a data template ?

How must I processing to use it ?

thanks

User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

#7 Post by cyrill » Fri Feb 01, 2008 9:02 am

sorry for my stupid question... lol there are just one solution for importing data in cacti...

sorry

User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

#8 Post by cyrill » Fri Feb 01, 2008 9:12 am

I've a problem... xD

My template have this status "Not Being Graphed " why ???

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#9 Post by gandalf » Fri Feb 01, 2008 9:22 am

Select "Create Graphs for this Host", check that Template and "Create"
Reinhard

User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

#10 Post by cyrill » Fri Feb 01, 2008 9:26 am

hum. thanks for your help

Just one question too : What the unit for the level of toner ?

the_sphynx
Posts: 21
Joined: Wed Aug 04, 2004 4:28 pm
Location: Thornton, CO

#11 Post by the_sphynx » Fri Feb 01, 2008 2:29 pm

cryril,
The legend says mg of toner remaining so I would assume miligrams...

User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

#12 Post by cyrill » Mon Feb 04, 2008 3:28 am

thanks...

I'm stupid sorry.

There are others templates or scripts for HP printer ???

User avatar
fmangeant
Cacti Guru User
Posts: 2326
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

#13 Post by fmangeant » Mon Feb 04, 2008 3:38 am

You can find a list of templates here.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]

User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

#14 Post by cyrill » Mon Feb 04, 2008 4:27 am

yes I see...

But I can't find a graph template for cheking the spooler of a printer or its queue ... It's possible ?f
Last edited by cyrill on Wed Jun 04, 2008 6:14 am, edited 1 time in total.

PepsiCrazy
Posts: 1
Joined: Mon May 19, 2008 8:59 am

#15 Post by PepsiCrazy » Mon May 19, 2008 9:08 am

Hi All,

I was experiencing the same problem as Steve as my pictures were appearing broken and i kept being to there was no rrd file when trying to debug.

I tried of the instructions Yvan had left, they worked great.

Thanks! :D
| [url=http://www.selfadhesivelabels.com]Label Printing[/url] | [url=http://www.selfadhesivelabels.com/printed-labels.html]Printed Labels[/url] | - PepsiCrazy

Post Reply