Mediator

mediator.pl is used to trigger administrative actions, either locally or on a remote Funnelback server:

mediator.pl TaskToRun[@host[:port]] arg1=value1 ... argN=valueN

Where:

TaskToRun

Name of the task / action to run.

host

Optional host where the task should be run (fully-qualified hostname). If not set the task is run locally.

port

Optional port to use to contact the remote host.

argN=valueN

Arguments specific to the taskThe list of available tasks can be obtained by running:

 mediator.pl --list-tasks

For the remote invocation to work the remote and local server must share the same server_secret in $SEARCH_HOME/conf/global.cfg. Special care must be taken when changing the server secret, see the server_secret page for details.

Examples

Obtain the list of collections on the local server (--verbose is required there to get the return value of the task, which is the collection list):

 mediator.pl --verbose ListCollections

Obtain the list of collections from a remote server:

 mediator.pl --verbose ListCollections@server.domain.com

Push the complete intranet collection from the local server to a remote host:

 mediator.pl PushCollection collection=intranet host=server.domain.com

Push the complete intranet collection from the server1 host to the server2 host (The task will be invoked on server1, and server1 will push its intranet collection to server2):

 mediator.pl PushCollection@server1.domain.com collection=intranet host=server2.domain.com

REST endpoint

The mediator tasks can also be triggered through a REST endpoint, available at https://FUNNELBACK-SERVER/search/admin/mediator/ . This URL returns a list of all available tasks and their parameters. To call a specific task, use

 https://FUNNELBACK-SERVER/search/admin/mediator/Task?param1=value1... 

The example below uses the REST endpoint to push the 'intranet' collection to the server.domain.com remote host:

 https://FUNNELBACK-SERVER/search/admin/mediator/PushCollection?collection=intranet&host=server.domain.com

This endpoint requires authentication, and the user must have the sec.service.mediator permission.

The output format is XML by default, but JSON is also available since v13.2. To choose an output format:

  • Either suffix the REST call with .json or .xml: mediator/PushCollection.json?collection=...
  • Set the appropriate Accept: ... header in the HTTP request: Accept: text/xml or Accept: application/json

See also

top