
382
Sentinel 6.1 User Guide
no
vd
ocx
(e
n)
7 Ja
nua
ry 201
0
importPackage(java.lang);
var CollectorName = "TC_5";
var evt = scriptEnv.getCurrentEvent();
var collNm = evt.getPort();
var outfile = new java.io.PrintWriter(new java.io.FileWriter("/opt/jaya/
strtcoll.txt", true));
if(collNm && collNm.equals(CollectorName))
{
var collist = ESM.collectorsForName(collNm);
if (collist.size() > 0)
{
var coll = collist.get(0);
outfile.println("Stopping " + CollectorName);
coll.stop();
Thread.sleep(60000);
outfile.println("starting " +CollectorName);
coll.start();
}
}
else
{
outfile.println("JSTest collector does not exist");
}
outfile.close();
Debugging JavaScript Actions
You can debug JavaScript files from the Sentinel Control Center with the help of the JavaScript
debugger. The JavaScript Debugger is a local debugger that executes scripts with respect to the
machine on which the Sentinel Control Center is running. The JavaScript Debugger instantiates a
debug session from the Data Access Service (DAS) machine.
A JavaScript Correlation Action can only be debugged after it is associated with a fired Correlation
Rule. Therefore, a prerequisite to debugging is to create a correlation rule that is guaranteed to fire,
then associate the JavaScript Correlation Action with that rule.
The debugger has the following controls:
Table 16-2
Debugger Controls
Run
Run the script until the next breakpoint is encountered.
Step Into
Step into a function, one line at a time.
Pause
Pause the running script.
Stop
Stop the script.
Step Over
Step over a function to the next line in the script.
Step Out
Step out of the function to the next line in the script.
Summary of Contents for SENTINEL 6.1 SP2
Page 4: ...4 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 20: ...20 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 34: ...34 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 116: ...116 Sentinel 6 1 User Guide novdocx en 7 January 2010 Integer Variable String Variable ...
Page 146: ...146 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 172: ...172 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 178: ...178 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 280: ...280 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 306: ...306 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 329: ...Quick Start 329 novdocx en 7 January 2010 ...
Page 330: ...330 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 412: ...412 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 430: ...430 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...
Page 440: ...440 Sentinel 6 1 User Guide novdocx en 7 January 2010 Figure 18 3 Reports ...
Page 528: ...528 Sentinel 6 1 User Guide novdocx en 7 January 2010 ...