offline_collectors
Creates, updates, deletes, gets or lists an offline_collectors resource.
Overview​
| Name | offline_collectors |
| Type | Resource |
| Id | sumologic.collectors.offline_collectors |
Fields​
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique identifier of the Collector. |
name | string | Name of the Collector. It must be unique on your account. |
host_name | string | Host name of the Collector. (wire: hostName) |
os_name | string | Name of the OS the Collector is installed on (Installed Collectors only). (wire: osName) |
alive | boolean | When a Collector is running it sends a heartbeat every 15 seconds. If no heartbeat is received for 30 minutes this becomes false. |
category | string | The category of the Collector, used as metadata when searching data. |
collector_type | string | The Collector type: Installable or Hosted. (wire: collectorType) |
collector_version | string | Version of the Collector software installed. (wire: collectorVersion) |
cutoff_relative_time | string | Can be specified instead of cutoffTimestamp to provide a relative offset with respect to the current time, for example -1h, -1d or -1w. (wire: cutoffRelativeTime) |
cutoff_timestamp | integer (int64) | Only collect data from files with a modified date more recent than this timestamp, in milliseconds since epoch (0 collects all data). (wire: cutoffTimestamp) |
description | string | Description of the Collector. |
ephemeral | boolean | When true, the Collector is deleted after 12 hours of inactivity. |
fields | string | JSON map of key-value fields (metadata) applied to the Collector. (opaque JSON object) |
last_seen_alive | integer (int64) | The last time the Sumo Logic service received an active heartbeat from the Collector, in milliseconds since epoch. (wire: lastSeenAlive) |
links | array | Related links. |
os_arch | string | Architecture of the OS the Collector is installed on (Installed Collectors only). (wire: osArch) |
os_time | integer (int64) | Time that the Collector has been running, in milliseconds (Installed Collectors only). (wire: osTime) |
os_version | string | Version of the OS the Collector is installed on (Installed Collectors only). (wire: osVersion) |
source_sync_mode | string | For Installed Collectors, whether Sources are managed locally from a JSON file (Json) or from the cloud (UI). (wire: sourceSyncMode) |
target_cpu | integer | When CPU utilization exceeds this threshold the Collector slows its rate of ingestion. (wire: targetCpu) |
time_zone | string | Time zone of the Collector (TZ database name). (wire: timeZone) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | region | alive_before_days, limit, offset | Get a list of Installed Collectors last seen alive before a specified number of days with an optional limit and offset. |
delete | delete | region | alive_before_days | Delete Installed Collectors last seen alive before a specified number of days. The delete task is initiated asynchronously. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | Sumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT) |
alive_before_days | integer | Minimum number of days the Collectors have been offline (default 100, minimum 1). (wire: aliveBeforeDays) |
limit | integer | Maximum number of Collectors to return (default 1000). |
offset | integer | Offset into the list of Collectors (default 0). |
SELECT examples​
- list
Get a list of Installed Collectors last seen alive before a specified number of days with an optional limit and offset.
SELECT
id,
name,
host_name,
os_name,
alive,
category,
collector_type,
collector_version,
cutoff_relative_time,
cutoff_timestamp,
description,
ephemeral,
fields,
last_seen_alive,
links,
os_arch,
os_time,
os_version,
source_sync_mode,
target_cpu,
time_zone
FROM sumologic.collectors.offline_collectors
WHERE region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND alive_before_days = '{{ alive_before_days }}'
AND limit = '{{ limit }}'
AND offset = '{{ offset }}'
;
DELETE examples​
- delete
Delete Installed Collectors last seen alive before a specified number of days. The delete task is initiated asynchronously.
DELETE FROM sumologic.collectors.offline_collectors
WHERE region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
AND alive_before_days = '{{ alive_before_days }}'
;