Set Classic server log collection information
- Print
- PDF
Set Classic server log collection information
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.
Description
This configures the log collection for the server.
Set Classic server log collection information
This is an API to set log collection information for servers on the Classic Platform.
Request URL
POST https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/classic/servers/collecting-infos
Request headers
Header name | Description |
---|---|
x-ncp-apigw-timestamp | It indicates the elapsed time in milliseconds since January 1, 1970 00:00:00 UTC Request is considered invalid if the timestamp differs from the current time by more than 5 minutes x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-apigw-api-key | Key value issued by API gatewayx-ncp-apigw-api-key:{API Gateway API Key} |
x-ncp-iam-access-key | Value of access key ID issued in the NAVER Cloud Platform portalx-ncp-iam-access-key:{Account Access Key} |
x-ncp-apigw-signature-v2 | Signature encrypted with the access key ID value and secret keyx-ncp-apigw-signature-v2:{API Gateway Signature} |
Content-Type | Specify the request body content type as application/jsonContent-Type: application/json |
Request body
Parameter name | Parameter description | Required | Available Values | Data Type |
---|---|---|---|---|
logPath | Path of the log to be collected | Y | E.g., /var/log/messages, /var/log/secure* | String |
logTemplate | Template of the log to be collected | Y | E.g., CUSTOM_LOG, APACHE, TOMCAT | String |
logType | Log type | Y | E.g., SYSLOG, security_log, apache, tomcat | String |
osType | OS Type of the log to be collected | Y | Use the osName value from the Get server list API | String |
servername | Name of the log to be collected | Y | Use the servername value from the Get server list API E.g., cla-test | String |
instanceNo | instanceNo of the log to be collected | Y | Use the instanceNo value from the Get server list API E.g., 1234567 | Integer |
ip | IP address of the log to be collected | Y | Use the privateIp value from the Get server list API E.g., 123.123.123.123 | String |
Request example
POST https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/vpc/servers/collecting-infos
HOST: cloudloganalytics.apigw.ntruss.com
Content-Type: application/json
x-ncp-apigw-signature-v2: FJSBB4K3XnaGAvVe0Hzj3/2hfNWvgLHR1rQHW2Et2Rs=
x-ncp-apigw-timestamp: 1593848345548
x-ncp-iam-access-key: 11IKBWgQegM4DwiJL4mo
{
"collectingInfos": [
{
"logPath": "/var/log/messages",
"logTemplate": "SYSLOG",
"logType": "SYSLOG",
"servername": "s172353dfd86",
"osType": "Rocky Linux 8.8",
"ip": "123.123.123.123",
"instanceNo": 1111111,
"macAddr": "FF:FF:FF:FF:FF:FF"
},
{
"logPath": "/var/log/mysql/error.log",
"logTemplate": "MySQL",
"logType": "mysql_error",
"servername": "s172353dfd86",
"osType": "Rocky Linux 8.8",
"ip": "123.123.123.123",
"instanceNo": 1111111,
"macAddr": "FF:FF:FF:FF:FF:FF"
}
]
}
curl -X POST "https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/vpc/servers/collecting-infos"
-H "accept: application/json"
-H "Content-Type: application/json"
-H "x-ncp-iam-access-key: 11IKBWgQegM4DwiJL4mo"
-H "x-ncp-apigw-timestamp: 1594025530536"
-H "x-ncp-apigw-signature-v2: ql8l9dfegxM4gMtVozTZH7kOdjsOB0FLdDvLRkvFPks="
-d "{\"collectingInfos\": [{ \"logPath\": \"/var/log/messages\", \"logTemplate\": \"SYSLOG\", \"logType\": \"SYSLOG\", \"servername\": \"s172353dfd86\", \"osType\": \"Rocky Linux 8.8\", \"ip\": \"123.123.123.123\", \"instanceNo\": 1111111},{ \"logPath\": \"/var/log/mysql/error.log\", \"logTemplate\": \"MySQL\", \"logType\": \"mysql_error\", \"servername\": \"s172353dfd86\", \"osType\": \"Rocky Linux 8.8\", \"ip\": \"123.123.123.123\", \"instanceNo\": 1111111,\"macAddr\": \"FF:FF:FF:FF:FF:FF\"}]}"
Response example
{
"code": 0,
"message": "The request has been successfully processed.",
"result": {
"configKey": "6e08a5ce0feb4abcda330f8913f684aa",
"usage": "curl -s http://beta-vccm.ncloud.com/setUpClaVPC/6e08a5ce0abcdeddad330f8913f684aa | sudo sh"
}
}
Was this article helpful?