Skip to main content
Sumo Logic

Assign Collector to Ingest Budget

You can assign a Collector to an ingest budget by using a new parameter fields at any time with the Collector Management API or when first registering a Collector with Sumo.

The new parameter fields accepts key-value pairs to apply to the Collector. To assign a Collector to an ingest budget add the field _budget with a value of the ingest budget's name.

Collector Management API

Use the Collector Management API to assign an existing Collector to an ingest budget.

Parameter Type Required? Default Description Access
fields JSON Object No   JSON map of key-value fields (metadata) to apply to the Collector. Use the field _budget to assign an ingest budget. Modifiable

The following steps can be referenced in the Collector Management API document for a PUT request. If you are not sure what URL endpoint to use see Sumo Logic Endpoints.

First make a GET request to get the Collector's JSON configuration:

curl -v -u 'accessid:accesskey' https://api.sumologic.com/api/v1/collectors/15

GET response:

...
< ETag: "acd8c6f11f5100b047e6320f231c4f6f"
...
{
  "collector":{
    "id":102113467,
    "name":"duke-mac",
    "timeZone":"UTC",
    "fields":{
      
    },
    "links":[{
      "rel":"sources",
      "href":"/v1/collectors/15/sources"
    }],
    "ephemeral":false,
    "sourceSyncMode":"UI",
    "collectorType":"Installable",
    "collectorVersion":"19.130",
    "osVersion":"10.12.6",
    "osName":"Mac OS X",
    "osArch":"x86_64",
    "lastSeenAlive":1537390136406,
    "alive":true
  }
}
* Connection #0 to host api.sumologic.com left intact

Save the JSON to a file and modify it to include the _budget field with the name of the ingest budget to assign. In the following example the name of the ingest budget is test_budget and the JSON file is named updated_collector.json.

{
  "collector":{
    "id":15,
    "name":"duke-mac",
    "timeZone":"UTC",
    "fields":{
      "_budget":"test_budget"
    },
    "links":[{
      "rel":"sources",
      "href":"/v1/collectors/15/sources"
    }],
    "ephemeral":false,
    "sourceSyncMode":"UI",
    "collectorType":"Installable",
    "collectorVersion":"19.130",
    "osVersion":"10.12.6",
    "osName":"Mac OS X",
    "osArch":"x86_64",
    "lastSeenAlive":1537390136406,
    "alive":true
  }
}

Once the Collector's JSON configuration is modified with the _budget to assign go ahead and make the PUT request to update the Collector with this new configuration:

curl -u 'accessid:accesskey' -X PUT -H "Content-Type: application/json" -H "If-Match: \"acd8c6f11f5100b047e6320f231c4f6f\"" -T updated_collector.json https://api.sumologic.com/api/v1/collectors/15

Response has the updated JSON and the Collector is now assigned to the test_budget ingest budget:

{
  "collector":{
    "id":15,
    "name":"dduke-mac",
    "timeZone":"UTC",
    "fields":{
      "_budget":"test_budget"
    },
    "links":[{
      "rel":"sources",
      "href":"/v1/collectors/15/sources"
    }],
    "ephemeral":false,
    "sourceSyncMode":"UI",
    "collectorType":"Installable",
    "collectorVersion":"19.130",
    "osVersion":"10.12.6",
    "osName":"Mac OS X",
    "osArch":"x86_64",
    "lastSeenAlive":1537391044526,
    "alive":true
  }
}

user.properties

When registering a new Collector version 19.227-14 or higher you can specify a new parameter fields in user.properties to assign the Collector to an ingest budget.

Parameter Description Can be changed after installation?
fields=[list of fields] Comma-separated list of key=value fields. Use field _budget to assign an ingest budget. Example:

fields=_budget=test_budget
No, use the Collector Management API to modify.

Command line installation

When using the command line (shell script) installer you can assign an ingest budget with the new -Vfields parameter. For details and example commands on Collector installation, see Install a Collector on LinuxInstall a Collector on MacOS, and Install a Collector on Windows.

The new -Vfields parameter:

Parameter Description
-Vfields=[list of fields] Comma-separated list of key=value fields. Use the field _budget to assign an ingest budget. Example:

-Vfields=_budget=test_budget