StatsD 플러그인 구성 참조
StatsD 플러그인 구성 참조 (StatsD Plugin Configuration Reference)
이 문서는 Kong의 StatsD 플러그인에서 설정할 수 있는 모든 구성 파라미터를 정리한 참조 문서예요. host, flush_timeout, metrics 같은 각 필드의 설명과 기본값, 허용되는 값들을 스키마 형태로 한눈에 확인할 수 있어요. StatsD 플러그인으로 메트릭 수집 환경을 구성할 때 필요한 옵션을 정확히 찾아보고 싶다면 이 문서를 참고하면 좋아요
출처: 문서
본문
{
"properties": {
"config": {
"properties": {
"allow_status_codes": {
"description": "List of status code ranges that are allowed to be logged in metrics.",
"items": {
"type": "string"
},
"type": "array"
},
"consumer_identifier_default": {
"default": "custom_id",
"enum": [
"consumer_id",
"custom_id",
"username"
],
"type": "string"
},
"flush_timeout": {
"type": "number"
},
"host": {
"default": "localhost",
"description": "The IP address or hostname of StatsD server to send data to.",
"type": "string"
},
"hostname_in_prefix": {
"default": false,
"type": "boolean"
},
"metrics": {
"description": "List of metrics to be logged.",
"items": {
"properties": {
"consumer_identifier": {
"description": "Authenticated user detail.",
"enum": [
"consumer_id",
"custom_id",
"username"
],
"type": "string"
},
"name": {
"description": "StatsD metric’s name.",
"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"
],
"type": "string"
},
"sample_rate": {
"description": "Sampling rate",
"type": "number"
},
"service_identifier": {
"description": "Service detail.",
"enum": [
"service_host",
"service_id",
"service_name",
"service_name_or_host"
],
"type": "string"
},
"stat_type": {
"description": "Determines what sort of event a metric represents.",
"enum": [
"counter",
"gauge",
"histogram",
"meter",
"set",
"timer"
],
"type": "string"
},
"workspace_identifier": {
"description": "Workspace detail.",
"enum": [
"workspace_id",
"workspace_name"
],
"type": "string"
}
},
"required": [
"name",
"stat_type"
],
"type": "object"
},
"type": "array"
},
"port": {
"default": 8125,
"description": "The port of StatsD server to send data to.",
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"prefix": {
"default": "kong",
"description": "String to prefix to each metric's name.",
"type": "string"
},
"queue": {
"properties": {
"breaker_cooldown": {
"default": 60,
"description": "Time in seconds the circuit breaker stays open (fast-shedding entries) before it allows a single batch through to probe whether the destination has recovered.",
"maximum": 1000000,
"minimum": 0,
"type": "number"
},
"concurrency_limit": {
"default": 1,
"description": "The number of of queue delivery timers. -1 indicates unlimited.",
"enum": [
-1,
1
],
"type": "integer"
},
"failure_threshold": {
"default": 0,
"description": "Number of consecutive failed batches after which the queue opens its circuit breaker and drops entries instead of retrying. 0 disables the circuit breaker.",
"maximum": 1000000,
"minimum": 0,
"type": "integer"
},
"initial_retry_delay": {
"default": 0.01,
"description": "Time in seconds before the initial retry is made for a failing batch.",
"maximum": 1000000,
"minimum": 0.001,
"type": "number"
},
"max_batch_size": {
"default": 1,
"description": "Maximum number of entries that can be processed at a time.",
"maximum": 1000000,
"minimum": 1,
"type": "integer"
},
"max_bytes": {
"description": "Maximum number of bytes that can be waiting on a queue, requires string content.",
"type": "integer"
},
"max_coalescing_delay": {
"default": 1,
"description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.",
"maximum": 3600,
"minimum": 0,
"type": "number"
},
"max_entries": {
"default": 10000,
"description": "Maximum number of entries that can be waiting on the queue.",
"maximum": 1000000,
"minimum": 1,
"type": "integer"
},
"max_retry_delay": {
"default": 60,
"description": "Maximum time in seconds between retries, caps exponential backoff.",
"maximum": 1000000,
"minimum": 0.001,
"type": "number"
},
"max_retry_time": {
"default": 60,
"description": "Time in seconds before the queue gives up calling a failed handler for a batch.",
"type": "number"
}
},
"type": "object"
},
"queue_size": {
"type": "integer"
},
"retry_count": {
"type": "integer"
},
"service_identifier_default": {
"default": "service_name_or_host",
"enum": [
"service_host",
"service_id",
"service_name",
"service_name_or_host"
],
"type": "string"
},
"tag_style": {
"enum": [
"dogstatsd",
"influxdb",
"librato",
"signalfx"
],
"type": "string"
},
"udp_packet_size": {
"default": 0,
"maximum": 65507,
"minimum": 0,
"type": "number"
},
"use_tcp": {
"default": false,
"type": "boolean"
},
"workspace_identifier_default": {
"default": "workspace_id",
"enum": [
"workspace_id",
"workspace_name"
],
"type": "string"
}
},
"type": "object"
},
"consumer": {
"additionalProperties": false,
"description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
},
"expressions": {
"additionalProperties": true,
"type": "object"
},
"protocols": {
"default": [
"grpc",
"grpcs",
"http",
"https"
],
"description": "A set of strings representing protocols.",
"items": {
"description": "A string representing a protocol, such as HTTP or HTTPS.",
"enum": [
"grpc",
"grpcs",
"http",
"https",
"tcp",
"tls",
"tls_passthrough",
"udp",
"ws",
"wss"
],
"type": "string"
},
"type": "array"
},
"route": {
"additionalProperties": false,
"description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
},
"service": {
"additionalProperties": false,
"description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
}
관련 리소스
더 알아보기 (Learn more)
- StatsD 플러그인을 실제로 설정해서 Kong Gateway 메트릭을 수집하는 방법을 단계별로 안내하는 튜토리얼이에요 — Collect Kong Gateway metrics with the StatsD plugin