Skip to main content

offline_collectors

Creates, updates, deletes, gets or lists an offline_collectors resource.

Overview​

Nameoffline_collectors
TypeResource
Idsumologic.collectors.offline_collectors

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idintegerUnique identifier of the Collector.
namestringName of the Collector. It must be unique on your account.
host_namestringHost name of the Collector. (wire: hostName)
os_namestringName of the OS the Collector is installed on (Installed Collectors only). (wire: osName)
alivebooleanWhen a Collector is running it sends a heartbeat every 15 seconds. If no heartbeat is received for 30 minutes this becomes false.
categorystringThe category of the Collector, used as metadata when searching data.
collector_typestringThe Collector type: Installable or Hosted. (wire: collectorType)
collector_versionstringVersion of the Collector software installed. (wire: collectorVersion)
cutoff_relative_timestringCan 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_timestampinteger (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)
descriptionstringDescription of the Collector.
ephemeralbooleanWhen true, the Collector is deleted after 12 hours of inactivity.
fieldsstringJSON map of key-value fields (metadata) applied to the Collector. (opaque JSON object)
last_seen_aliveinteger (int64)The last time the Sumo Logic service received an active heartbeat from the Collector, in milliseconds since epoch. (wire: lastSeenAlive)
linksarrayRelated links.
os_archstringArchitecture of the OS the Collector is installed on (Installed Collectors only). (wire: osArch)
os_timeinteger (int64)Time that the Collector has been running, in milliseconds (Installed Collectors only). (wire: osTime)
os_versionstringVersion of the OS the Collector is installed on (Installed Collectors only). (wire: osVersion)
source_sync_modestringFor Installed Collectors, whether Sources are managed locally from a JSON file (Json) or from the cloud (UI). (wire: sourceSyncMode)
target_cpuintegerWhen CPU utilization exceeds this threshold the Collector slows its rate of ingestion. (wire: targetCpu)
time_zonestringTime zone of the Collector (TZ database name). (wire: timeZone)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectregionalive_before_days, limit, offsetGet a list of Installed Collectors last seen alive before a specified number of days with an optional limit and offset.
deletedeleteregionalive_before_daysDelete 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.

NameDatatypeDescription
regionstringSumo 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_daysintegerMinimum number of days the Collectors have been offline (default 100, minimum 1). (wire: aliveBeforeDays)
limitintegerMaximum number of Collectors to return (default 1000).
offsetintegerOffset into the list of Collectors (default 0).

SELECT examples​

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 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 }}'
;