- Print
- PDF
HTTP SDK
- Print
- PDF
Available in Classic and VPC
You can transfer log data in JSON format to Effective Log Search & Analytics 2.0's collecting server by using HTTPS protocol.
Log transferring information
Check the following items to transfer logs in HTTPS/JSON format:
API URL
Call method
Request body(JSON format) and field
Log transfer examples
API URL
Use the following address when transferring logs to the Effective Log Search & Analytics 2.0 server in HTTPS:
https://elsa-v2-col.ncloud.com/_store
Call method
Use PUT or POST method as the call method.
Request body and field
Write the request body in JSON format as follows:
{
"txtToken": "2xxxx10e221b4d06a870a06e9c5axxxx",
"projectName": "72356c50401b8e20_testproject",
"projectVersion": "1.0.0",
"body": "This log message come from HTTPS client.",
"host": "localhost",
"logType": "nelo2-log"
}
Fields that can be entered in the request body in JSON format are as follows:
Field | Type | Requirement status | Description |
---|---|---|---|
txtToken | string | Required | The txtToken registered to NELO when the project was created (refer to View project details) |
projectName | string | Required | The project key registered to NELO when the project was created (refer to View project details) |
projectVersion | string | Required | Project version (Default: 1.0.0)
|
body | string | Required | Log message
|
host | string | Options | Log transfer location (Default: TCP's peer-address) |
logType | string | Options | Identifies log type (Default: nelo2-log) |
- To apply a symbol file, the version of the symbol file should be identical to the
projectVersion
key value. logTime
andsendTime
parameters are used in the system of Effective Log Search & Analytics 2.0 service. Entering both parameters does not make them both apply.
HTTP SDK log transfer examples
PUT and POST method is only supported when transferring HTTPS logs. Refer to the following log transfer examples by method to transfer logs.
Check if all transfer information, such as API URL and field, is correct before transferring logs so that the log transfer does not fail.
POST method example
The following is an example of using POST method.
$ curl -XPOST 'https://elsa-v2-col.ncloud.com/_store' -d '{
"txtToken": "2xxxx10e221b4d06a870a06e9c5axxxx",
"projectName": "72356c50401b8e20_testproject",
"projectVersion": "1.0.0",
"body": "This log message come from HTTPS client.",
"host": "localhost",
"logType": "nelo2-log"
}'
PUT method example
The following is an example of using PUT method.
$ curl -XPUT 'https://elsa-v2-col.ncloud.com/_store' -d '{
"txtToken": "2xxxx10e221b4d06a870a06e9c5axxxx",
"projectName": "72356c50401b8e20_testproject",
"projectVersion": "1.0.0",
"body": "This log message come from HTTPS client.",
"host": "localhost",
"logType": "nelo2-log"
}'