metrics¶
/usr/local/m2/setting.json
다음 영역에 대해 기술한다.
{
"functions": {
"operations": {
"metrics": {
...
}
}
}
}
labels¶
"labels" : {
"vhost": "vhost"
}
vhost (기본: vhost)
hosting 되는 가상호스트 구분이름
contentType¶
HTTP 응답시점에 Content-Type 헤더를 참조하여 ref-api-metrics-http-content 메트릭을 집계한다.
"contentType" : {
"enable": false,
"values": "img=image/*; mp4video=video/mp4"
}
enable (기본: false)
활성화되면 m2_http_frontend_contenttype 메트릭이 집계/노출된다.
values
집계할 패턴. 아래 형식으로 구성한다.
label=pattern; label=pattern;
패턴과 일치하지 않는 메트릭은
_default_
라벨로 자동 기록된다.
패턴은 입력한 순서대로 매칭되며, 아래와 같이 패턴으로부터 좀 더 구체화된 패턴을 먼저 패치할 것을 권장한다.
"values": "image=image/*; video=video/*; text=text/*; application=/*"
Warning
Content-Type
헤더를 문자 그대로 분석하기 때문에 아래와 같은 MIME이외의 값이 존재한다면 와일드카드를 써야 매칭된다.
Content-Type: text/html; charset=utf-8
histograms¶
Warning
histograms
설정은 실시간 적용이 불가하다. 변경 후 반드시 솔루션을 재가동한다.
"histograms" : [
{
"metric": "m2_http_frontend_tx_ttfb_seconds",
"buckets": [ 0.001 , 0.005 , 0.01 , 0.05 , 0.1 , 0.5 , 1 , 5 , 10 ]
},
{
"metric": "m2_http_frontend_tx_complete_seconds",
"buckets": [ 0.001 , 0.005 , 0.01 , 0.05 , 0.1 , 0.5 , 1 , 5 , 10 ]
},
{
"metric": "m2_http_frontend_responses_cl_size_bytes",
"buckets": [ 100 , 1000 , 10000 , 100000 , 1e+06 , 1e+07 , 1e+08 , 1e+09 , 1e+10 ]
},
{
"metric": "m2_http_frontend_responses_object_size_bytes",
"buckets": [ 100 , 1000 , 10000 , 100000 , 1e+06 , 1e+07 , 1e+08 , 1e+09 , 1e+10 ]
},
{
"metric": "m2_http_backend_tx_ttfb_seconds",
"buckets": [ 0.001 , 0.005 , 0.01 , 0.05 , 0.1 , 0.5 , 1 , 5 , 10 ]
},
{
"metric": "m2_http_backend_tx_complete_seconds",
"buckets": [ 0.001 , 0.005 , 0.01 , 0.05 , 0.1 , 0.5 , 1 , 5 , 10 ]
},
{
"metric": "m2_http_backend_responses_cl_size_bytes",
"buckets": [ 100 , 1000 , 10000 , 100000 , 1e+06 , 1e+07 , 1e+08 , 1e+09 , 1e+10 ]
},
{
"metric": "m2_http_backend_responses_object_size_bytes",
"buckets": [ 100 , 1000 , 10000 , 100000 , 1e+06 , 1e+07 , 1e+08 , 1e+09 , 1e+10 ]
},
{
"metric": "m2_cache_obj_create_size_bytes",
"buckets": [ 100 , 1000 , 10000 , 100000 , 1e+06 , 1e+07 , 1e+08 , 1e+09 , 1e+10 ]
},
{
"metric": "m2_cache_obj_erase_size_bytes",
"buckets": [ 100 , 1000 , 10000 , 100000 , 1e+06 , 1e+07 , 1e+08 , 1e+09 , 1e+10 ]
},
{
"metric": "m2_dims_init_seconds",
"buckets": [ 0.001 , 0.005 , 0.01 , 0.05 , 0.1 , 0.5 , 1 , 5 , 10 ]
},
{
"metric": "m2_dims_complete_seconds",
"buckets": [ 0.001 , 0.005 , 0.01 , 0.05 , 0.1 , 0.5 , 1 , 5 , 10 ]
},
{
"metric": "m2_dims_src_size_bytes",
"buckets": [ 100 , 1000 , 10000 , 100000 , 1e+06 , 1e+07 , 1e+08 ]
},
{
"metric": "m2_dims_src_width_total",
"buckets": [ 100 , 250 , 500 , 750 , 1000 , 1500 ]
},
{
"metric": "m2_dims_src_height_total",
"buckets": [ 100 , 250 , 500 , 750 , 1000 , 1500 , 2500 , 5000 , 10000 , 20000 , 40000 ]
},
{
"metric": "m2_dims_dest_size_bytes",
"buckets": [ 100 , 1000 , 10000 , 100000 , 1e+06 , 1e+07 , 1e+08 ]
},
{
"metric": "m2_dims_dest_width_total",
"buckets": [ 100 , 250 , 500 , 750 , 1000 , 1500 ]
},
{
"metric": "m2_dims_dest_height_total",
"buckets": [ 100 , 250 , 500 , 750 , 1000 , 1500 , 2500 , 5000 , 10000 , 20000 , 40000 ]
},
{
"metric": "m2_mp4hls_playlist_complete_seconds",
"buckets": [ 0.1, 0.5, 1, 5, 10, 20, 30, 60 ]
},
{
"metric": "m2_mp4hls_playlist_src_size_bytes",
"buckets": [ 1e+06, 1e+07, 1e+08, 1e+09, 1e+10 ]
},
{
"metric": "m2_mp4hls_playlist_src_playback_seconds",
"buckets": [ 100, 1000, 10000, 100000 ]
},
{
"metric": "m2_mp3hls_playlist_complete_seconds",
"buckets": [ 0.1, 0.5, 1, 5, 10, 20, 30, 60 ]
},
{
"metric": "m2_mp3hls_playlist_src_size_bytes",
"buckets": [ 100000, 1e+06, 1e+07, 1e+08 ]
},
{
"metric": "m2_mp3hls_playlist_src_playback_seconds",
"buckets": [ 10, 100, 1000, 10000 ]
}
]
metric
대상 메트릭
buckets
대상 메트릭의 bucket 한계값.
+Inf
는 입력하지 않는다.