OpenNMS API 1.2.9

## org.opennms.web.performance
Class PerformanceModel

    java.lang.Object
      org.opennms.web.performance.PerformanceModel

public class PerformanceModel
extends java.lang.Object

Encapsulates all SNMP performance reporting for the web user interface.

Author:
  Seth Leger , Lawrence Karnowski , OpenNMS

Nested Class Summary
`static class` `PerformanceModel.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
`PerformanceModel(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.lang.String[]` `getQueryableInterfacesForNode(int nodeId)`
`java.lang.String[]` `getQueryableInterfacesForNode(java.lang.String nodeId)`
`PerformanceModel.QueryableNode[]` `getQueryableNodes()` Returns a list of data structures representing the nodes that have SNMP performance data collected.
`java.io.File` `getRrdDirectory()`
`boolean` `isQueryableInterface(int nodeId, java.lang.String ifLabel)`
`boolean` `isQueryableInterface(java.lang.String nodeId, java.lang.String ifLabel)`
`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

### PerformanceModel

    public PerformanceModel(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 PerformanceModel.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, `QueryableNode`s, are created.

  Throws:
    `java.sql.SQLException`

### getQueryableInterfacesForNode

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

### getQueryableInterfacesForNode

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

### isQueryableNode

    public boolean isQueryableNode(int nodeId)

### isQueryableNode

    public boolean isQueryableNode(java.lang.String nodeId)

### isQueryableInterface

    public boolean isQueryableInterface(int nodeId,
                                        java.lang.String ifLabel)

### isQueryableInterface

    public boolean isQueryableInterface(java.lang.String nodeId,
                                        java.lang.String ifLabel)

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.