Title: [opsview] [11541] Don't use host address, hostname is already it!
Revision
11541
Author
pknight
Date
2013-02-20 10:21:01 +0000 (Wed, 20 Feb 2013)

Log Message

Don't use host address, hostname is already it!

Modified Paths


Modified: trunk/opsview-core/nagios-plugins/check_snmp_uptime
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_uptime	2013-02-20 10:04:29 UTC (rev 11540)
+++ trunk/opsview-core/nagios-plugins/check_snmp_uptime	2013-02-20 10:21:01 UTC (rev 11541)
@@ -49,12 +49,6 @@
     'default' => ''
 );
 
-$np->add_arg(
-    'spec' => 'hostaddress|A=s',
-    'help' => "-A, --hostaddress HOST ADDRESS\n   Actual host address to check",
-    'default' => ''
-);
-
 $np->getopts;
 
 my $oid_sysDescr =
@@ -83,17 +77,11 @@
 }
 
 if ( $np->opts->cascade ) {
-    if ( not $np->opts->hostaddress ) {
-        $returnstring = "Host address required";
-        $status       = 1;
-    }
-    elsif ( $prev_uptime > $timeticks ) {
+    if ( $prev_uptime > $timeticks ) {
         require Opsview::Externalcommand;
         my $cmd = Opsview::Externalcommand->new(
             command => 'PROCESS_SERVICE_CHECK_RESULT',
-            args    => join(
-                ';', $np->opts->hostaddress, 'Uptime', '1', 'Uptime reset'
-            ),
+            args    => join( ';', $hostname, 'Uptime', '1', 'Uptime reset' ),
         );
         $cmd->send_to_master;
     }

_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to