Plugin Error in checkcommands.cfg
Stanley Hopcroft
Stanley.Hopcroft at IPAustralia.Gov.AU
Thu May 8 04:01:00 CEST 2003
Dear Sir.
On Tue, May 06, 2003 at 06:59:02PM -0000, kleysonr wrote:
>
> In the line command the script work, but in checkcommands.cfg nagios the message "Unable to resolve destination address '-H' " an error appears when call Net::SNMP-session. Please, what the problem?
>
> check_cisco -H 10.x.x.x -c public -i Serial1/1.1
>
>
> #!/usr/bin/perl -w
>
.. snip nice oconcise readable Perl
both of us (you and I) can't see any problems with your programs option
processing.
Perhaps the mistake is in the checkcommands.cfg or services.cfg.
checkcommands.cfg defines the CLI of the program: path + switches +
option macros. It also defines a short name that is used in
services.cfg.
services.cfg defines what checks are applied to a host and implicity
defines the macro values $HOSTNAME$ $ARG1$ $ARG2$ etc used by Nagios in
the merge of the checkcommands.cfg to get the actual program to pass to
/bin/sh.
Your checkcommand.cfg should have a entry like
define command{
command_name check_cisco
command_line $USER1$/check_cisco -H $HOSTADDRESS$ -c $ARG1$
-i $ARG2$
}
and a services.cfg like
define service{
use generic-service
host_name my_beautiful_router
service_description How are the interfaces today
contact_groups network-admins
check_command check_cisco!public!Serial1/1.1
}
# /bin/sh may complain about / and .
# that is if they are not filtered by Nag ..
Yours sincerely.
--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------
'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'
from Meditation 17, J Donne.
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list