SMILA/Project Concepts/CrawlerController Remote Management
Contents
Description.
How to manage CrawlerController remotely
Bundle org.eclipse.eilf.management.crawlercontroller allows remote management of the CrawlerController. Currently the following methods of the CrawlerController are offered for management: - startCrawl(String dataSourceId), - stopCrawl(String dataSourceId), - getStatus(String dataSourceId) - getActiveCrawls()
To activate remote JMX management EILF application must be started with the following JVM arguments:
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=9004
CrawlerController can be managed with any JMX agent, for example JConsole.
JMX agent application
JMX agent application (jmxagent) allows remote management of the CrawlerController and batch execution of the CrawlerController methods. jmxagent is currently available at [[1]] It can be started as a java application in Eclipse, or compiled with ant command and then started from console with the appropriate run script from build directory (run.bat or run.sh). You can also check sample batch execution script sample.sh. Latest build of the agent can also be downloaded at [[2]]
Configuring the JMX agent application
Using command line arguments
jmxagent run.bat or run.sh script must be provided with the following arguments:
- agent - remote management agent name to connect to (org.eclipse.eilf.connectivity.framework.CrawlerController for the CrawlerController management agent)
Invalid language.
You need to specify a language like this: <source lang="html4strict">...</source>
Supported languages for syntax highlighting:
4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, otj, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic
Remote management agent is a bundle that provides service that implements org.eclipse.eilf.management.ManagementAgent interface.
- cmd - command to execute, for example startCrawl;
- dataSourceId - optional parameter, if dataSourceId is missing it's assumed that operation doesn't have any parameters.
For example:
run.bat -agent=org.eclipse.eilf.connectivity.framework.CrawlerController -cmd=startCrawl -dataSourceId=file
In addition, following JMX configuration arguments can be provided (optionally):
- host - JMX server host (default is localhost)
- port - JMX server port number (default is 9004)
Using properties file.
JMX agent application can be also configured using configuration.properties file. By default it contains default values for host and port properties. Any other command line arguments described above can be placed into configuration.properties file too. Properties from this file will be overridden by the provided corresponding command line properties. The default values host=localhost and port=9004 will be used even if host or port was not specified neither in command line nor in properties file.