NAME

perfSONAR_PS::Collectors::LinkStatus::Agent::SNMP - This module provides an agent for the Link Status Collector that gets status information for a link by asking an SNMP server.

DESCRIPTION

This agent will query the SNMP service and return the estimated time on the SNMP server, along with the status of the given interface. The actual structure of the agent is split into two pieces (stored in one file for clarity). There's an element whose sole purpose is to grab all the SNMP stats from a given host and cache them. This is described at the bottom of the file. Then, there is a higher-level agent, whose sole purpose is to get a single data point for a single ifIndex. The caching object is meant to be shared among all the agents so that it does not clutter the SNMP server with numerous calls each time status information is grabbed. While users can get the caching element for a given agent, they should not interact with it directly.

API

new ($package, $status_type, $hostname, $ifIndex, $version, $community, $oid, $agent) This function instantiates a new SNMP Agent for grabbing the ifIndex/oid off the specified host. The $agent element is an optional one that can be used to pass in an existing caching object. If unspecified, a new caching object will be created.

getType Returns the status type of this agent: admin or oper.

setType ($self, $type) Sets the status type of this agent: admin or oper.

setHostname ($self, $hostname) Sets the hostname for this agent to poll.

getHostname ($self) Returns the hostname that this agent is polling.

setifIndex ($self, $ifIndex) Sets the ifIndex that this agent returns the status of.

getifIndex ($self) Returns the ifIndex that this agent returns the status of.

setCommunity ($self, $community) Sets the community string that will be used by this agent.

getCommunity ($self) Returns the community string that will be used by this agent.

setVersion ($self, $version) Sets the snmp version string for this agent.

getVersion ($self) Returns the snmp version string for this agent.

setOID ($self, $oid) Sets the OID for this agent.

getOID ($self) Returns the OID for this agent.

setAgent ($self, $agent) Sets the caching snmp object used by this agent

getAgent ($self) Returns the caching snmp object used by this agent

run ($self) Queries the local caching object for the OID/ifIndex of interest and grabs the most recent time for the SNMP server. It then converts the result of the OID/ifIndex into a known status type and returns the time/status.

VERSION

$Id:$

AUTHOR

Aaron Brown, aaron@internet2.edu

LICENSE

You should have received a copy of the Internet2 Intellectual Property Framework along with this software. If not, see <http://www.internet2.edu/membership/ip.html>

COPYRIGHT

Copyright (c) 2004-2008, Internet2 and the University of Delaware

All rights reserved.