[Nagiosplug-devel] [ nagiosplug-New Plugins-1070929 ] hpjdres
SourceForge.net
noreply at sourceforge.net
Mon Nov 29 03:50:05 CET 2004
New Plugins item #1070929, was opened at 2004-11-22 12:17
Message generated for change (Comment added) made by amincheneau
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=541465&aid=1070929&group_id=29880
Category: None
Group: None
>Status: Open
Resolution: None
Priority: 5
Submitted By: SupaFly (amincheneau)
Assigned to: Stanley Hopcroft (stanleyhopcroft)
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: 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=541465&aid=1070929&group_id=29880
More information about the Devel
mailing list