Page 2 of 3

Re: Printer Maintenance Checker

Posted: Tue Apr 21, 2015 11:49 am
by gzarif
Way above my head, no idea what you said!

Any step by step instructions?

Re: Printer Maintenance Checker

Posted: Tue Apr 21, 2015 12:06 pm
by jdalrymple
Your check_print_toner command is accepting 3 arguments:

1) hostname/IP address
2) community string
3) an index/offset

In the examples above (on the prior page rather) I have to define six separate services for the Dell and 2 separate services for the Lexmark, each with a different 3rd argument. So in order to monitor both printers I'll have 8 separate services defined.

Can you post a screenshot of that command we defined and also of one of your services? I'll explain how to modify either/both to suit your needs. Like I mentioned also, you might find it handy to get used to running this from the command line so that you can quickly identify how many indexes each printer provides.

Helpful?

Re: Printer Maintenance Checker

Posted: Tue Apr 21, 2015 1:35 pm
by gzarif
I have attached the check_print_toner and Command Management

Anything else you need?

Re: Printer Maintenance Checker

Posted: Tue Apr 21, 2015 1:45 pm
by jdalrymple
Cool - see attached 2 screenshots and let me know if they don't make sense to you. In order for them to make total sense reference the output from the commands I ran earlier:

Code: Select all

[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.10 1
Black Toner = 20.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.10 2
Maintenance Kit = 86.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 1
Cyan Cartridge = 60.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 2
Magenta Cartridge = 60.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 3
Yellow Cartridge = 60.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 4
Black Cartridge = 100.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 5
Fuser = 60.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 6
Belt Unit = 60.00%
As mentioned, you'll be creating multiple services for each printer.

Re: Printer Maintenance Checker

Posted: Wed Apr 22, 2015 10:29 am
by gzarif
I tried it and I'm getting an error when applying configuration

see screenshots.

Am i creating it in the wrong place?

Re: Printer Maintenance Checker

Posted: Wed Apr 22, 2015 10:37 am
by jdalrymple
Best when you're creating new services to copy existing ones.

A lot of parameters are required, such as max_check_attempts. If you copy an existing service you'll know that all those settings are there, just pick one somewhat similar in nature to the one you're creating (same host preferably, etc)

When you look at other hosts you'll ask yourself how they work even though they don't have information in the required fields - it's because they come down from templates.

Re: Printer Maintenance Checker

Posted: Wed Apr 22, 2015 10:50 am
by gzarif
What i did now is copy the toner check

the changes i made was the Description and the $ARG2$ from 1 to 2

When i did that, on the HP printer it seemed to give the wrong information, for both the printer toner and mantenance kit

Re: Printer Maintenance Checker

Posted: Wed Apr 22, 2015 10:58 am
by lmiltchev
When i did that, on the HP printer it seemed to give the wrong information, for both the printer toner and mantenance kit
Did you rename the "new" service after cloning it?

Go to the CCM->Services, click on the "View Text Config" actions button next to each of these two services (the diskette icon), and post the configs.

Re: Printer Maintenance Checker

Posted: Wed Apr 22, 2015 11:00 am
by jdalrymple
gzarif wrote:What i did now is copy the toner check

the changes i made was the Description and the $ARG2$ from 1 to 2
That should be right
gzarif wrote:When i did that, on the HP printer it seemed to give the wrong information, for both the printer toner and mantenance kit
One thing to keep in mind - unless there is some nice readable output we don't know what is toner, what is colored toner, what is a maintenance kit, etc. It just so happens that the printers I was testing against were very well behaved and told us what was what. I cannot promise that the service check at index 1 is toner. It could be any consumable on that device.

Understand that before I ran the commands:

Code: Select all

[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 1
Cyan Cartridge = 60.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 2
Magenta Cartridge = 60.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 3
Yellow Cartridge = 60.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 4
Black Cartridge = 100.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 5
Fuser = 60.00%
[jdalrymple@localhost ~]$ ./check_print_toner public 192.168.1.25 6
Belt Unit = 60.00%
I did not know that 1=Cyan Cartridge, 2=Magenta Cartridge, 3=Yellow, etc. These were only revealed to me AFTER the commands were ran.

So what I'm saying is that when you replaced the $ARG2$ with the number 2, It's not for certain that it's the maintenance kit that you're checking the status of.

Make sense?

Re: Printer Maintenance Checker

Posted: Wed Apr 22, 2015 11:07 am
by gzarif
I understand; I should've been more clearer.

When I put arg 1 and 2 for the Xerox the output was correct however on the HP the output is not accurate; there isn't a very big difference:

HP
Nagios Maintenance Checker: 68%
Printer GUI has: 97%

Nagios Toner Checker: 35%
Printer GUI has: 30%

Xerox
Nagios Maintenance Checker: 97%
Printer GUI has: 97%

Nagios Toner Checker: 87%
Printer GUI has: 87%

thanks