network.detectors
Class RPCAbnormalTrafficEventDetector
java.lang.Object
|
+--network.detectors.EventDetector
|
+--network.detectors.RPCAbnormalTrafficEventDetector
- All Implemented Interfaces:
- java.lang.Runnable, java.io.Serializable
- public class RPCAbnormalTrafficEventDetector
- extends EventDetector
- implements java.io.Serializable
- See Also:
- Serialized Form
| Fields inherited from class network.detectors.EventDetector |
agentURN, attempts, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, printRunningThreadsFlag, remoteTriggeringEvents, reportTable |
|
Method Summary |
private java.util.Vector |
executeSystemCommand(java.lang.String command)
This function executes a system command and returns the output in a vector. |
java.util.Vector |
generateEvent(network.events.Event triggeredEvent)
|
private java.lang.String |
getCommand()
This function returns the command that should be executed. |
java.lang.String |
getGeneratingEventClassName()
|
private long |
getMaxAbnormalPackets()
|
private long |
getYValue(int count)
This function specifies the curve's equation. |
private void |
processOutput(java.util.Vector results)
This function takes the output and processes it. |
private boolean |
yvalues_compare(long yval,
long calculated_yval)
This function specifies how to compare the actual cumulative
number of packets and the number created by the curve's function. |
| Methods inherited from class network.detectors.EventDetector |
getAlarmLevel, getAlertLevel, getLocalTriggeringEventClassNames, getRemoteTriggeringEventClassNames, getSynchronizer, InitializeFields, modifyDetector, populatePatterns, printRunningThreads, run, setAgentURN, setAlarmLevel, setAlertLevel, setDB, setEventIDGenerator, setEventTable, setLocalTriggeringEvents, setRemoteTriggeringEvents, setReportTable, stopDetector, switchOffPrintRunningThreads |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
abnormal_packet_count
private long abnormal_packet_count
defaultLocalTriggeringEvents
private java.lang.String[] defaultLocalTriggeringEvents
RPCAbnormalTrafficEventDetector
public RPCAbnormalTrafficEventDetector(ConfigObject configOBJ)
getGeneratingEventClassName
public java.lang.String getGeneratingEventClassName()
- Specified by:
getGeneratingEventClassName in class EventDetector
- Returns:
executeSystemCommand
private java.util.Vector executeSystemCommand(java.lang.String command)
- This function executes a system command and returns the output in a vector.
- Parameters:
command - a string that is the command to execute
- Returns:
- a Vector that is the output of the command executed
processOutput
private void processOutput(java.util.Vector results)
- This function takes the output and processes it. It converts
the strings in the vector to integers and compares them with the
value given by the curve's equation
- Parameters:
results - a vector that consists of the cumulative number of packets
- Returns:
- void
yvalues_compare
private boolean yvalues_compare(long yval,
long calculated_yval)
- This function specifies how to compare the actual cumulative
number of packets and the number created by the curve's function.
- Parameters:
yval - the actual value taken from the logfilescalculated_yval - the calculated value taken from the curve's equation
- Returns:
- boolean
getCommand
private java.lang.String getCommand()
- This function returns the command that should be executed.
- Returns:
- String this is the string that contains a command to be executed
getYValue
private long getYValue(int count)
- This function specifies the curve's equation.
- Parameters:
count - is the packet number that we are on
- Returns:
- long the cumulative number of packets that the function thinks we should have
getMaxAbnormalPackets
private long getMaxAbnormalPackets()
- Returns:
- long the maximum number of abnormal packets that we can have.
generateEvent
public java.util.Vector generateEvent(network.events.Event triggeredEvent)
- Specified by:
generateEvent in class EventDetector
- Parameters:
triggeredEvent -
- Returns: