Skip to main content

Module fleet

Module fleet 

Source
Expand description

Agent policies, integration packages, package policies, and enrolled agents.

Installing a package changes assets; assigning a package policy changes agent configuration. Agent actions are asynchronous: a submitted action ID is not proof of completion, so follow it through Fleet::agent_action_status or Fleet::wait_for_action.

Package policies have two formats. NewPackagePolicy builds Fleet’s simplified format, keyed by input and stream name. A retrieved PackagePolicy holds the full format; change it through PackagePolicy::edit to keep its existing configuration. Agent-policy edits use AgentPolicy::edit and Fleet::edit_agent_policy to retain the inactivity timeout. Optional settings are changed only when requested; AgentPolicyEdit::clear_data_output_id restores the default output with JSON null.

Policy variables can hold credentials, so Debug output of package policies and their inputs omits variable values.

Structs§

Agent
AgentActionStatus
Inspect failure counts and errors, including while the action is in progress.
AgentActionStatuses
GET /api/fleet/agents/action_status
AgentPolicy
An agent policy returned by Fleet, grouping the integrations assigned to agents.
AgentPolicyEdit
Changes to a retrieved agent policy, created by AgentPolicy::edit and sent with Fleet::edit_agent_policy.
AgentStatus
GET /api/fleet/agent_status
AgentUpload
BulkReassignAgents
POST /api/fleet/agents/bulk_reassign
BulkRequestAgentDiagnostics
POST /api/fleet/agents/bulk_request_diagnostics
BulkUnenrollAgents
POST /api/fleet/agents/bulk_unenroll
BulkUpdateAgentTags
POST /api/fleet/agents/bulk_update_agent_tags
BulkUpgradeAgents
POST /api/fleet/agents/bulk_upgrade
CancelAgentAction
POST /api/fleet/agents/actions/{actionId}/cancel
CopyAgentPolicy
POST /api/fleet/agent_policies/{agentPolicyId}/copy
CreateAgentPolicy
POST /api/fleet/agent_policies
CreateEnrollmentKey
POST /api/fleet/enrollment_api_keys
CreatePackagePolicy
POST /api/fleet/package_policies
DeleteAgentPolicy
POST /api/fleet/agent_policies/delete
DeletePackagePolicy
DELETE /api/fleet/package_policies/{packagePolicyId}
DownloadAgentFile
GET /api/fleet/agents/files/{fileId}/{fileName}
DownloadAgentPolicy
GET /api/fleet/agent_policies/{agentPolicyId}/download
EnrollmentKey
A Fleet enrollment key for joining agents to a policy. Enrollment credentials are omitted from Debug output.
FindAgentPolicies
GET /api/fleet/agent_policies
FindAgents
GET /api/fleet/agents
FindEnrollmentKeys
GET /api/fleet/enrollment_api_keys
FindPackagePolicies
GET /api/fleet/package_policies
Fleet
The Fleet API. Endpoints are grouped by resource in private modules and re-exported here.
FleetPage
GetAgent
GET /api/fleet/agents/{agentId}
GetAgentPolicy
GET /api/fleet/agent_policies/{agentPolicyId}
GetEnrollmentKey
GET /api/fleet/enrollment_api_keys/{keyId}
GetPackage
GET /api/fleet/epm/packages/{pkgName}/{pkgVersion}
GetPackagePolicy
GET /api/fleet/package_policies/{packagePolicyId}
InstallPackage
POST /api/fleet/epm/packages/{pkgName}/{pkgVersion}
Item
Fleet wraps single resources in {"item": ...}.
Items
ListAgentUploads
GET /api/fleet/agents/{agentId}/uploads
ListOutputs
GET /api/fleet/outputs
ListPackages
GET /api/fleet/epm/packages
NewAgentPolicy
An agent policy definition for Fleet::create_agent_policy and Fleet::update_agent_policy. For changes to a retrieved policy, prefer AgentPolicy::edit to retain its inactivity timeout instead of accepting the server’s default. Optional settings are omitted until their setter is called.
NewPackagePolicy
A package policy in the simplified format, for Fleet::create_package_policy and, through replacing, Fleet::update_package_policy. Unset inputs use package defaults. Debug output omits variable values.
Package
PackagePolicy
A package policy as Kibana returns it. Reads use Fleet’s full format; creation and simplified replacement responses use the simplified format.
PackagePolicyEdit
Changes to a retrieved package policy, created by PackagePolicy::edit and sent with Fleet::update_package_policy in the full format.
PackageRef
PolicyInput
One input in Fleet’s simplified package-policy format. Input, stream and variable names depend on the package. Debug output omits variable values.
PolicyStream
A stream within a PolicyInput. Debug output omits variable values.
ReassignAgent
POST /api/fleet/agents/{agentId}/reassign
RequestAgentDiagnostics
POST /api/fleet/agents/{agentId}/request_diagnostics
RevokeEnrollmentKey
DELETE /api/fleet/enrollment_api_keys/{keyId}
Setup
POST /api/fleet/setup
UnenrollAgent
POST /api/fleet/agents/{agentId}/unenroll
UninstallPackage
DELETE /api/fleet/epm/packages/{pkgName}/{pkgVersion}
UpdateAgentPolicy
PUT /api/fleet/agent_policies/{agentPolicyId}
UpdatePackagePolicy
PUT /api/fleet/package_policies/{packagePolicyId}
UpgradeAgent
POST /api/fleet/agents/{agentId}/upgrade

Enums§

ActionStatus
The state of an agent action. States added by newer Kibana versions are kept as Unknown.
AgentSelection
An explicit ID set or a Fleet KQL query. A query can select many agents.
BulkActionResult
Submission does not prove completion. Follow an action ID through Fleet::agent_action_status or Fleet::wait_for_action.
DiagnosticMetric
PackagePolicyUpdate
A replacement for Fleet::update_package_policy.
UploadStatus
The state of a file uploaded by an agent. States added by newer Kibana versions are kept as Unknown.