com.agentpp.explorer.script.external
Interface Alarm


public interface Alarm

The Alarm interface provides methods to access monitor data from within an alarm script. Note: This interface is not available within normal a script context. It is only available for scripts running as Alarm script within a MIB Explorer monitor.

Since:
1.5

Method Summary
 java.lang.Integer getAlarmSeverity()
          Gets the severity of the alarm.
 java.lang.String getAlarmValue()
          Gets the result of the alarm's Value expression.
 java.lang.Double getLastMonitoredValue()
          Gets the value of the latest data point in the series for which this alarm has been configured.
 java.lang.Double getLastMonitoredValue(int series)
          Gets the value of the latest data point in the specified series.
 java.lang.String getMonitorName()
          Gets the name of the monitor generating this alarm.
 boolean isRaised()
          Returns whether this alarm is raised or cleared.
 boolean isTransient()
          Returns whether this alarm is transient.
 void setCurrentTargetToAlarmTarget()
          Sets the scripts current target to the target specified for the alarm.
 void setCurrentTargetToSource()
          Sets the scripts current target to the target from which the series data is being collected.
 

Method Detail

getLastMonitoredValue

java.lang.Double getLastMonitoredValue(int series)
Gets the value of the latest data point in the specified series.

Parameters:
series - an integer value representing series of the monitor (starting from 0).
Returns:
a Double instance with the value of the latest data point in series. If series is out of range or if the data point identified by series is not a number, null will be returned.

getLastMonitoredValue

java.lang.Double getLastMonitoredValue()
Gets the value of the latest data point in the series for which this alarm has been configured.

Returns:
a Double instance with the value of the latest data point in this series. If the data point of this series is not a number, null will be returned.

getAlarmValue

java.lang.String getAlarmValue()
Gets the result of the alarm's Value expression.

Returns:
a String containing the result of the alarm's Value expression, if that expression could be evaluated. Otherwise null will be returned.

getAlarmSeverity

java.lang.Integer getAlarmSeverity()
Gets the severity of the alarm.

Returns:
an Integer with one of the following values: 1=INFO, 2=WARN, 3=ERROR, 4=FATAL

isRaised

boolean isRaised()
Returns whether this alarm is raised or cleared.

Returns:
true if this alarm is raised, false if it is cleared.

isTransient

boolean isTransient()
Returns whether this alarm is transient. A transient alarm is never cleared.

Returns:
true if this alarm is transient, false if it is cleared or if it is raised but will never be cleared (i.e., because there is not clear condition given).

getMonitorName

java.lang.String getMonitorName()
Gets the name of the monitor generating this alarm.

Returns:
the name of this monitor.

setCurrentTargetToAlarmTarget

void setCurrentTargetToAlarmTarget()
Sets the scripts current target to the target specified for the alarm. See also Snmp.getCurrentTarget()


setCurrentTargetToSource

void setCurrentTargetToSource()
Sets the scripts current target to the target from which the series data is being collected. See also Snmp.getCurrentTarget()


Copyright 2003-2011, Frank Fock, All Rights Reserved. http://www.mibexplorer.com