Page 1 of 1

Adding many printers as services under one host

Posted: Tue Mar 26, 2013 5:29 am
by stebbo
Hi All,

I'd like to add the ability to monitor a ping of multiple (about a dozen) differnet network printers under one "HOST". Rather than having a separate host for each printer, I'd like to just be able to ping all my separate printers (each with their own ip address) as a separate service under the one host. I currently monitor a number of services on the printer server and would like to add the printers as extra services under that host.

I have tried to do this by adding a service with the same config name, and added to the host of the printer server. Unfortunately, each of the ping commands seems to automatically include the -H $Hostname argument and I am assuming that this would ping the host (the printer server) and not the ip address of the actual printer. I was hoping I could use a check_ping $ARG1 and use $ARG1 as the ip address of the actual printer.

Is there some other way I can achieve what I'm trying to do?

Cheers,
Chris.

Re: Adding many printers as services under one host

Posted: Tue Mar 26, 2013 9:10 am
by slansing
For this, you could create a new command definition like shown in image2.jpg "attached."
Image2.jpg
And then create a service under the desired host, and using this new command you can ping an IP, and set it's Round Trip Average integer, and Packet Loss percentage, see image1.jpg "attached."
Image1.jpg
Here is the standard check_ping usage listing:

Code: Select all

Usage:check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
 [-p packets] [-t timeout] [-4|-6]

Re: Adding many printers as services under one host

Posted: Tue Mar 26, 2013 4:12 pm
by stebbo
Thanks, I'll give this a try.

Re: Adding many printers as services under one host

Posted: Tue Mar 26, 2013 4:17 pm
by sreinhardt
Great let us know if you have issues!

Re: Adding many printers as services under one host

Posted: Wed Mar 27, 2013 11:28 pm
by stebbo
Hi All,

this worked well. I had to include the generic_service template when defining the service but other than that I have this working nicely now.

Thanks for the tip.

Cheers,
Chris.