|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetwork.detectors.EventDetector
network.detectors.DiskFullEventDetector
This detector watches a number of disk volumes and warns (generates a DiskFullEvent)
if the space used is above X percent.
A sample file might be:
/usr 20
/tmp 80
/export/scratch 50
where the lvalues are paths, and the rvalues are usage thresholds
(percent of volume used).
Field Summary |
Fields inherited from class network.detectors.EventDetector |
agentURN, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, remoteTriggeringEvents, reportTable |
Constructor Summary | |
DiskFullEventDetector(ConfigObject configObj)
The default constructor. |
|
DiskFullEventDetector(java.lang.String diskUsageFile,
ConfigObject configObj)
This constructor takes as argument a diskUsageFile, an example of which is shown above. |
Method Summary | |
java.util.Vector |
executeSystemCommand(java.lang.String command)
Executes the given command and returns a vector of lines of output. |
java.util.Vector |
generateEvent(Event triggeredEvent)
|
java.lang.String |
getGeneratingEventClassName()
Returns the fully-qualified classname of the event that this detector may generate. |
java.util.Vector |
parseCommandResults(java.util.Vector results)
Parses a vector of command results into a vector of Object arrays that represent the elements of each line (separated by spaces). |
static void |
parseDiskUsagesFile(java.lang.String diskUsageFile,
java.util.Hashtable usageThresholds)
This method parses a diskUsageFile. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DiskFullEventDetector(ConfigObject configObj)
public DiskFullEventDetector(java.lang.String diskUsageFile, ConfigObject configObj)
diskUsageFile
- Method Detail |
public java.lang.String getGeneratingEventClassName()
getGeneratingEventClassName
in class EventDetector
public java.util.Vector executeSystemCommand(java.lang.String command)
command
- a command to be executed in a new process.
public java.util.Vector parseCommandResults(java.util.Vector results)
results
- the vector of results generated by executeSystemCommand().
public java.util.Vector generateEvent(Event triggeredEvent)
generateEvent
in class EventDetector
triggeredEvent
-
public static void parseDiskUsagesFile(java.lang.String diskUsageFile, java.util.Hashtable usageThresholds)
diskUsageFile
- path to the diskUsageFileusageThresholds
- a Hashtable to be filled with config pairs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |