jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [sensors/] [platform/] [common.pm] - Rev 17 Go to most recent revision

Compare with Previous - Blame - Download


package HotSaNICmod::common;

sub version {
  ($VERSION = '$Revision: 1.4 $') =~ s/.*(\d+\.\d+).*/$1/;
  return "common.pm $VERSION";
  }      

sub configure {
  return HotSaNICparser::get_moduleconfig(".",(SENSOR=>"array"));
  }

sub get_names {
  my $entry=shift || ",";
  my $host="";
  my $community="";

  my ($item,$dbname,$description,$num,$scalefactor,$add,$unit,$min,$max)=split /,/,$entry;
  if (! defined $method) { $method=""; }
  if( index($item, "SNMP:") >= 0) { (undef,$host,$community,$item) = split /:/, $item; }
  if ($host ne "") { $name="$host:$dbname"; }
  else { $name="$dbname"; }
  $file=$dbname;

  return ($host,$community,$item,$dbname,$name,$file,$description,$num,$scalefactor,$add,$unit,$min,$max);
  }
1;


Powered by WebSVN 2.2.1