After logs are shipped from Simple Log Service to Object Storage Service (OSS), the logs can be saved as a file in different formats. This topic describes the JSON format.
Parameters
If you set Storage Format to json when you create a data shipping job of the new version, you must configure the parameters, as shown in the following figure. For more information, see Create an OSS data shipping job (new version).
Parameter | Description |
Ship Tags | Specifies whether to ship the tag field of logs, for example, __tag__:abc. |
Sample URLs of OSS files
After logs are shipped to OSS, the logs are stored in OSS buckets. The following table provides the sample URLs of the OSS files that store the logs.
If you specify a file extension when you create a shipping job, the files that are shipped to OSS use the extension.
If you do not specify a file extension when you create a shipping job, the extension is determined by the compression type of the file.
Compression type | File extension | Sample URL | Description |
Not compressed | If you specify a file extension when you create a shipping job, the files that are shipped to OSS use the extension, for example, .json. | oss://oss-shipper-chengdu/ecs_test/2022/01/26/20/54_1453812893059571256_937.json | You can download the OSS file to your computer and open the file as a text file. Sample file:
|
If you do not specify a file extension when you create a shipping job, the files that are shipped to OSS do not have an extension. | oss://oss-shipper-chengdu/ecs_test/2022/01/26/20/54_1453812893059571256_937 | ||
Snappy | If you specify a file extension when you create a shipping job, the files that are shipped to OSS use the extension, for example, .json. | oss://oss-shipper-chengdu/ecs_test/2022/01/26/20/54_1453812893059571256_937.json | For information about how to decompress a file that is compressed by using Snappy, see Decompression tools for Snappy-compressed files. |
If you do not specify a file extension when you create a shipping job, the files that are shipped to OSS use the .snappy extension. | oss://oss-shipper-chengdu/ecs_test/2022/01/26/20/54_1453812893059571256_937.snappy | ||
GZIP | If you specify a file extension when you create a shipping job, the files that are shipped to OSS use the extension, for example, .json. | oss://oss-shipper-chengdu/ecs_test/2022/01/26/20/54_1453812893059571256_937.json | To decompress a file that is compressed by using GZIP, run the gzip command. |
If you do not specify a file extension when you create a shipping job, the files that are shipped to OSS use the .gz extension. | oss://oss-shipper-chengdu/ecs_test/2022/01/26/20/54_1453812893059571256_937.gz | ||
ZSTD | If you specify a file extension when you create a shipping job, the files that are shipped to OSS use the extension, for example, .json. | oss://oss-shipper-chengdu/ecs_test/2022/01/26/20/54_1453812893059571256_937.json | To decompress a file that is compressed by using ZSTD, run the zstd command. |
If you do not specify a file extension when you create a shipping job, the files that are shipped to OSS use the .zst extension. | oss://oss-shipper-chengdu/ecs_test/2022/01/26/20/54_1453812893059571256_937.zst |