[BACK]Return to host2rrd CVS log [TXT][DIR] Up to [local] / nagios / check_rrd / bin

Diff for /nagios/check_rrd/bin/host2rrd between version 1.2 and 1.3

version 1.2, 2007/01/10 18:05:31 version 1.3, 2007/03/20 23:40:20
Line 1 
Line 1 
 #!/usr/bin/perl -T  #!/usr/bin/perl -T
 # $RedRiver: host2rrd,v 1.1 2007/01/10 18:01:11 andrew Exp $  # $RedRiver: host2rrd,v 1.2 2007/01/10 18:05:31 andrew Exp $
 ########################################################################  ########################################################################
 # hostalias2filename *** figures out the filename for a wireless  # hostalias2filename *** figures out the filename for a wireless
 #                        customer to pass to a script.  #                        customer to pass to a script.
Line 17 
Line 17 
   
 my $basedir = '/var/www/wstationinfo';  my $basedir = '/var/www/wstationinfo';
 my $Host;  my $Host;
   my $Host_Suffix = '';
 my $RRD;  my $RRD;
   
 #Option checking  #Option checking
 my $status = GetOptions(  my $status = GetOptions(
         "host|H=s"      => \$Host,      "host|H=s"   => \$Host,
         "rrd|r=s"       => \$RRD,      "suffix|S=s" => \$Host_Suffix,
       "rrd|r=s"    => \$RRD,
       "path|p=s"   => \$basedir,
 );  );
   
   
 die "No host passes!" unless $Host;  die "No host passes!" unless $Host;
 die "No RRD passed!"  unless $RRD;  die "No RRD passed!"  unless $RRD;
   
   
 my ($server, $client) = split /-/, $Host, 2;  my ($server, $client) = split /-/, $Host, 2;
   
 my $filename = $basedir . '/' . $server . '/' . $Host. '-' . $RRD . '.rrd';  my $filename = $basedir . '/' . $Host . $Host_Suffix . $RRD . '.rrd';
   
   if ($client) {
       $filename = $basedir . '/' . $server . '/' . $Host . $Host_Suffix .
           '-' . $RRD . '.rrd';
   }
   
 print $filename, "\n";  print $filename, "\n";

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>