OpenNMS API 1.2.9

## org.opennms.netmgt.poller.monitors
Class RadiusAuthMonitor

    java.lang.Object
      org.opennms.netmgt.poller.monitors.IPv4LatencyMonitor
          org.opennms.netmgt.poller.monitors.RadiusAuthMonitor

All Implemented Interfaces:
  ServiceMonitor

public final class RadiusAuthMonitor
extends IPv4LatencyMonitor

This Monitor is used to poll hosts supporting Radius Authentication. This is done by sending a radius auth packet to the host. If a valid radius ACCEPT response is received. then the Radius service is considered available.

Author:
  Jonathan Sartin, OpenNMS

Field Summary
`static int` `DEFAULT_ACCT_PORT` Default radius accounting port
`static int` `DEFAULT_AUTH_PORT` Default radius authentication port
`static java.lang.String` `DEFAULT_AUTH_TYPE` Default radius authentication type
`static java.lang.String` `DEFAULT_PASSWORD` Default pasword
`static int` `DEFAULT_RETRY` Default number of times to retry a test
`static java.lang.String` `DEFAULT_SECRET` Default secret
`static int` `DEFAULT_TIMEOUT` Number of miliseconds to wait before timing out a radius AUTH request
`static java.lang.String` `DEFAULT_USER` Default user

Fields inherited from class org.opennms.netmgt.poller.monitors.IPv4LatencyMonitor
`DS_NAME`

Fields inherited from interface org.opennms.netmgt.poller.monitors.ServiceMonitor
`SERVICE_AVAILABLE, SERVICE_STATUS_MASK, SERVICE_UNAVAILABLE, SERVICE_UNKNOWN, SERVICE_UNRESPONSIVE, SURPRESS_EVENT_MASK`

Constructor Summary
`RadiusAuthMonitor()` Class constructor.

Method Summary
`private static byte[]` `chapEncrypt(java.lang.String plainText, byte[] chapChallenge, net.sourceforge.jradiusclient.util.ChapUtil chapUtil)` Encrypt password using chap challenge
`int` `poll(NetworkInterface iface, java.util.Map parameters, Package pkg)` Radius Authentication Poller Note that the poller will return SERVICE_AVAILABLE only if the authentication Request actually succeeds.

Methods inherited from class org.opennms.netmgt.poller.monitors.IPv4LatencyMonitor
`createRRD, initialize, initialize, release, release, updateRRD`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_TIMEOUT

    public static final int DEFAULT_TIMEOUT

  Number of miliseconds to wait before timing out a radius AUTH request

  See Also:
    Constant Field Values

### DEFAULT_RETRY

    public static final int DEFAULT_RETRY

  Default number of times to retry a test

  See Also:
    Constant Field Values

### DEFAULT_AUTH_PORT

    public static final int DEFAULT_AUTH_PORT

  Default radius authentication port

  See Also:
    Constant Field Values

### DEFAULT_ACCT_PORT

    public static final int DEFAULT_ACCT_PORT

  Default radius accounting port

  See Also:
    Constant Field Values

### DEFAULT_AUTH_TYPE

    public static final java.lang.String DEFAULT_AUTH_TYPE

  Default radius authentication type

  See Also:
    Constant Field Values

### DEFAULT_USER

    public static final java.lang.String DEFAULT_USER

  Default user

  See Also:
    Constant Field Values

### DEFAULT_PASSWORD

    public static final java.lang.String DEFAULT_PASSWORD

  Default pasword

  See Also:
    Constant Field Values

### DEFAULT_SECRET

    public static final java.lang.String DEFAULT_SECRET

  Default secret

  See Also:
    Constant Field Values

Constructor Detail

### RadiusAuthMonitor

    public RadiusAuthMonitor()
                      throws java.lang.ClassNotFoundException,
                             java.lang.InstantiationException,
                             java.lang.IllegalAccessException

  Class constructor.

Method Detail

### poll

    public int poll(NetworkInterface iface,
                    java.util.Map parameters,
                    Package pkg)

  Radius Authentication Poller Note that the poller will return SERVICE_AVAILABLE only if the authentication Request actually succeeds. A failed authentication request will result in SERVICE_UNAVILABLE, although the radius server may actually be up.

  Parameters:
    `iface` - The interface to poll
    `parameters` - Parameters to pass when polling the interface Currently recognized Map keys:
    - user - Radius user
    - password - Radius password
    - secret - Radius shared secret
    - port - Radius auth port
    - timeout - Number of miliseconds to wait before sending a timeout
    - authtype - authentication type to use (pap or chap)
    - authport - port to poll for radius authentication
    - acctport - radius accounting port - used by
  Returns:
    int An status code that shows the status of the service
  See Also:
    `org.opennms.netmgt.poller.ServiceMonitor#SURPRESS_EVENT_MASK`, `org.opennms.netmgt.poller.ServiceMonitor#SERVICE_AVAILABLE`, `org.opennms.netmgt.poller.ServiceMonitor#SERVICE_UNAVAILABLE`, `org.opennms.netmgt.poller.ServiceMonitor#SERVICE_UNRESPONSIVE`

### chapEncrypt

    private static byte[] chapEncrypt(java.lang.String plainText,
                                      byte[] chapChallenge,
                                      net.sourceforge.jradiusclient.util.ChapUtil chapUtil)

  Encrypt password using chap challenge

  Parameters:
    `plainText` - plain text password
    `chapChallenge` - chap challenge
    `chapUtil` - ref ChapUtil
  Returns:
    encrypted chap password

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.