Skip to main content

agents

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

Overview

Nameagents
TypeResource
Idaws.discovery.agents

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_idstringThe agent or collector ID. (pattern: <code>\S+</code>)
agent_network_info_listarrayNetwork details about the host where the agent or collector resides.
agent_typestringType of agent. (pattern: <code>[\s\S]*</code>)
collection_statusstringStatus of the collection process for an agent. (pattern: <code>[\s\S]*</code>)
connector_idstringThe ID of the connector. (pattern: <code>[\s\S]*</code>)
healthstringThe health of the agent. (HEALTHY, UNHEALTHY, RUNNING, UNKNOWN, BLACKLISTED, SHUTDOWN)
host_namestringThe name of the host where the agent or collector resides. The host can be a server or virtual machine. (pattern: <code>[\s\S]*</code>)
last_health_ping_timestringTime since agent health was reported. (pattern: <code>[\s\S]*</code>)
registered_timestringAgent's first registration timestamp in UTC. (pattern: <code>[\s\S]*</code>)
versionstringThe agent or collector version. (pattern: <code>[\s\S]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_agentsselectregionLists agents or collectors as specified by ID or other filters. All agents/collectors associated with your user can be listed if you call DescribeAgents as is without passing any parameters.
batch_delete_agentsexecregion, deleteAgentsDeletes one or more agents or collectors as specified by ID. Deleting an agent or collector does not delete the previously discovered data. To delete the data collected, use StartBatchDeleteConfigurationTask.
start_data_collection_by_agent_idsexecregion, agentIdsInstructs the specified agents to start collecting data.
stop_data_collection_by_agent_idsexecregion, agentIdsInstructs the specified agents to stop collecting data.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Lists agents or collectors as specified by ID or other filters. All agents/collectors associated with your user can be listed if you call DescribeAgents as is without passing any parameters.

SELECT
agent_id,
agent_network_info_list,
agent_type,
collection_status,
connector_id,
health,
host_name,
last_health_ping_time,
registered_time,
version
FROM aws.discovery.agents
WHERE region = '{{ region }}' -- required
;

Lifecycle Methods

Deletes one or more agents or collectors as specified by ID. Deleting an agent or collector does not delete the previously discovered data. To delete the data collected, use StartBatchDeleteConfigurationTask.

EXEC aws.discovery.agents.batch_delete_agents
@region='{{ region }}' --required
@@json=
'{
"deleteAgents": "{{ deleteAgents }}"
}'
;