Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search

SMILA/Project Concepts/CrawlerController Remote Management


How to manage CrawlerController remotely

Bundle 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 SMILA application must be started with the following JVM arguments:

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 available as bundle of the SMILA project org.eclipse.smila.monitoring.jmxagent, but it will be also compiled into the jmxagent-folder of SMILA. It can be started as a java application in Eclipse, or from console with the appropriate run script from build directory (run.bat or You can also check sample batch execution script or starcrawl.bat.

Configuring the JMX agent application

Using command line arguments

jmxagent run.bat or script must be provided with the following arguments:

  • agent - remote management agent name to connect to (org.eclipse.smila.connectivity.framework.CrawlerController for the CrawlerController management agent)
Remote management agent is a bundle that provides service that implements 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.smila.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 file. By default it contains default values for host and port properties. Any other command line arguments described above can be placed into 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.

Back to the top