본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

TCP 로그 정책 구성 참조

원문 보기 위키 갱신

TCP 로그 정책 구성 참조 (TCP Log Policy Configuration Reference)

이 문서는 TCP 로그 정책(TCP Log Policy)에서 설정할 수 있는 옵션들을 JSON 스키마 형태로 보여주는 구성 참조예요. 로그 데이터를 전송할 대상을 지정하는 host와 port가 필수 항목이고, timeout과 keepalive로 전송 제한 시간과 유휴 연결 유지 시간을 조절하는 방법도 다뤄요. 이어서 tls, tls_sni, ssl_verify 옵션으로 TLS 핸드셰이크 사용 여부, SNI 호스트명, 서버 인증서 검증을 각각 제어하는 법을 설명해요. 마지막에는 custom_fields_by_lua를 써서 Lua 코드 실행 결과로 로그 필드 값을 새로 설정하거나 대체하는 방법까지 소개해요

출처: 문서

본문

{
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "tls_sni": {
          "type": "string",
          "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake."
        },
        "ssl_verify": {
          "type": "boolean",
          "description": "When using TLS, this option enables verification of the certificate presented by the server.",
          "default": true
        },
        "custom_fields_by_lua": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value."
        },
        "host": {
          "type": "string",
          "description": "The IP address or host name to send data to."
        },
        "port": {
          "type": "integer",
          "maximum": 65535,
          "minimum": 0,
          "description": "The port to send data to on the upstream server."
        },
        "timeout": {
          "type": "number",
          "description": "An optional timeout in milliseconds when sending data to the upstream server.",
          "default": 10000
        },
        "keepalive": {
          "type": "number",
          "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.",
          "default": 60000
        },
        "tls": {
          "type": "boolean",
          "description": "Indicates whether to perform a TLS handshake against the remote server.",
          "default": false
        }
      },
      "required": [
        "host",
        "port"
      ]
    }
  }
}

더 알아보기 (Learn more)

이 문서에는 원문에서 추출한 별도의 관련 문서 링크가 없어요.