Configuring Log Collection Paths
Function
This API is used to configure the log collection paths of a specified ICAgent. This API applies only to configurations of log collection paths on the Log > Path Configuration page of the Application Operations Management (AOM) console.
URI
POST /v2/{project_id}/log-paths
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Obtaining the Account Tenant ID, Log Group ID, and Log Stream ID. Minimum: 32 Maximum: 32 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. Default value: None. Minimum length: 1000 characters. Maximum length: 2000 characters. Minimum: 1000 Maximum: 2000 |
Content-Type |
Yes |
String |
Set this parameter to application/json;charset=utf8. Default value: None. Minimum length: 29 characters. Maximum length: 29 characters. Minimum: 29 Maximum: 29 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
agent_config_infos |
Yes |
Array of AgentConfInfo objects |
ICAgent collection path configuration array. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
agent_id |
Yes |
String |
The unique ID of ICAgent. Minimum length: 36 characters. Maximum length: 36 characters. Minimum: 36 Maximum: 36 |
log_paths |
Yes |
Array of strings |
List of log collection paths. Minimum length: 0 characters. Maximum length: 20 characters. Minimum: 0 Maximum: 20 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
result |
String |
The return result is empty. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
Status code: 503
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
Example Requests
POST https://{endpoint}/v2/${project_id}/log-paths { "agent_config_infos" : [ { "agent_id" : "c44fd66b-4bf5-4424-8c13-a2bfc927f51d", "log_paths" : [ "/log/trace.log", "/var/ICAgent" ] } ] }
Example Responses
Status code: 200
The request is successful. The log collection path is configured.
{ "errorCode" : "SVCSTG.ALS.200.200", "errorMessage" : "ES INSERT SUCCESSFULLY.", "result" : null }
Status code: 401
The authentication information is incorrect or invalid.
{ "errorCode" : "SVCSTG.ALS.403.105", "errorMessage" : "Project id is invalid." }
Status Codes
Status Code |
Description |
---|---|
200 |
The request is successful. The log collection path is configured. |
400 |
BadRequest. Invalid request. Modify the request based on the description in error_msg before a retry. |
401 |
The authentication information is incorrect or invalid. |
500 |
Internal server error. |
503 |
ServiceUnavailable. The requested service is unavailable. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot