Application Framework Reference

Splunk API

setDistributedServerList()

The setDistributedServerList() method sets the list search peers to which the context current search is distributed.

Note: This method is destructive, so preserve the existing list using getDistributedServerList() .

Synopsis

results = setDistributedServerList( serverList )

Parameters

serverList

Array

List of splunkd instance names.

Return Value

Undefined

Example

var context = this.getContext();var search  = context.get("search");
var serverList = ['https://foobar.splunk.com:8089', 'https://barfoo.splunk.com:8089'];
search.setDistributedServerList(serverList);
context.set('search', search);
return context;
 

See Also

getDistributedServerList()
Splunk.Context