System Logs
Operations Summary
Core CRUD
List System Logs
| http \
GET \
https://api.example.com/api/system-logs/ \
Authorization:"Token YOUR_API_TOKEN"
|
1
2
3
4
5
6
7
8
9
10
11
12
13 | from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.system_log_level_enum import SystemLogLevelEnum # (1)
from waldur_api_client.models.system_log_o_enum import SystemLogOEnum # (2)
from waldur_api_client.models.system_log_source_enum import SystemLogSourceEnum # (3)
from waldur_api_client.api.system_logs import system_logs_list # (4)
client = AuthenticatedClient(
base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = system_logs_list.sync(client=client)
for item in response:
print(item)
|
- Model Source:
SystemLogLevelEnum
- Model Source:
SystemLogOEnum
- Model Source:
SystemLogSourceEnum
- API Source:
system_logs_list
| import { systemLogsList } from 'waldur-js-client';
try {
const response = await systemLogsList({
auth: "Token YOUR_API_TOKEN"
});
console.log('Success:', response);
} catch (error) {
console.error('Error:', error);
}
|
| Name |
Type |
Description |
created_from |
number |
|
created_to |
number |
|
instance |
string |
|
level |
string |
Enum: CRITICAL, ERROR, INFO, WARNING |
level_gte |
integer |
Min level: 20=INFO, 30=WARNING, 40=ERROR, 50=CRITICAL |
logger_name |
string |
|
message |
string |
|
o |
array |
Ordering
|
page |
integer |
A page number within the paginated result set. |
page_size |
integer |
Number of results to return per page. |
source |
string |
Enum: api, worker, beat |
200 -
The response body is an array of objects, where each object has the following structure:
| Field |
Type |
Description |
id |
integer |
|
created |
string (date-time) |
|
source |
any |
|
instance |
string |
Pod name (K8s) or container name (Docker) |
level |
string |
|
level_number |
integer |
|
logger_name |
string |
|
message |
string |
|
context |
any |
|
Retrieve
Other Actions
List system log instances
List all known instances (pods/containers) with their last activity.
| http \
GET \
https://api.example.com/api/system-logs/instances/ \
Authorization:"Token YOUR_API_TOKEN"
|
1
2
3
4
5
6
7
8
9
10
11
12
13 | from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.system_log_level_enum import SystemLogLevelEnum # (1)
from waldur_api_client.models.system_log_o_enum import SystemLogOEnum # (2)
from waldur_api_client.models.system_log_source_enum import SystemLogSourceEnum # (3)
from waldur_api_client.api.system_logs import system_logs_instances_list # (4)
client = AuthenticatedClient(
base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = system_logs_instances_list.sync(client=client)
for item in response:
print(item)
|
- Model Source:
SystemLogLevelEnum
- Model Source:
SystemLogOEnum
- Model Source:
SystemLogSourceEnum
- API Source:
system_logs_instances_list
| import { systemLogsInstancesList } from 'waldur-js-client';
try {
const response = await systemLogsInstancesList({
auth: "Token YOUR_API_TOKEN"
});
console.log('Success:', response);
} catch (error) {
console.error('Error:', error);
}
|
| Name |
Type |
Description |
created_from |
number |
|
created_to |
number |
|
instance |
string |
|
level |
string |
Enum: CRITICAL, ERROR, INFO, WARNING |
level_gte |
integer |
Min level: 20=INFO, 30=WARNING, 40=ERROR, 50=CRITICAL |
logger_name |
string |
|
message |
string |
|
o |
array |
Ordering
|
page |
integer |
A page number within the paginated result set. |
page_size |
integer |
Number of results to return per page. |
source |
string |
Enum: api, worker, beat |
200 -
The response body is an array of objects, where each object has the following structure:
| Field |
Type |
source |
string |
instance |
string |
last_seen |
string (date-time) |
count |
integer |
Get system log statistics
Return log count statistics per source and instance, plus total table size.