[Nagiosplug-devel] [ nagiosplug-Bugs-1070929 ] hpjdres
SourceForge.net
noreply at sourceforge.net
Fri May 18 11:28:37 CEST 2007
Bugs item #1070929, was opened at 2004-11-22 12:17
Message generated for change (Comment added) made by psychotrahe
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1070929&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: SupaFly (amincheneau)
Assigned to: Ton Voon (tonvoon)
Summary: hpjdres
Initial Comment:
Hi I have the error message "No output" in Nagios GUI.
The plugin works in command line with root or nagios
users.
The rights on it are -rwxr-xr-x 1 nagios nagios.
my checkcommands.cfg
define command {
command_name check_hpjdres
command_line $USER1$/check_hpjdres -k 1
-H $HOSTADDRESS$
my services.cfg:
Define service{
host_name FR40
service_description check_hpjdres
check_command toner_black
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
check_period 24x7
notification_interval 0
notification_period 24x7
notification_options w,u,c,r
contact_groups admins
}
----------------------------------------------------------------------
>Comment By: Matthias Eble (psychotrahe)
Date: 2007-05-18 11:28
Message:
Logged In: YES
user_id=1694341
Originator: NO
Hi SupaFly,
a long time has gone since the last post.
Have you tried check_snmp_printer from the contrib directory?
I'm going to close this item, since hp_jdres is not maintained by the
plugin team and
because this doesn't look like a general problem.
Regards
Matthias
----------------------------------------------------------------------
Comment By: Stanley Hopcroft (stanleyhopcroft)
Date: 2004-12-01 07:19
Message:
Logged In: YES
user_id=395628
Dear aimincheneau,
The plugin works fine both from the CLI and also a test Nag
(a 1.0) but that shouldn't be relevant -
(%../bin/nagios -m
Nagios 1.0
Copyright (c) 1999-2002 Ethan Galstad (nagios at nagios.org)
Last Modified: 11-24-2002
License: GPL
External Data I/O
-----------------
Object Data: TEMPLATE
Status Data: DEFAULT
Retention Data: DEFAULT
Comment Data: DEFAULT
Downtime Data: DEFAULT
Performance Data: DEFAULT
Options
-------
* Embedded Perl compiler (With caching)
).
Here are the test nag results
tsitc> more status.log
# Nagios 1.0 Status File
[1101880675]
PROGRAM;1101880570;87996;0;1101880640;0;1;1;1;1;0;0;1;0
[1101880675]
HOST;asterix;PENDING;0;0;0;0;0;0;0;0;1;1;1;1;0;0.0;0;1;1;(Not
enough data to determine host status yet)
[1101880675]
HOST;oradev;UP;1074256506;1074256200;0;27624370;0;0;0;0;1;1;1;1;0;0.00;0;1;1;PING
ok - Packet loss = 0%, RTA = 0.41 ms
[1101880675]
HOST;ta27;UP;1101880640;1101880630;0;0;0;0;0;0;1;1;1;1;0;0.00;0;1;1;PING
ok - Packet loss = 0%, RTA = 1.73 ms
[1101880675] SERVICE;ta27;Troublesome
check_hpjdres;CRITICAL;1/3;SOFT;1101880630;1101880690;ACTIVE;1;1;1;1101880640;0;OK;0;0;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;CRITICA
L: Toner Cartridge HP C4127X: 2.82608695652174 %
tsitc> more status.log
# Nagios 1.0 Status File
[1101880810]
PROGRAM;1101880570;87996;0;1101880810;0;1;1;1;1;0;0;1;0
[1101880810]
HOST;asterix;PENDING;0;0;0;0;0;0;0;0;1;1;1;1;0;0.0;0;1;1;(Not
enough data to determine host status yet)
[1101880810]
HOST;oradev;UP;1074256506;1074256200;0;27624370;0;0;0;0;1;1;1;1;0;0.00;0;1;1;PING
ok - Packet loss = 0%, RTA = 0.41 ms
[1101880810]
HOST;ta27;UP;1101880760;1101880630;0;0;0;0;0;0;1;1;1;1;0;0.00;0;1;1;PING
ok - Packet loss = 0%, RTA = 1.70 ms
[1101880810] SERVICE;ta27;Troublesome
check_hpjdres;CRITICAL;3/3;HARD;1101880750;1101880810;ACTIVE;1;1;1;1101880760;0;CRITICAL;120;0;0;0;1101880760;1;1;0;0;1;0;0.0
0;0;1;1;1;CRITICAL: Toner Cartridge HP C4127X:
2.82608695652174 %
tsitc> more status.log
# Nagios 1.0 Status File
[1101880870]
PROGRAM;1101880570;87996;0;1101880870;0;1;1;1;1;0;0;1;0
[1101880870]
HOST;asterix;PENDING;0;0;0;0;0;0;0;0;1;1;1;1;0;0.0;0;1;1;(Not
enough data to determine host status yet)
[1101880870]
HOST;oradev;UP;1074256506;1074256200;0;27624370;0;0;0;0;1;1;1;1;0;0.00;0;1;1;PING
ok - Packet loss = 0%, RTA = 0.41 ms
[1101880870]
HOST;ta27;UP;1101880820;1101880630;0;0;0;0;0;0;1;1;1;1;0;0.00;0;1;1;PING
ok - Packet loss = 0%, RTA = 1.76 ms
[1101880870] SERVICE;ta27;Troublesome
check_hpjdres;CRITICAL;3/3;HARD;1101880810;1101880870;ACTIVE;1;1;1;1101880760;0;CRITICAL;120;0;0;0;1101880760;1;1;0;0;1;0;0.0
0;0;1;1;1;CRITICAL: Toner Cartridge HP C4127X:
2.82608695652174 %
tsitc>
>From the CLItsitc> ../libexec/check_hpjdres -H ta27 -k 1
CRITICAL: Toner Cartridge HP C4127X: 2.82608695652174 %
tsitc>
so it works the same as in Nagios.
I found I had to slighlt butcher the plugin to get it to
work with perl5.005_03/Net::SMP v3, but if you got it woirk
from the CLI that is not your problem.
At this point, I am at a loss for helpful remarks
tsitc> ../libexec/check_hpjdres -V
check_hpjdres (nagios-plugins 1.4.0alpha1) 1.0
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may
redistribute
copies of the plugins under the terms of the GNU General
Public License.
For more information about these matters, see the file named
COPYING.
tsitc>
Here's my checkcommand entry
# 'check_hpjdres' command definition
define command{
command_name check_hpjdres
command_line $USER1$/check_hpjdres -H
$HOSTADDRESS$ -k 1
}
%
It's the same as yours.
What version of Net::SNMP do you use ?
----------------------------------------------------------------------
Comment By: SupaFly (amincheneau)
Date: 2004-11-29 12:49
Message:
Logged In: YES
user_id=1133930
Hi stanley and thank you to help me!
I'm not sure to understand what you did!
The plugin works for me just in command line, does it work for
you in nagios or in command line?
Regards
----------------------------------------------------------------------
Comment By: Stanley Hopcroft (stanleyhopcroft)
Date: 2004-11-26 09:49
Message:
Logged In: YES
user_id=395628
Dear aimincheneau,
Plugin should be comitted (like me) RSN to /contrib.
The plugin seems to work Ok for me.
eg from the CLI
pc09011> ./check_hpjdres -H ta27 -k 1
WARNING: Toner Cartridge HP C4127X: 14.3478260869565 %
pc09011> ./check_hpjdres -H ta28 -k 1
CRITICAL: Toner Cartridge HP C4127X: 0 %
pc09011> ./check_hpjdres -H ta29 -k 1
UNKNOWN: Unable to resolve destination UDP/IPv4 address
'ta29'pc09011>
pc09011> ./check_hpjdres -H print001 -k 1
UNKNOWN: Unable to resolve destination UDP/IPv4 address
'print001'pc09011>
pc09011> ./check_hpjdres -H n001 -k 1
CRITICAL: Toner Cartridge HP C4127X: 0 %
With an embedded Perl Nagios simulator it also seems to work.
pc09011> ./test_epn_arg1.pl check_hpjdres -H ta28 -k 1
(2, 'CRITICAL: Toner Cartridge HP C4127X: 0 %').
pc09011> ./test_epn_arg1.pl check_hpjdres -H ta27 -k 1
(1, 'WARNING: Toner Cartridge HP C4127X: 14.3478260869565 %').
pc09011>
Give it a crack noting that
1 if you use embedded Perl Nagios at the present release
level - you get NO FEEDBACK if the plugin raises a runtime
exception.
This is being addressed (in both versions of Nag 1.x and 2.x).
If you use embedded Perl please write something positive
about it. I use it and I LIKE it but then again I am biased.
Give iit a shot.
Yours sincerely.
----------------------------------------------------------------------
Comment By: SupaFly (amincheneau)
Date: 2004-11-24 13:57
Message:
Logged In: YES
user_id=1133930
You're fully apologized!
I send you the link to download check_hpjdres:
http://sourceforge.net/tracker/download.php?
group_id=29880&atid=541465&file_id=44083&aid=692207
You need to install the net::snmp module to make workt it!
http://search.cpan.org/CPAN/authors/id/D/DT/DTOWN/Net-
SNMP-5.0.1.tar.gz
But to test this plugin you need to have a hp or Xerox network
printer, it gives you the state of your toners.
when you type ./check_hpjdres -k 1 -H "address of your
printer"
"-k 1" it's for black toner, you can change the value by 2,3,4 if
you have a color printer and more for Xerox.
Regards.
----------------------------------------------------------------------
Comment By: Stanley Hopcroft (stanleyhopcroft)
Date: 2004-11-24 12:51
Message:
Logged In: YES
user_id=395628
Dear aimincheneau,
Sorry for the stupid answer; oh dear !
As for check_hpjdres, there doesn't seem to be a plugin
named check_hpjdres in the 1.4alpha distro (I am working
from the CVS but the tar-ball should be the same).
I am sorry to be speaking with all the grace and intellect
of a donkey, but I am confused.
pc09011> pwd
/usr/home/anwsmh/build/nagios-plugins_HEAD/nagiosplug
pc09011> find . -name 'check_hp*' -ls
1865383 16 -rwxr-xr-x 1 anwsmh anwsmh
7502 Nov 23 17:25 ./contrib/check_hprsc.pl
1896751 2 -rw-r--r-- 1 anwsmh anwsmh
637 Nov 23 17:25 ./plugins/t/check_hpjd.t
1896776 22 -rw-r--r-- 1 anwsmh anwsmh
10356 Nov 23 17:25 ./plugins/check_hpjd.c
1896823 2 -rw-r--r-- 1 anwsmh anwsmh
96 Nov 23 17:25 ./plugins/tests/check_hpjd
1904794 6 -rw-r--r-- 1 anwsmh anwsmh
2199 Nov 23 19:09 ./plugins/.deps/check_hpjd.Po
1897436 62 -rw-r--r-- 1 anwsmh anwsmh
30844 Nov 23 19:09 ./plugins/check_hpjd.o
1897437 336 -rwxr-xr-x 1 anwsmh anwsmh
157162 Nov 23 19:09 ./plugins/check_hpjd
pc09011>
Could you tell me about this plugin - or send me a copy,
and I'll put it back where it belongs ?
With regret,
----------------------------------------------------------------------
Comment By: SupaFly (amincheneau)
Date: 2004-11-24 12:13
Message:
Logged In: YES
user_id=1133930
Thanks for your answer stanley, I have a problem with
check_hpjdres plugin and not with check_hpjd (which is
working fine).
----------------------------------------------------------------------
Comment By: Stanley Hopcroft (stanleyhopcroft)
Date: 2004-11-24 04:10
Message:
Logged In: YES
user_id=395628
Dear aimincheneau,
The latest plugin versions do _not_ have a k option (-k in
your command_line).
pc09011> ./check_hpjd -h
check_hpjd (nagios-plugins 1.4.0alpha2) 1.18
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may
redistribute
copies of the plugins under the terms of the GNU General
Public License.
For more information about these matters, see the file named
COPYING.
Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>
Copyright (c) 2000-2003 Nagios Plugin Development Team
<nagiosplug-devel at lists.sourceforge.net>
This plugin tests the STATUS of an HP printer with a
JetDirect card.
Net-snmp must be installed on the computer running the plugin.
Usage: check_hpjd -H host [-C community]
check_hpjd (-h | --help) for detailed help
check_hpjd (-V | --version) for version information
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-C, --community=STRING
The SNMP community name (default=public)
Send email to nagios-users at lists.sourceforge.net if you have
questions
regarding use of this software. To submit patches or suggest
improvements,
send email to nagiosplug-devel at lists.sourceforge.net
pc09011> ./check_hpjd -H ta27
Printer ok - (STRING: "PROCESSING JOB.FROM TRAY 3")
pc09011> ./check_hpjd -H ta27 -k 1
./check_hpjd: invalid option -- k
Invalid argument
Usage: check_hpjd -H host [-C community]
check_hpjd (-h | --help) for detailed help
check_hpjd (-V | --version) for version information
pc09011>
Could this be a mistake in your command_line ?
----------------------------------------------------------------------
Comment By: Ton Voon (tonvoon)
Date: 2004-11-24 01:59
Message:
Logged In: YES
user_id=664364
Moving to Bugs tracker as Support Requests will be closed.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1070929&group_id=29880
More information about the Devel
mailing list