hotsanic |
Subversion Repositories: |
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;