OpenNMS API 1.2.3

org.opennms.web.response
Class ResponseTimeModel

java.lang.Object
  extended byorg.opennms.web.response.ResponseTimeModel

public class ResponseTimeModel
extends java.lang.Object

Encapsulates all SNMP performance reporting for the web user interface.

Author:
Tarus Balog , Seth Leger , Lawrence Karnowski , OpenNMS

Nested Class Summary
static class ResponseTimeModel.QueryableNode
          Convenient data structure for storing nodes with RRDs available.
 
Field Summary
protected  java.lang.String infoCommand
           
static java.lang.String INTERFACE_GRAPH_TYPE
           
static java.lang.String NODE_GRAPH_TYPE
           
protected  java.util.Properties props
           
protected  PrefabGraph[] queries
           
protected  java.util.Map reportMap
           
protected  java.io.File rrdDirectory
           
static java.lang.String RRDTOOL_GRAPH_PROPERTIES_FILENAME
           
 
Constructor Summary
ResponseTimeModel(java.lang.String homeDir)
          Create a new instance.
 
Method Summary
 java.util.List getDataSourceList(int nodeId)
           
 java.util.List getDataSourceList(int nodeId, java.lang.String intf, boolean includeNodeQueries)
           
 java.util.List getDataSourceList(java.lang.String nodeId)
           
 java.util.List getDataSourceList(java.lang.String nodeId, java.lang.String intf, boolean includeNodeQueries)
           
 java.lang.String[] getDataSources(int nodeId)
           
 java.lang.String[] getDataSources(int nodeId, java.lang.String intf, boolean includeNodeQueries)
           
 java.lang.String[] getDataSources(java.lang.String nodeId)
           
 java.lang.String[] getDataSources(java.lang.String nodeId, java.lang.String intf, boolean includeNodeQueries)
           
 java.lang.String getHumanReadableNameForIfLabel(int nodeId, java.lang.String ifLabel)
          Return a human-readable description (usually an IP address or hostname) for the interface given.
 PrefabGraph[] getQueries()
          Return a list of all known prefabricated graph definitions.
 PrefabGraph[] getQueries(int nodeId)
           
 PrefabGraph[] getQueries(int nodeId, java.lang.String intf, boolean includeNodeQueries)
           
 PrefabGraph[] getQueries(java.lang.String nodeId)
           
 PrefabGraph[] getQueries(java.lang.String nodeId, java.lang.String intf, boolean includeNodeQueries)
           
 PrefabGraph getQuery(java.lang.String queryName)
           
 java.util.ArrayList getQueryableInterfacesForNode(int nodeId)
           
 java.util.ArrayList getQueryableInterfacesForNode(java.lang.String nodeId)
           
 ResponseTimeModel.QueryableNode[] getQueryableNodes()
          Returns a list of data structures representing the nodes that have SNMP performance data collected.
 java.io.File getRrdDirectory()
           
 boolean isQueryableInterface(java.lang.String ipAddr)
           
 boolean isQueryableNode(int nodeId)
           
 boolean isQueryableNode(java.lang.String nodeId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RRDTOOL_GRAPH_PROPERTIES_FILENAME

public static final java.lang.String RRDTOOL_GRAPH_PROPERTIES_FILENAME
See Also:
Constant Field Values

INTERFACE_GRAPH_TYPE

public static final java.lang.String INTERFACE_GRAPH_TYPE
See Also:
Constant Field Values

NODE_GRAPH_TYPE

public static final java.lang.String NODE_GRAPH_TYPE
See Also:
Constant Field Values

props

protected java.util.Properties props

queries

protected PrefabGraph[] queries

reportMap

protected java.util.Map reportMap

rrdDirectory

protected java.io.File rrdDirectory

infoCommand

protected java.lang.String infoCommand
Constructor Detail

ResponseTimeModel

public ResponseTimeModel(java.lang.String homeDir)
                  throws java.io.IOException
Create a new instance.

Parameters:
homeDir - the OpenNMS home directory, see Vault.getHomeDir.
Method Detail

getRrdDirectory

public java.io.File getRrdDirectory()

getQuery

public PrefabGraph getQuery(java.lang.String queryName)

getQueries

public PrefabGraph[] getQueries()
Return a list of all known prefabricated graph definitions.


getQueries

public PrefabGraph[] getQueries(int nodeId)

getQueries

public PrefabGraph[] getQueries(java.lang.String nodeId)

getQueries

public PrefabGraph[] getQueries(int nodeId,
                                java.lang.String intf,
                                boolean includeNodeQueries)

getQueries

public PrefabGraph[] getQueries(java.lang.String nodeId,
                                java.lang.String intf,
                                boolean includeNodeQueries)

getDataSources

public java.lang.String[] getDataSources(int nodeId)

getDataSources

public java.lang.String[] getDataSources(java.lang.String nodeId)

getDataSources

public java.lang.String[] getDataSources(int nodeId,
                                         java.lang.String intf,
                                         boolean includeNodeQueries)

getDataSources

public java.lang.String[] getDataSources(java.lang.String nodeId,
                                         java.lang.String intf,
                                         boolean includeNodeQueries)

getDataSourceList

public java.util.List getDataSourceList(int nodeId)

getDataSourceList

public java.util.List getDataSourceList(java.lang.String nodeId)

getDataSourceList

public java.util.List getDataSourceList(int nodeId,
                                        java.lang.String intf,
                                        boolean includeNodeQueries)

getDataSourceList

public java.util.List getDataSourceList(java.lang.String nodeId,
                                        java.lang.String intf,
                                        boolean includeNodeQueries)

getHumanReadableNameForIfLabel

public java.lang.String getHumanReadableNameForIfLabel(int nodeId,
                                                       java.lang.String ifLabel)
                                                throws java.sql.SQLException
Return a human-readable description (usually an IP address or hostname) for the interface given.

Throws:
java.sql.SQLException

getQueryableNodes

public ResponseTimeModel.QueryableNode[] getQueryableNodes()
                                                    throws java.sql.SQLException
Returns a list of data structures representing the nodes that have SNMP performance data collected.

First the list of RRD files is collected. From those filenames, the IP address is extracted from each. A list of unique IP addresses is created, discarding the duplicates. At the same time, a mapping of unique IP address to RRD files is created. Then a database call is made to determine the node identifier and human-readable label for each node containing the IP addresses. From that list, an array of data structures, QueryableNodes, are created.

Throws:
java.sql.SQLException

getQueryableInterfacesForNode

public java.util.ArrayList getQueryableInterfacesForNode(int nodeId)
                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

getQueryableInterfacesForNode

public java.util.ArrayList getQueryableInterfacesForNode(java.lang.String nodeId)
                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

isQueryableNode

public boolean isQueryableNode(int nodeId)
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

isQueryableNode

public boolean isQueryableNode(java.lang.String nodeId)
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

isQueryableInterface

public boolean isQueryableInterface(java.lang.String ipAddr)

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.