OpenStack Log API V1 (CURRENT)¶
API versions¶
Lists information for all Venus API versions.
Response codes¶
Success¶
Code |
Reason |
---|---|
1 - Unknown |
Request was successful. |
Error¶
Code |
Reason |
---|---|
-1 - Unknown |
Some content in the request was invalid. |
Response¶
Example List Api Versions: JSON response
{
"v1.0": {
"id": "v1.0",
"status": "SUPPORTED",
"updated": "2014-06-28T12:20:21Z",
"links": [
{
"rel": "describedby",
"type": "text/html",
"href": "http://docs.openstack.org/"
}
],
"media-types": [
{
"base": "application/xml",
"type": "application/vnd.openstack.venus+xml;version=1"
},
{
"base": "application/json",
"type": "application/vnd.openstack.venus+json;version=1"
}
]
}
}
Custom Config¶
Users can customize some important configurations, such as the retention days of ElasticSearch index. However, only these configurations can be read now, implement modification later.
Get all custom config.
Response codes¶
Success¶
Code |
Reason |
---|---|
1 - Unknown |
Request was successful. |
Error¶
Code |
Reason |
---|---|
-1 - Unknown |
Some content in the request was invalid. |
Response¶
Example: JSON response
{
"log_save_days": "30"
}
Search Params¶
Get the value list of one search parameter.
Response codes¶
Success¶
Code |
Reason |
---|---|
0 - Unknown |
Request was successful, but no data caused by some reasons. |
Error¶
Code |
Reason |
---|---|
-1 - Unknown |
Some content in the request was invalid. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
type |
query |
string |
the type of parameter, such as host_name, level, program_name, module_name |
module_name (Optional) |
query |
string |
the module name. |
index_type (Optional) |
query |
string |
the type of elasticsearch index, flog(default):Openstack log, slog:host OS log |
Response¶
Example: JSON response
{
"msg": "OK",
"code": 1,
"values":[
"openstack.ceilometer",
"openstack.keystone",
"openstack.neutron"
]
}
Search logs¶
Search logs.
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
host_name (Optional) |
query |
string |
host name |
module_name (Optional) |
query |
string |
the module name. |
program_name (Optional) |
query |
string |
the program name. |
level (Optional) |
query |
string |
the level of log, such as error, info. |
user_id (Optional) |
query |
string |
the user id. |
project_id (Optional) |
query |
string |
the project id. |
query (Optional) |
query |
string |
the search query for elasticsearch. |
start_time (Optional) |
query |
int |
the start timestamp of time frame. |
end_time (Optional) |
query |
int |
the end timestamp of time frame. |
page_num (Optional) |
query |
int |
the page num, first and default is 1. |
page_size (Optional) |
query |
int |
the size of page, default is 10. |
index_type (Optional) |
query |
string |
the type of elasticsearch index, flog(default):Openstack log, slog:host OS log |
Response codes¶
Success¶
Code |
Reason |
---|---|
1 - Unknown |
Request was successful. |
Error¶
Code |
Reason |
---|---|
0 - Unknown |
Request was successful, but no data caused by some reasons. |
-1 - Unknown |
Some content in the request was invalid. |
Response¶
Example: JSON response
{
"msg": "OK",
"code": 1,
"data":{
"total": 4510027,
"values": [
{
"user_id": "8a89984958192849ac1829400182e2410000",
"level": "info",
"host_name": [
"@skyline-highlighted-field@node31@/skyline-highlighted-field@"
],
"time": "2022-09-10T12:33:35+08:00",
"module_name": "openstack.keystone",
"program_name": "keystone-apache-admin-access",
"project_id": "7e02058126cc4950b75f9970368ba177",
"desc": "100.2.80.232 - - [27/Sep/2019:12:33:35 +0800] \"HEAD /v3/auth/tokens HTTP/1.1\" 200 - 142459 \"-\" \"OpenStack4j / OpenStack Client\""
}
]
},
"data_stats": {
"count": [
{
"key_as_string": "2019-09-26T12:30:00.000+08:00",
"key": 1569472200000,
"doc_count": 60479
},
{
"key_as_string": "2019-09-27T12:30:00.000+08:00",
"key": 1569558600000,
"doc_count": 9171
}
],
"interval_en": "30minutes",
"interval_cn": "30\u5206\u949f"
}
}
Search logs download¶
Download the search logs of all Venus modules.
Response codes¶
Success¶
Code |
Reason |
---|---|
1 - Unknown |
Request was successful. |
Error¶
Code |
Reason |
---|---|
0 - Unknown |
Request was successful, but no data caused by some reasons. |
-1 - Unknown |
Some content in the request was invalid. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
host_name (Optional) |
query |
string |
host name |
module_name (Optional) |
query |
string |
the module name. |
program_name (Optional) |
query |
string |
the program name. |
level (Optional) |
query |
string |
the level of log, such as error, info. |
user_id (Optional) |
query |
string |
the user id. |
project_id (Optional) |
query |
string |
the project id. |
query (Optional) |
query |
string |
the search query for elasticsearch. |
start_time (Optional) |
query |
int |
the start timestamp of time frame. |
page_size (Optional) |
query |
int |
the size of page, default is 10. |
index_type (Optional) |
query |
string |
the type of elasticsearch index, flog(default):Openstack log, slog:host OS log |
Response¶
Example: JSON response
{
"msg": "OK",
"code": 1,
"data": "BASE64XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx"
}
Search analyse logs¶
Search host_name, module_name,program_name,level more informations for all Venus modules analyse logs.
Response codes¶
Success¶
Code |
Reason |
---|---|
1 - Unknown |
Request was successful. |
Error¶
Code |
Reason |
---|---|
0 - Unknown |
Request was successful, but no data caused by some reasons. |
-1 - Unknown |
Some content in the request was invalid. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
group_name |
query |
string |
group name |
host_name (Optional) |
query |
string |
host name |
module_name (Optional) |
query |
string |
the module name. |
program_name (Optional) |
query |
string |
the program name. |
level (Optional) |
query |
string |
the level of log, such as error, info. |
start_time (Optional) |
query |
int |
the start timestamp of time frame. |
end_time (Optional) |
query |
int |
the end timestamp of time frame. |
Response¶
Example: JSON response
{
"msg": "OK",
"code": 1,
"data":{
"count": [
{
"key": "node31",
"doc_count": 4510027
},
{
"key": "node32",
"doc_count": 1865824
},
{
"key": "node34",
"doc_count": 954416
}
],
"title_en": "Program Log Analysis Histogram",
"title_cn": "\u7ec4\u4ef6\u65e5\u5fd7\u5206\u6790\u67f1\u72b6\u56fe"
}
}
Search typical logs¶
Search host_name, module_name,program_name,level more informations for all Venus modules typical error logs.
Response codes¶
Success¶
Code |
Reason |
---|---|
1 - Unknown |
Request was successful. |
Error¶
Code |
Reason |
---|---|
0 - Unknown |
Request was successful, but no data caused by some reasons. |
-1 - Unknown |
Some content in the request was invalid. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
type |
query |
string |
the typical log type, such as error_stats, rabbitmq_error_stats, mysql_error_stats |
start_time (Optional) |
query |
int |
the start timestamp of time frame. |
end_time (Optional) |
query |
int |
the end timestamp of time frame. |
Response¶
Example: JSON response
{
"msg": "OK",
"code": 1,
"data": {
"interval_en": "30minutes",
"interval_cn": "30\u5206\u949f",
"stats": [
{
"count": [
{
"key_as_string": "2019-11-07T14:00:00.000+08:00",
"key": 1573106400000,
"doc_count": 3213
}
],
"total": 78870,
"key": "nova-api"
}
]
}
}
Search instance request_ids¶
Search instance request id from a start time to end time
Response codes¶
Success¶
Code |
Reason |
---|---|
1 - Unknown |
Request was successful. |
Error¶
Code |
Reason |
---|---|
0 - Unknown |
Request was successful, but no data caused by some reasons. |
-1 - Unknown |
Some content in the request was invalid. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
start_time (Optional) |
query |
int |
the start timestamp of time frame. |
end_time (Optional) |
query |
int |
the end timestamp of time frame. |
Response¶
Example: JSON response
{
"msg": "OK",
"code": 1,
"request_ids": [
"4025e53e-1c26-432a-85fc-39638010efc4"
]
}
Search instance callchain¶
Search nova-api, nova-conductor, nova-scheduler and nova-compute informations for all Venus modules instance callchain
Response codes¶
Success¶
Code |
Reason |
---|---|
1 - Unknown |
Request was successful. |
Error¶
Code |
Reason |
---|---|
0 - Unknown |
Request was successful, but no data caused by some reasons. |
-1 - Unknown |
Some content in the request was invalid. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
request_id |
query |
string |
request id. |
Response¶
Example: JSON response
{
"msg": "OK",
"code": 1,
"data": {
"nova-conductor": [
{
"log_num": 3,
"error_log_num": 0,
"start_time": "2019-11-08T09:24:43+08:00",
"hostname": "node32",
"end_time": "2019-11-08T09:24:47+08:00"
}
],
"nova-api": [
{
"log_num": 1,
"error_log_num": 0,
"start_time": "2019-11-08T09:24:42+08:00",
"hostname": "node31",
"end_time": "2019-11-08T09:24:42+08:00"
}
],
"nova-scheduler": [
{
"log_num": 3,
"error_log_num": 0,
"start_time": "2019-11-08T09:24:45+08:00",
"hostname": "node31",
"end_time": "2019-11-08T09:24:43+08:00"
}
],
"nova-compute": [
{
"is_success": 0,
"start_time": "2019-11-08T09:24:48+08:00",
"hostname": "node31",
"end_time": "2019-11-08T09:25:04+08:00"
}
]
}
}