Set VPC server log collection information
    • PDF

    Set VPC server log collection information

    • PDF

    Article summary

    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.

    This configures the log collection for the server.

    Set VPC server log collection information

    This is an API to set log collection information for servers on the VPC Platform.

    Request URL

    POST https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/vpc/servers/collecting-infos
    

    Request headers

    Header nameDescription
    x-ncp-apigw-timestampThis is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC, and the 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-keyKey value issued by API gateway
    x-ncp-apigw-api-key:{API Gateway API Key}
    x-ncp-iam-access-keyValue of access key ID issued in the NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with the access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeSpecify the request body content type as application/json
    Content-Type: application/json

    Request body

    Parameter nameParameter descriptionRequiredAvailable ValuesData Type
    logPathPath of the log to be collectedYE.g., /var/log/messages, /var/log/secure*String
    logTypeLog typeYE.g., SYSLOG, security_log, apache, tomcatString
    logTemplateTemplate of the log to be collectedYE.g., CUSTOM_LOG, APACHE, TOMCATString
    osTypeOS Type of the log to be collectedYUse the osName value from the Get server list APIString
    servernameName of the log to be collectedYUse the servername value from the Get server list API
    E.g., cla-test
    String
    instanceNoinstanceNo of the log to be collectedYUse the instanceNo value from the Get server list API
    E.g., 1234567
    Integer
    ipIP address of the log to be collectedNUse the privateIp value from the Get server list API
    E.g., 123.123.123.123
    String
    macAddrmacAddress of the server to collect fromYUse the macAddr value from the Get server list API
    E.g., "FF:FF:FF:FF:FF:FF"
    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?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.