Changes

Jump to navigation Jump to search
1,843 bytes added ,  22:32, 4 January 2019
no edit summary
Line 1: Line 1:  
==HP C309a Printer Plugins==
 
==HP C309a Printer Plugins==
The following plugins report ink and pages printed statistics.
+
 
 +
The following plugins report ink levels and pages printed statistics for HP C309 printers.
    
=== HP C309a Printer Ink Level Plugins ===
 
=== HP C309a Printer Ink Level Plugins ===
Line 10: Line 11:  
or:
 
or:
   −
   $ ln -s /path/to/c309_ink_ /etc/munin/plugins/c309_ink_printer
+
   $ ln -s /path/to/c309_ink_ /etc/munin/plugins/c309_ink_hp309
      −
where printer is your DNS name for your printer.
+
where 192.168.1.7 is your printer IP address, or else hp309 is your DNS name for your printer.
      Line 88: Line 89:     
</pre>
 
</pre>
 +
 +
 +
=== HP C309a Pages Processed Plugins ===
 +
 +
This plugin reports statistics relating to the number of pages processed on an HP C309a printer. The text listing below can be saved into a file named c309_pages_ and then a link can be created from its location into your munin plugins directory. The plugin link name must have the printer IP address or DNS name appended to the plugin name, as shown below.
 +
 +
  $ ln -s /path/to/c309_pages_ /etc/munin/plugins/c309_pages_192.168.1.7
 +
 +
or:
 +
 +
  $ ln -s /path/to/c309_pages_ /etc/munin/plugins/c309_pages_hp309
 +
 +
 +
where 192.168.1.7 is your printer IP address, or else hp309 is your DNS name for your printer.
 +
 +
 +
You may also need to promote the plugin to run as root if your net-tools snmpget binary is not available to normal users.
 +
 +
'''/etc/munin/plugin-conf.d/munin-node'''
 +
 +
<pre>
 +
[c309*]
 +
user root
 +
</pre>
 +
 +
 +
<pre>
 +
#!/bin/sh
 +
#
 +
# Plugin to report printer page count.
 +
#
 +
# Contributed by Tim Chappell
 +
#
 +
# Magic markers - optional - used by installation scripts and
 +
# munin-config:
 +
#
 +
#%# family=manual
 +
#%# capabilities=autoconf
 +
 +
IP=${0##*/c309_pages_}
 +
 +
if [ "$1" = "autoconf" ]; then
 +
        echo yes
 +
        exit 0
 +
fi
 +
 +
if [ "$1" = "config" ]; then
 +
 +
        echo 'graph_category printing'
 +
        echo 'graph_title Printer Page Count'
 +
        # echo 'graph_args --base 1000 -l 0 '
 +
        echo 'graph_args --base 1000'
 +
        echo 'graph_vlabel Pages (number)'
 +
        echo 'pages.label Pages'
 +
        echo 'pages.draw LINE1'
 +
        exit 0
 +
fi
 +
 +
/usr/bin/snmpget -c public -v 1 $IP SNMPv2-SMI::mib-2.43.10.2.1.4.1.1 | awk '{printf "pages.value %s\n",$NF}'
 +
</pre>
 +
 +
 +
This website publishes a Privacy Policy (link at the bottom of every page). Continued use of this website implies your consent to the use of data outlined in the policy.

Navigation menu