Monitoring HP Printer Toner Levels

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

Moderators: Developers, Moderators

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

Monitoring HP Printer Toner Levels

Post by rex »

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 11312 times
Linzer
Posts: 31
Joined: Tue Sep 24, 2002 12:26 pm

Question regarding this export

Post by Linzer »

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

Post by Steve »

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

Post by Yvan »

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

Post by jweinraub »

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

Post by cyrill »

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

Post by cyrill »

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

Post by cyrill »

I've a problem... xD

My template have this status "Not Being Graphed " why ???
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

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

Post by cyrill »

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

Post by the_sphynx »

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

Post by cyrill »

thanks...

I'm stupid sorry.

There are others templates or scripts for HP printer ???
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

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

Post by cyrill »

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

Post by PepsiCrazy »

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

Who is online

Users browsing this forum: No registered users and 1 guest