ListSyslogs
Queries system logs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eflo:ListSyslogs |
list |
*Cluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ToTime |
string |
Yes |
The end time. Specify a UNIX timestamp in seconds. |
1665369329 |
| Query |
string |
No |
The query condition. |
* |
| Reverse |
boolean |
No |
Specifies whether to query logs in reverse chronological order. |
true |
| NextToken |
string |
No |
The token for the next page. Include this token when you retrieve the next page of results. |
392e8b4a03ed171433cc39f5b464ec9d |
| NodeId |
string |
Yes |
The node ID. |
e01-cn-nwy37atbj44 |
| FromTime |
string |
Yes |
The start time. Specify a UNIX timestamp in seconds. |
1659745800 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
Id of the request |
2FE2B22C-CF9D-59DE-BF63-DC9B9B33A9D1 |
| NextToken |
string |
The NextToken for the next page. Include this value in the request to retrieve the next page of results. |
563d42ae0b17572449ec8c97f7f66069 |
| Logs |
array<object> |
The paginated list of log objects. |
|
|
object |
The log object. |
||
| ClusterId |
string |
The cluster ID. |
i119583961673208491760 |
| Domain |
string |
The security domain of the client. |
ALIYUN_PUBLIC |
| Facility |
string |
The Linux syslog standard field. |
kern |
| Hostname |
string |
The hostname of the client. |
damo-m53kr8kd-0008 |
| Ip |
string |
The IP address of the client. |
114.55.254.44 |
| Msg |
string |
The syslog content. |
bond4: failed to get link speed/duplex for eth8 |
| NodeId |
string |
The node ID. |
e01-cn-9lb36u4s601 |
| Severity |
string |
The Linux syslog standard field. |
warning |
| Sn |
string |
The unique identifier of the machine. |
21A401332 |
| Source |
string |
The hostname of the syslog server. |
damo-m53kr8kd-0008 |
| Syslogtag |
string |
The Linux syslog standard field. |
kernel |
| TagHostname |
string |
The tag for the hostname. |
damo-m53kr8kd-0008 |
| TagPackId |
string |
The tag for the pack ID. |
D990314D3C25D7E8-1080 |
| TagPath |
string |
The tag for the path. |
/var/log/kern |
| TagReceiveTime |
string |
The tag for the receive time. Specify a UNIX timestamp in seconds. |
1687363348 |
| TagUserDefinedId |
string |
The tag for the user-defined ID. |
application_b |
| Time |
string |
The time in UNIX timestamp format. |
1687363346 |
| Topic |
string |
The topic, which is logserver or log2sls. Both are syslog servers. logserver collects logs over TCP, and log2sls collects logs over UDP. |
logserver |
Examples
Success response
JSON format
{
"RequestId": "2FE2B22C-CF9D-59DE-BF63-DC9B9B33A9D1",
"NextToken": "563d42ae0b17572449ec8c97f7f66069",
"Logs": [
{
"ClusterId": "i119583961673208491760",
"Domain": "ALIYUN_PUBLIC",
"Facility": "kern",
"Hostname": "damo-m53kr8kd-0008",
"Ip": "114.55.254.44",
"Msg": "bond4: failed to get link speed/duplex for eth8",
"NodeId": "e01-cn-9lb36u4s601",
"Severity": "warning",
"Sn": "21A401332",
"Source": "damo-m53kr8kd-0008\n",
"Syslogtag": "kernel",
"TagHostname": "damo-m53kr8kd-0008\n",
"TagPackId": "D990314D3C25D7E8-1080",
"TagPath": "/var/log/kern",
"TagReceiveTime": "1687363348",
"TagUserDefinedId": "application_b",
"Time": "1687363346",
"Topic": "logserver"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.