Log Collection¶
Two clients for retrieving log files and traces from UCM servers.
LogCollectionClient— List and select log files via the LogCollection SXML APIDimeGetFileClient— Download individual files via the DimeGetFile SXML API
[!NOTE] Both clients require platform/OS admin credentials.
LogCollectionClient¶
axltoolkit.log_collection.LogCollectionClient
¶
LogCollectionClient(username: str, password: str, server_ip: str, *, tls_verify: Union[bool, str] = True, timeout: int = 60, max_retries: int = 3)
Bases: BaseClient
Client for the Cisco UCM Log Collection SXML API.
Provides methods to list and retrieve log files and traces from the UCM cluster.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Platform/OS Administration user name. |
required |
password
|
str
|
Password. |
required |
server_ip
|
str
|
UCM server IP address or FQDN. |
required |
tls_verify
|
Union[bool, str]
|
TLS verification setting (default |
True
|
timeout
|
int
|
Request timeout in seconds (default 60, as log operations can be slow). |
60
|
max_retries
|
int
|
Retry count for transient failures (default 3). |
3
|
list_node_service_logs
¶
List available service logs on this node.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The raw SOAP response dict from |
Raises:
| Type | Description |
|---|---|
LogCollectionError
|
If the query fails. |
select_log_files
¶
Select log files matching criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_selection_criteria
|
Dict[str, Any]
|
A dict describing the log file selection criteria. Refer to UCM Serviceability API documentation for the full schema. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The raw SOAP response dict from |
Raises:
| Type | Description |
|---|---|
LogCollectionError
|
If the query fails. |
axltoolkit.log_collection.DimeGetFileClient
¶
DimeGetFileClient(username: str, password: str, server_ip: str, *, tls_verify: Union[bool, str] = True, timeout: int = 120, max_retries: int = 3)
Bases: BaseClient
Client for the Cisco UCM DimeGetFile SXML API.
Provides direct file retrieval from UCM servers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Platform/OS Administration user name. |
required |
password
|
str
|
Password. |
required |
server_ip
|
str
|
UCM server IP address or FQDN. |
required |
tls_verify
|
Union[bool, str]
|
TLS verification setting (default |
True
|
timeout
|
int
|
Request timeout in seconds (default 120). |
120
|
max_retries
|
int
|
Retry count for transient failures (default 3). |
3
|
get_one_file
¶
Retrieve a single file from the UCM server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
str
|
The full path to the file on the UCM server. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The raw SOAP response containing the file data. |
Raises:
| Type | Description |
|---|---|
LogCollectionError
|
If the file retrieval fails. |