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

StatsD 정책 구성 참조

원문 보기 위키 갱신

StatsD 정책 구성 참조 (StatsD Policy Configuration Reference)

이 문서는 StatsD 정책에서 설정할 수 있는 구성 옵션을 한눈에 확인할 수 있는 참조 자료예요. 메트릭 이름 앞에 붙이는 prefix, 기록을 허용할 상태 코드 범위, TCP 사용 여부, 소비자 식별자 기본값 같은 핵심 필드를 하나씩 설명해 줘요. 특히 큐(queue) 관련 설정을 통해 배치 크기, 병합 지연, 재시도 동작 등을 세밀하게 조정하는 방법도 함께 다루고 있어요

출처: 문서

본문

{
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "queue_size": {
          "type": "integer"
        },
        "prefix": {
          "type": "string",
          "description": "String to prefix to each metric's name.",
          "default": "kong"
        },
        "allow_status_codes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of status code ranges that are allowed to be logged in metrics."
        },
        "use_tcp": {
          "type": "boolean",
          "default": false
        },
        "consumer_identifier_default": {
          "type": "string",
          "enum": [
            "consumer_id",
            "custom_id",
            "username"
          ],
          "default": "custom_id"
        },
        "retry_count": {
          "type": "integer"
        },
        "queue": {
          "type": "object",
          "properties": {
            "concurrency_limit": {
              "type": "integer",
              "enum": [
                -1,
                1
              ],
              "description": "The number of of queue delivery timers. -1 indicates unlimited.",
              "default": 1
            },
            "max_batch_size": {
              "type": "integer",
              "maximum": 1000000,
              "minimum": 1,
              "description": "Maximum number of entries that can be processed at a time.",
              "default": 1
            },
            "max_coalescing_delay": {
              "type": "number",
              "maximum": 3600,
              "minimum": 0,
              "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.",
              "default": 1
            },
            "max_entries": {
              "type": "integer",
              "maximum": 1000000,
              "minimum": 1,
              "description": "Maximum number of entries that can be waiting on the queue.",
              "default": 10000
            },
            "max_bytes": {
              "type": "integer",
              "description": "Maximum number of bytes that can be waiting on a queue, requires string content."
            },
            "max_retry_time": {
              "type": "number",
              "description": "Time in seconds before the queue gives up calling a failed handler for a batch.",
              "default": 60
            },
            "initial_retry_delay": {
              "type": "number",
              "maximum": 1000000,
              "minimum": 0.001,
              "description": "Time in seconds before the initial retry is made for a failing batch.",
              "default": 0.01
            },
            "max_retry_delay": {
              "type": "number",
              "maximum": 1000000,
              "minimum": 0.001,
              "description": "Maximum time in seconds between retries, caps exponential backoff.",
              "default": 60
            }
          }
        },
        "host": {
          "type": "string",
          "description": "The IP address or hostname of StatsD server to send data to.",
          "default": "localhost"
        },
        "service_identifier_default": {
          "type": "string",
          "enum": [
            "service_host",
            "service_id",
            "service_name",
            "service_name_or_host"
          ],
          "default": "service_name_or_host"
        },
        "flush_timeout": {
          "type": "number"
        },
        "port": {
          "type": "integer",
          "maximum": 65535,
          "minimum": 0,
          "description": "The port of StatsD server to send data to.",
          "default": 8125
        },
        "metrics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "cache_datastore_hits_total",
                  "cache_datastore_misses_total",
                  "kong_latency",
                  "latency",
                  "request_count",
                  "request_per_user",
                  "request_size",
                  "response_size",
                  "shdict_usage",
                  "status_count",
                  "status_count_per_user",
                  "status_count_per_user_per_route",
                  "status_count_per_workspace",
                  "unique_users",
                  "upstream_latency"
                ],
                "description": "StatsD metric’s name."
              },
              "stat_type": {
                "type": "string",
                "enum": [
                  "counter",
                  "gauge",
                  "histogram",
                  "meter",
                  "set",
                  "timer"
                ],
                "description": "Determines what sort of event a metric represents."
              },
              "sample_rate": {
                "type": "number",
                "description": "Sampling rate"
              },
              "consumer_identifier": {
                "type": "string",
                "enum": [
                  "consumer_id",
                  "custom_id",
                  "username"
                ],
                "description": "Authenticated user detail."
              },
              "service_identifier": {
                "type": "string",
                "enum": [
                  "service_host",
                  "service_id",
                  "service_name",
                  "service_name_or_host"
                ],
                "description": "Service detail."
              },
              "workspace_identifier": {
                "type": "string",
                "enum": [
                  "workspace_id",
                  "workspace_name"
                ],
                "description": "Workspace detail."
              }
            },
            "required": [
              "name",
              "stat_type"
            ]
          },
          "description": "List of metrics to be logged."
        },
        "workspace_identifier_default": {
          "type": "string",
          "enum": [
            "workspace_id",
            "workspace_name"
          ],
          "default": "workspace_id"
        },
        "udp_packet_size": {
          "type": "number",
          "maximum": 65507,
          "minimum": 0,
          "default": 0
        },
        "hostname_in_prefix": {
          "type": "boolean",
          "default": false
        },
        "tag_style": {
          "type": "string",
          "enum": [
            "dogstatsd",
            "influxdb",
            "librato",
            "signalfx"
          ]
        }
      }
    }
  }
}

더 알아보기 (Learn more)

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