Skip to main content
Get the logs

Get the logs

For your information

You can only get logs for balancers for which logging enabled.

You can:

Logs can be retrieved using:

The address (URL) can be viewed in URL list.

Get a list of log groups

Execute the request:

curl -i \
-H 'X-Auth-Token: <x_auth_token>' \
'https://<pool>.logs.selcloud.ru/v1/groups?limit=50'

Specify:

If there are no log groups, you will get an answer:

{"groups":[]}

If there are log groups, you will get a response as a list in JSON format. Example response:

{
"groups": [
{
"name": "s/lbaas/Bellatrix-lb",
"created_at": 1742663023757
},
{
"name": "group-name",
"created_at": 1738779717218
},
{
"name": "s/lbaas/test-lb-for-logs",
"created_at": 1743073180613
}
]
}

Get a list of event streams

Execute the request:

curl -i \
-H 'X-Auth-Token: <x_auth_token>' \
'https://<pool>.logs.selcloud.ru/v1/streams?group=<log_group_name>&sort=asc'

Specify:

  • <x_auth_token> — X-Auth-Token (scope: project);
  • <pool> — pool where the logging platform is located, e.g. ru-8. The address (URL) depends on the region and pool, you can look in the URL list;
  • <log_group_name> — log group name, e.g. s/lbaas/Bellatrix-lb.

Example answer:

{"streams":[{"name":"http-b964dde5-7080-4169-8f9e-127bd59c89ca","created_at":1742663023793}]}

Get events

Example of a query to retrieve 10 events:

curl -i \
-H 'X-Auth-Token: <x_auth_token>' \
'https://<pool>.logs.selcloud.ru/v1/events?group=<log_group_name>&stream=<stream_name>&sort=desc&limit=10'

Specify:

  • <x_auth_token> — X-Auth-Token (scope: project);
  • <pool> — pool where the logging platform is located, e.g. ru-8. The address (URL) depends on the region and pool, you can look in the URL list;
  • <log_group_name> — log group name, e.g. s/lbaas/Bellatrix-lb;
  • <stream_name> — event stream name, e.g. http-b964dde5-7080-4169-8f9e-127bd59c89ca.

Example answer:

{
"events": [
{
"id": "6b050a98-8810-4832-b0fe-aee56e34b682",
"ingestion": 1742920694862,
"message": "{\"loadbalancer_id\":\"b964dde5-7080-4169-8f9e-127bd59c89ca\",\"client\":\"10.10.10.10:61076\",\"server_queue\":\"0\",\"backend\":\"0c7498bf-e053-43a8-ba19-4550c9d9904d:3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"bytes_out\":\"354\",\"backend_connections\":\"0\",\"destination\":\"192.168.0.18:80\",\"bytest_in\":\"991\",\"termination_state\":\"--\",\"server\":\"ac64ca54-952f-4881-8a54-6ff77baa1e91\",\"frontend_connections\":\"1\",\"backend_queue\":\"0\",\"elapsed\":\"4\",\"frontend\":\"3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"server_connections\":\"0\"}",
"timestamp": 1742920687071
},
{
"id": "687feab8-6eb9-4ef1-95ed-92259b6bce4a",
"ingestion": 1742920697233,
"message": "{\"loadbalancer_id\":\"b964dde5-7080-4169-8f9e-127bd59c89ca\",\"client\":\"10.10.10.10:61076\",\"server_queue\":\"0\",\"backend\":\"0c7498bf-e053-43a8-ba19-4550c9d9904d:3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"bytes_out\":\"413\",\"backend_connections\":\"0\",\"destination\":\"192.168.0.18:80\",\"bytest_in\":\"1039\",\"termination_state\":\"--\",\"server\":\"ac64ca54-952f-4881-8a54-6ff77baa1e91\",\"frontend_connections\":\"1\",\"backend_queue\":\"0\",\"elapsed\":\"9\",\"frontend\":\"3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"server_connections\":\"0\"}",
"timestamp": 1742920687061
},
{
"id": "63a9fac7-f68e-4540-8419-55e9ef7d426f",
"ingestion": 1742920615179,
"message": "{\"loadbalancer_id\":\"b964dde5-7080-4169-8f9e-127bd59c89ca\",\"client\":\"10.10.10.10:61074\",\"server_queue\":\"0\",\"backend\":\"0c7498bf-e053-43a8-ba19-4550c9d9904d:3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"bytes_out\":\"78\",\"backend_connections\":\"0\",\"destination\":\"192.168.0.18:80\",\"bytest_in\":\"680\",\"termination_state\":\"--\",\"server\":\"ac64ca54-952f-4881-8a54-6ff77baa1e91\",\"frontend_connections\":\"1\",\"backend_queue\":\"0\",\"elapsed\":\"3\",\"frontend\":\"3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"server_connections\":\"0\"}",
"timestamp": 1742920605822
},
{
"id": "a684a2c7-4d3a-4d78-8bdf-d61ab45ce723",
"ingestion": 1742918217458,
"message": "{\"loadbalancer_id\":\"b964dde5-7080-4169-8f9e-127bd59c89ca\",\"client\":\"10.10.10.10:54460\",\"server_queue\":\"0\",\"backend\":\"3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"bytes_out\":\"0\",\"backend_connections\":\"0\",\"destination\":\"-:-\",\"bytest_in\":\"0\",\"termination_state\":\"CR\",\"server\":\"\u003cNOSRV\u003e\",\"frontend_connections\":\"2\",\"backend_queue\":\"0\",\"elapsed\":\"17\",\"frontend\":\"3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"server_connections\":\"0\"}",
"timestamp": 1742918210144
},
{
"id": "d1bf4c22-dee0-424a-a6b5-933c3d2c19f2",
"ingestion": 1742918217458,
"message": "{\"loadbalancer_id\":\"b964dde5-7080-4169-8f9e-127bd59c89ca\",\"client\":\"10.10.10.10:54459\",\"server_queue\":\"0\",\"backend\":\"3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"bytes_out\":\"0\",\"backend_connections\":\"0\",\"destination\":\"-:-\",\"bytest_in\":\"0\",\"termination_state\":\"CR\",\"server\":\"\u003cNOSRV\u003e\",\"frontend_connections\":\"2\",\"backend_queue\":\"0\",\"elapsed\":\"17\",\"frontend\":\"3ae8b472-d305-4ef0-8093-d43c87bc3646\",\"server_connections\":\"0\"}",
"timestamp": 1742918210143
}
],
"pages": {
"next": "1d1bf4c22dee0424aa6b5933c3d2c19f2174291821014300",
"prev": "06b050a9888104832b0feaee56e34b682174292068707100"
}
}