Agent Config Files

<< Click to Display Table of Contents >>

Navigation:  Agent Commands >

Agent Config Files

Agent config files can be used to enforce specific configuration for a single agent or all agents in a folder. This makes it possible to alter an agent's behavior by simply editing a text file.

 

The configuration files are INI files that have a number of sections followed by properties for each section.

 

Configuration files correspond tightly to the API. A section in a configuration file specifies the instance of a class to modify, and the properties specify the class properties to modify.

 

Configuration files can only set agent properties, and cannot currently add new class instances, so for example, you cannot add proxies to the Proxy List using a configuration file.

 

A configuration file can contain an Include section that specifies paths to other configuration files that will be executed at the point where the include section is encountered. The path can point to a configuration file on the local disk or in the Content Grabber cloud.

 

Configuration files can contain a Parameters section, which is an easy way of setting input parameters.

 

To apply a configuration file to multiple agents, you must place a file named config.txt in the parent folder of all the agent folders.

 

To apply configuration to a specific agent, use the Agent Configuration button in the Agent Settings menu.

 

Example:

 

[Include]

path=c:\\test\config.txt

 

[Parameters]

test=working

 

[Set]

ObeyRobotsRules=Always

 

[InternalDatabase.Set]

DatabaseType=SqlServer

 

[InternalDatabase.DatabaseReference.Set]

DatabaseConnectionName=myconnection

 

This configuration does the following:

 

1) Loads and executes the config file c:\test\config.txt

 

2) Sets the input parameter test to working.

 

3) Sets the agent property ObeyRobotsRules to Always.

 

4) Sets the agent property InternalDatabase.DatabaseType to SqlServer.

 

5) Sets the agent property InternalDatabase.DatabaseReference.DatabaseConnectionName to myconnection.