Plugin Error in checkcommands.cfg
kleysonr
kleysonr at hotmail.com
Tue May 6 20:59:02 CEST 2003
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
use strict;
use Net::SNMP qw( snmp_event_loop );
use vars qw($host $interface $community);
use Getopt::Long;
Getopt::Long::Configure('bundling');
GetOptions
("H=s" => $host, "i=s" => $interface, "c=s" => $community);
my $session;
my $error;
( $session, $error ) = Net::SNMP->session(
-hostname => shift || $host,
-community => shift || $community,
-port => shift || $port
);
if( ! defined( $session ) ) {
print "Error: $errorn";
exit 1;
}
-------------------------------------------------------
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