Skip to main content
Sumo Logic

Local Configuration File Management for Existing Collectors and Sources

With Local Configuration File Management, all configuration is done through a configuration file. This approach allows you to create scripts to configure multiple Collectors and Sources or to create configuration backups.

Step 1. Get a configuration file

The Web Application can generate ready-to-use JSON configuration text for the Sources that are already configured for the Collector. For additional details, see View or Download Collector or Source JSON Configuration

To get the JSON configuration and create a configuration file:

1. In Sumo Logic, select Manage > Collection, and select the information icon to the right of the Collector or Source.

2. Copy and paste the displayed JSON into a new text file. Name the text file sources.json, or any other name that makes sense.

3. Save the file to a location accessible by the Collector and make a note of this file path.

Step 2. Update user.properties

When a Collector registers its Sources, it reads the syncSources property from the user.properties configuration file to determine the file path of the source JSON file.

The user.properties file is located at [Collector Installation Directory]/config/user.properties.

Parameter Type Description
syncSources String Sets the JSON file describing sources to configure on registration, which will be continuously monitored and synchronized with the Collector's configuration.

To add the syncSources parameter:

  1. Open or create the user.properties file located at [Collector Installation Directory]/config/user.properties
  2. On any free line add the following:
    syncSources=/path/to/sources.json
    On Windows systems, use a double-backslash for the file path:
    syncSources=C:\\path\\to\\sources.json
  3. Save and close the file.

Step 3. Make the switch

You can now move to the Local Configuration File Management option, using the Web Application or the Collector Management API.

Do one of the following:

  • In the Web Application, choose Local Configuration File in the Edit Collector dialog box.
  • In the Collector Management API, use the PUT method to update the Collector's sourceSyncMode to "Json". For more information, see Collector API Methods and Examples. The following example shows the  sourceSyncMode of a Collector using UI mode. 
  •     "sourceSyncMode":"UI",

Step 4. Restart the Collector

After saving the syncSources parameter and switching to Local Configuration File Management, you can restart the Collector for the changes to take effect.

To restart the Collector:

  • Mac/Linux: sudo ./collector restart
  • Windows: net restart sumo-collector 

Step 5. Verify the Sources are configured properly

Examine the Collector log file to verify that the Collector is ingesting data from all Sources.

Editing the configuration file

You can edit the configuration file at any time to edit Source attributes or add new Sources. When you delete Sources from the file, the Sources are deleted from the Collector.

After you finalize changes to the sources.json file, test the changes by deploying this configuration file to a Collector on a host that is NOT in production. After the file is validated, deploy the file to each host with Collector Sources that need to be modified, by overwriting the existing sources.json file. Collectors continually watch for updates to the sources.json file for changes. Any edits are immediately processed.