Hello,
Post by Neale BanksI'd like to use Cricket to collect and graph printer page-counters, toner
levels etc, etc.
i can think of several ways to do this. first check whether your printer
supports SNMP. if it's a network printer or has a network-module, chances
are this will work.
if you know the IP-address of your printer(s), you can try to use snmpwalk
to discover what variables it gives you access too. for example:
snmpwalk -v 2c -c public 192.168.2.33
depending on what brand/type of printer you have, the SNMP variables you can
get can differ.
as an example for an HP Laserjet 1320-tn printer, you can define the
following OIDs to cricket:
OID prtMarkerSuppliesMaxCapacity 1.3.6.1.2.1.43.11.1.1.8.1.1
OID prtMarkerSuppliesLevel 1.3.6.1.2.1.43.11.1.1.9.1.1
OID hrStorageSize 1.3.6.1.2.1.25.2.3.1.5.1
OID hrStorageUsed 1.3.6.1.2.1.25.2.3.1.6.1
and then use them to define data-sources, and collect/graph them using
cricket (using the default SNMP stanza)
if you don't have network-printers, or ones without SNMP, you are best off
writing a little script to get your data (for example, i can reformat the
data that is returned by the 'hp-info' utility for USB-connected
color-printers and get the individual ink-levels for each color, define
data-sources for each and graph them on one graph; another example would be
getting your data via a script from a CUPS server, a proper solution for
getting your pagecounts).
you then would be using the EXEC scheme for your data-sources (check
http://cricket.sourceforge.net/support/doc/reference.html#datasource)
you'll need a scripting-language of choice for this, preferably a language
that allows for easy text-manipulation. most of the time i use a combination
of Awk and shell for this, but anything works, really
Post by Neale BanksSearching the archives didn't help much - is anyone doing this and able to
offer some pointers?
i don't know if there is much information available on this. anyway, you are
well on your way with the above description. as cricket does allow to
collect and graph anything, it really comes down to study the particular
devices (along with their software/drivers) you are intrested in for their
SNMP or other reporting capabilities.
then use one of the possible ways to define data-sources (see link above) to
get your data polled and graphed.
good luck!
greetz,
koen.