diff --git a/monitoring/grafana/dashboards/ono-backend-overview.json b/monitoring/grafana/dashboards/ono-backend-overview.json index 90a48b86..faccbb37 100644 --- a/monitoring/grafana/dashboards/ono-backend-overview.json +++ b/monitoring/grafana/dashboards/ono-backend-overview.json @@ -564,14 +564,14 @@ }, "targets": [ { - "expr": "topk(20, 1000 * (sum by (uri, method) (rate(http_server_requests_seconds_sum{job=~\"$job\",uri=~\"/api.*\"}[1h])) / clamp_min(sum by (uri, method) (rate(http_server_requests_seconds_count{job=~\"$job\",uri=~\"/api.*\"}[1h])), 1e-9)))", + "expr": "topk(20, 1000 * (sum by (uri, method) (rate(http_server_requests_seconds_sum{job=~\"$job\",uri=~\"/api.*\"}[1h])) / (sum by (uri, method) (rate(http_server_requests_seconds_count{job=~\"$job\",uri=~\"/api.*\"}[1h])) > 0)))", "legendFormat": "{{method}} {{uri}}", "refId": "A" } ], "title": "API 평균 응답시간 (URI Top20, 1h)", "type": "timeseries", - "description": "URI 별 평균. 느린 API 를 찾는 용도다." + "description": "URI 별 평균. 느린 API 를 찾는 용도다. 최근 1시간 요청 수가 늘지 않은 URI 는 값을 비운다. 앱이 재시작되면 요청 수는 그대로인데 시간 합만 늘어나는 경우가 있어서, 0 대신 1e-9 로 나누면 수백만 ms 가 나온다." }, { "datasource": { diff --git a/monitoring/grafana/dashboards/ono-dependency-overview.json b/monitoring/grafana/dashboards/ono-dependency-overview.json index 2e1bd0ae..ee284255 100644 --- a/monitoring/grafana/dashboards/ono-dependency-overview.json +++ b/monitoring/grafana/dashboards/ono-dependency-overview.json @@ -211,9 +211,7 @@ "thresholds": { "mode": "absolute", "steps": [ - {"color": "red", "value": null}, - {"color": "orange", "value": 0.6}, - {"color": "green", "value": 0.9} + {"color": "blue", "value": null} ] }, "unit": "percentunit" @@ -243,6 +241,7 @@ "refId": "A" } ], + "description": "Redis 조회 중 키가 있었던 비율. 인증이 필요한 요청마다 로그아웃 토큰 블랙리스트와 탈퇴 사용자 블랙리스트를 조회하는데(RedisTokenService.isBlacklisted, isUserBlacklisted), 두 키 모두 대부분 없는 것이 정상이라 이 값은 낮게 나온다. 낮다고 장애가 아니라서 경고색을 두지 않는다.", "title": "Redis Hit Ratio", "type": "stat" }, @@ -366,6 +365,9 @@ {"color": "green", "value": 0.99} ] }, + "mappings": [ + {"type": "special", "options": {"match": "null", "result": {"text": "최근 1시간 호출 없음", "color": "#808080", "index": 0}}} + ], "noValue": "최근 1시간 호출 없음", "unit": "percentunit" },