Printer Maintenance Checker

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
gzarif
Posts: 38
Joined: Thu Mar 26, 2015 9:44 am

Re: Printer Maintenance Checker

Post by gzarif »

Way above my head, no idea what you said!

Any step by step instructions?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Printer Maintenance Checker

Post 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?
gzarif
Posts: 38
Joined: Thu Mar 26, 2015 9:44 am

Re: Printer Maintenance Checker

Post by gzarif »

I have attached the check_print_toner and Command Management

Anything else you need?
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Printer Maintenance Checker

Post 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.
You do not have the required permissions to view the files attached to this post.
gzarif
Posts: 38
Joined: Thu Mar 26, 2015 9:44 am

Re: Printer Maintenance Checker

Post by gzarif »

I tried it and I'm getting an error when applying configuration

see screenshots.

Am i creating it in the wrong place?
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Printer Maintenance Checker

Post 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.
gzarif
Posts: 38
Joined: Thu Mar 26, 2015 9:44 am

Re: Printer Maintenance Checker

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Printer Maintenance Checker

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Printer Maintenance Checker

Post 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?
gzarif
Posts: 38
Joined: Thu Mar 26, 2015 9:44 am

Re: Printer Maintenance Checker

Post 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
Locked