Title: [opsview] [5349] Correct protocol option in template
- Revision
- 5349
- Author
- dferguson
- Date
- 2010-11-12 13:54:56 +0000 (Fri, 12 Nov 2010)
Log Message
Correct protocol option in template
Modified Paths
Modified: trunk/opsview-core/nagios-plugins/check_snmp_template
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_template 2010-11-10 14:52:08 UTC (rev 5348)
+++ trunk/opsview-core/nagios-plugins/check_snmp_template 2010-11-12 13:54:56 UTC (rev 5349)
@@ -42,7 +42,7 @@
my $VERSION = "0.01";
my $np = Nagios::Plugin->new(
- usage => "Usage: %s [-v] [-h] -H <hostname> [ -v <version> ] [-C <community>]\n Check for '$check'",
+ usage => "Usage: %s [-v] [-h] -H <hostname> [ -P <protocol> ] [-C <community>]\n Check for '$check'",
shortname => "STATUS",
license => "Copyright (C) 2003-2010 Opsera Limited. All rights reserved",
version => $VERSION,
@@ -67,8 +67,8 @@
);
$np->add_arg(
- spec => "version|v=s",
- help => "--version, -v <version>\n SNMP version, either 1 or 2c (default 1)",
+ spec => "protocol|P=s",
+ help => "--protocol, -P <protocol>\n SNMP protocol, either 1 or 2c (default 1)",
default => "1",
);
@@ -83,7 +83,7 @@
my ( $session, $error ) = Net::SNMP->session(
-community => $community,
-hostname => $np->opts->hostname,
- -version => $np->opts->version,
+ -version => $np->opts->protocol,
-timeout => $np->opts->timeout - 1 || 1,
-port => $np->opts->port,
);
_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins