Code Monkey home page Code Monkey logo

check_snmp_printer's Introduction

check_snmp_printer

Nagios and Icinga Plugin for Checking SNMP Printer Status (Trays, Consumables and Pagecounts) which includes PerfData.

2.0.0 POSSIBLE CODE BREAKING UPDATE

Must have Net-SNMP and its libraries installed. Can be compiled from source from www.net-snmp.org (latest version) or via package managers:

Debian:

sudo apt-get install snmp
sudo apt-get install libsnmp-perl

Centos/RHEL:

sudo yum install net-snmp
sudo yum install net-snmp-utils
sudo yum install net-snmp-devel
sudo yum install net-snmp-perl

Supported Printer Models:

  • Canon
  • HP
  • Xerox
  • Ricoh
  • Brother
  • Lexmark
  • Kyocera
  • Olivetti

Your specific printer not supported? Open an issue on Github and we'll work to get it supported.

Forked and modified from Franky Van Liedekerke's 2014 version.

Consumables

Tray Status

Page Count

Getting Started

These instructions assume your Icinga2 is installed on a RHEL/CentOS system. You may need to modify slightly to work with other systems.

Prerequisites

Perl >= 5.10

Net-SNMP and Libraries:

Debian:

sudo apt-get install snmp
sudo apt-get install libsnmp-perl

Centos/RHEL:

sudo yum install net-snmp
sudo yum install net-snmp-utils
sudo yum install net-snmp-devel
sudo yum install net-snmp-perl

Nagios plugins installed and located in one of the following directories:

/usr/lib/nagios/plugins 
/usr/lib64/nagios/plugins

Installing

Copy check_snmp_printer into your plugin directory and give it executable writes:

sudo cp ./check_snmp_printer /usr/lib64/nagios/plugins/
chmod a+x /usr/lib64/nagios/plugins/check_snmp_printer

Copy printers.conf into plugins-contrib.d folder:

sudo cp ./printers.conf /usr/share/icinga2/include/plugins-contrib.d/

Append services-printers.conf to the end of your Icinga2 services.conf:

cat ./services-printers.conf >> /etc/icinga2/conf.d/services.conf

If using Graphite, copy graphite templates to Icinga2 Graphite template folder:

sudo cp ./printer-consumables.ini /usr/share/icingaweb2/modules/graphite/templates/
sudo cp ./printer-trays.ini /usr/share/icingaweb2/modules/graphite/templates/
sudo cp ./printer-pagecount.ini /usr/share/icingaweb2/modules/graphite/templates/

If using Grafana, import JSON Dashboard (Graphite or InfluxDB) file and add graph dashboard information into module making sure to name the Dashboard printer-metrics:

sudo cat printer-metrics-graphs.ini >> /etc/icingaweb2/modules/grafana/graphs.ini

Restart Icinga2:

sudo systemctl restart icinga2

Acknowledgments

  • Franky Van Liedekerke for porting Jason Leonard's initial BASH script to Perl.
  • Jason Leonard for writing the initial code that this was ultimately based upon.

check_snmp_printer's People

Contributors

tylan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.