agents
Creates, updates, deletes, gets or lists an agents resource.
Overview
| Name | agents |
| Type | Resource |
| Id | aws.discovery.agents |
Fields
The following fields are returned by SELECT queries:
- describe_agents
| Name | Datatype | Description |
|---|---|---|
agent_id | string | The agent or collector ID. (pattern: <code>\S+</code>) |
agent_network_info_list | array | Network details about the host where the agent or collector resides. |
agent_type | string | Type of agent. (pattern: <code>[\s\S]*</code>) |
collection_status | string | Status of the collection process for an agent. (pattern: <code>[\s\S]*</code>) |
connector_id | string | The ID of the connector. (pattern: <code>[\s\S]*</code>) |
health | string | The health of the agent. (HEALTHY, UNHEALTHY, RUNNING, UNKNOWN, BLACKLISTED, SHUTDOWN) |
host_name | string | The 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_time | string | Time since agent health was reported. (pattern: <code>[\s\S]*</code>) |
registered_time | string | Agent's first registration timestamp in UTC. (pattern: <code>[\s\S]*</code>) |
version | string | The agent or collector version. (pattern: <code>[\s\S]*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_agents | select | region | 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. | |
batch_delete_agents | exec | region, deleteAgents | 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. | |
start_data_collection_by_agent_ids | exec | region, agentIds | Instructs the specified agents to start collecting data. | |
stop_data_collection_by_agent_ids | exec | region, agentIds | Instructs 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_agents
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
- batch_delete_agents
- start_data_collection_by_agent_ids
- stop_data_collection_by_agent_ids
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 }}"
}'
;
Instructs the specified agents to start collecting data.
EXEC aws.discovery.agents.start_data_collection_by_agent_ids
@region='{{ region }}' --required
@@json=
'{
"agentIds": "{{ agentIds }}"
}'
;
Instructs the specified agents to stop collecting data.
EXEC aws.discovery.agents.stop_data_collection_by_agent_ids
@region='{{ region }}' --required
@@json=
'{
"agentIds": "{{ agentIds }}"
}'
;