Skip to main content
Version: 1.1-beta

HTTP Logs

Collect log information from the request gateway and output it to an HTTP server, making it easier for users to perform secondary operations such as log analysis.

Featuresโ€‹

The HTTP log plugin sends node access logs to the HTTP service interface via HTTP requests and has the following features:

  • Supports multiple request methods, including POST, PUT, PATCH
  • Supports custom request headers
  • Supports log output format types
  • Supports custom log formatting configuration

Operation Demonstrationโ€‹

Create a New HTTP Log Configurationโ€‹

  1. Click on System Settings -> Operations and Integration -> Logs -> HTTP Logs in the left navigation bar, and then click Add HTTP Log.

  1. HTTP Log Configuration

Configuration Description:

Field NameDescription
Request MethodThe request method used when requesting the HTTP service interface, currently supports POST, PUT, PATCH
URLFull request path of the HTTP service interface
Request HeaderHeader information for the request, parameters required when requesting the HTTP service interface, such as authentication information.
Please input in JSON format, data should be in key-value format, e.g., {"from":"apinto"}
Output FormatLog content output format, supports single line, Json format output
Format ConfigurationOutput format template, click here for the tutorial

Format Configuration Example

{
"fields": [
"$time_iso8601",
"$request_id",
"@request",
"@proxy",
"@response",
"@status_code",
"@time"
],
"request": [
"$request_method",
"$scheme",
"$request_uri",
"$host",
"$header",
"$remote_addr"
],
"proxy": [
"$proxy_method",
"$proxy_scheme",
"$proxy_uri",
"$proxy_host",
"$proxy_header",
"$proxy_addr"
],
"response": [
"$response_header"
],
"status_code": [
"$status",
"$proxy_status"
],
"time": [
"$request_time",
"$response_time"
]
}