Cool Solutions

Monitoring iPrint printer queues with Icinga2



By:

August 18, 2015 8:54 am

Reads:2,997

Comments:0

Score:Unrated

Print/PDF

I have created a new plugin to use with Icinga2, it should work with Nagios.

Find it on Icinga Exchange ->

I am currently monitoring 325 iPrinter queues on seven different servers in a single “pane of glass” with this plugin.

check_ipp.pl Readme File

File: check_iprinters.pl
Author: dbenjamin
Created: Aug 4, 2015
Release: 0.0.1
Tested against Novell iPrint Server 6.7.0.20150629-0.6.6, running on SLES 11,
SP3 with OES 11, SP2.

Usage:
check_iprinters.pl -I <host address> -Q <queue name> [-P <port> default=631] [-v enable verbose] [--version]

Required
-I Host IP address.
-Q Queue name. This can be found by browsing to your iPrint server at
http://<server ip address>:<port, default=631>/ipp/
each printer queue name should be listed.

Options
-P Port to use for testing, the default is 631.
-v Enable verbose output for testing, do not use this in your monitoring
software.
--version Output some version information, do not use this in your
monitoring software.

Integration
You can integrate with Icinga2 following these instructions.
1) Download the check_ipp.pl script.

2) Find the CustomPluginDir path in /etc/icinga2/constants.conf or where
your distro may have placed the config file.

3) Place the check_ipp.pl script in the CustomPluginDir directory and make
the file executable.

4) Define the service. I created a file in /etc/icinga2.conf/
contents of iprinters.conf file:
object CheckCommand "iprinters" {
import "plugin-check-command"

command = [ CustomPluginDir + "/check_iprinters.pl" ]

arguments = {
"-I" = "$address$"
"-Q" = "$iprint_queue$"
}
}

apply Service for (iPrint => config in host.vars.iprinters) {
import "generic-service"

check_command = "iprinters"

vars += config
} /* EOF iprinters.conf */

5) Define iPrint queue attributes in your host definitions.
Mine looks like this, yes the queue name is "7UP":
/* Define iPrint queue attributes for service apply rules. */
vars.iprinters["iprint 7UP"] = {
iprint_queue = "7UP"
}

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...

Tags: , , ,
Categories: Cool Tools, iPrint, Technical

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS