Provides the WazuhAgentCredentials class, which allows to parse an agent’s data from the GET /agents api endpoint’s response data.

class WazuhAgent(**kwargs)#

Bases: object

Object representation of an Wazuh agent’s information.

Wazuh reference: https://documentation.wazuh.com/current/user-manual/api/reference.html#tag/Agents/operation/api.controllers.agent_controller.get_agents

get_version() Version#

Creates a semver.Version representation of the agent’s version string.

Return type:

Semantic version representation of the agent’s version.

group_config_checksum: str#

MD5 checksum of the agent’s group configuration file (agent.conf).

group_config_status: str#

Status of the agent’s groups configuration synchronization. Possible values: [“synced”, “not synced”]

group_shared_files_checksum: str#

MD5 checksum of all group shared files (merged in merged.mg).

groups: list[str]#

List of groups the agent is assigned to.

id: str#

The agent’s ID.

ip: str#

The agents IP address. Defaults to register_ip when the manager is not able to obtain the information.

last_keep_alive: str#

yyyy-mm-ddThh:MM:SSZ

Type:

Date of the last received keep alive. Format

manager: str#

Hostname of the manager the agent is responding to.

name: str#

Name of the agent.

node_name: str#

ID of the node the agent is reporting to.

operating_system: WazuhAgentOS | None#

Information about the Operating System the agent is installed on.

register_ip: str#

The agent’s IP that has been used during the enrollment.

registration_date: str#

yyyy-mm-ddThh:MM:SSZ

Type:

Date of the agent’s enrollment. Format

status: str#

Current connection status of the Agent

version: str#

Wazuh v<major>.<minor>.<patch>

Type:

Version of the agent. Format