SNMPvalue - Holds a tidbit of numerical SNMP information
use DBI;
use SNMPvalue;
my $dbh = DBI->connect(...);
my $ifInErrors = new SNMPvalue( dbHandle=>$dbh, oid=>$oid, interface=>$routerIf, timestamp=>$TS, $value=>$SNMPdata );
or
my $ifInErrors = new SNMPvalue( dbHandle=>$dbh, oid=>$oid, interface=>$routerIf );
print $ifInErrors->value;
print $ifInErrors->timestamp;
SNMPvalue holds an entry in the SNMP Database (RRD and PostgreSQL). This data can only be a numerical SNMP data, preferably a floating point. It can also be used to save a new data into the database.
new() - SNMPvalue constructor
dbHandle - handle for a database connection
oid - short name for an MIB Object ID, e.g. ifInOctets
interface - foreign key (integer) of the interface to which this SNMP value is related
value* - SNMP value
timestamp* - time when this value was taken
* - must always be declared together, or not at all
value() - returns the SNMP value of this OID
timestamp() - returns the timestamp of the value for this OID
SNMPvalue is supported as part of the core Pawikan distribution. Please send bug reports to <netapps@pregi.net> or use the bugzilla.
Jerremeo Raynier Gabás <ren@asti.dost.gov.ph>
Copyright (c) 2004 Philippine Research, Education and Government Information Network. All rights reserved. This program is part of the Pawikan Distribution; you can redistribute it and/or modify it under the same terms as Pawikan itself.