이상은 비정상적이거나 예상치 못한 API 데이터 패턴입니다. 예를 들어 아래에서 API 오류율을 그래프를 살펴봅니다.
보시다시피 오류율은 오전 7시에 갑자기 증가합니다. 이 시점까지의 데이터와 비교했을 때 이러한 증가는 이상으로 분류하기에 충분할 정도로 비정상적입니다.
하지만 API 데이터의 모든 편차가 이상을 반영하는 것은 아닙니다. 대부분 무작위 변동입니다. 예를 들어 오류율에서 최대한의 경우 이상으로 여겨질 수 있는 비교적 사소한 편차가 나타나더라도 이것만으로는 실제로 이상이라고 부르기에 충분하지 않습니다.
AAPI Ops에서는 API 데이터를 지속적으로 모니터링하고 통계 분석을 수행하여 실제 이상을 데이터의 무작위 변동과 구분합니다.
이상 감지가 없으면 각 이상을 직접 감지하도록 기준을 선택해야 합니다. 기준은 이상을 트리거하기 위해 오류율과 같은 수량이 도달해야 하는 값입니다. 또한 최신 데이터를 기반으로 기준 값을 최신 상태로 유지해야 합니다.
이와 반대로 AAPI-Ops는 최신 데이터 패턴을 기반으로 최적의 이상 기준을 선택합니다.
AAPI가 위에 표시된 것과 같은 이상을 감지하면 이상 이벤트 대시보드에 이상 세부정보가 표시됩니다.
이 시점에서 API Monitoring 대시보드의 이상을 조사하고 필요한 경우 적절한 조치를 취할 수 있습니다. 또한 나중에 비슷한 이벤트가 발생하면 이를 알리도록 알림을 만들 수도 있습니다.
감지된 이상은 다음 정보를 포함합니다.
프록시 지연 시간이나 HTTP 오류 코드와 같은 이상을 일으킨 측정항목입니다.
이상의 심각도입니다. 심각도는 모델의 신뢰도 수준에 따라 적음, 보통, 심각일 수 있습니다. 신뢰도 수준이 낮으면 심각도가 적음을 나타내고 높은 신뢰도 수준은 심각함을 나타냅니다.
이상 감지는 이전 시계열 데이터에서 API 프록시 동작의 모델을 학습하는 방식으로 작동합니다. 모델 학습을 위해 개발자가 별도로 취해야 할 조치는 없습니다. Apigee는 지난 6시간 동안의 API 데이터에서 자동으로 모델을 만들고 학습합니다.
따라서 Apigee는 이상치를 로깅하기 전에 모델을 학습하기 위해 API 프록시에 대한 최소 6시간의 데이터가 필요합니다.
학습의 목표는 모델의 정확성을 개선하는 것이며 그런 다음 과거 데이터에서 테스트할 수 있습니다. 모델의 정확성을 테스트하는 가장 간단한 방법은 오류율(거짓양성 및 거짓음성의 합계를 총 예측 이벤트 수로 나눈 값)을 계산하는 것입니다.
이상 이벤트 로깅
런타임에 Apigee 이상 감지는 API 프록시의 현재 동작을 모델에서 예측한 동작과 비교합니다. 이상 감지는 특정 신뢰도 수준을 사용하여 운영 측정항목이 예측 값을 초과하는 시기를 확인할 수 있습니다. 예를 들어 5xx 오류 비율이 모델이 예측하는 비율을 초과할 때입니다.
Apigee는 이상을 감지하면 이상 이벤트 대시보드에 이벤트를 자동으로 로깅합니다. 대시보드에 표시되는 이벤트 목록에는 감지된 모든 이상과 트리거된 알림이 포함됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-18(UTC)"],[[["\u003cp\u003eThis content explains how Apigee and Apigee hybrid use anomaly detection to identify unusual API data patterns, distinguishing them from random fluctuations.\u003c/p\u003e\n"],["\u003cp\u003eAnomaly detection in Apigee involves training models from historical API data to establish expected behavior, and it automatically sets anomaly thresholds, unlike manual threshold setup.\u003c/p\u003e\n"],["\u003cp\u003eApigee detects increases in specific HTTP errors (503, 504, and all 4xx/5xx) and total response latency (90th percentile) at various levels (organization, environment, and region).\u003c/p\u003e\n"],["\u003cp\u003eWhen an anomaly is detected, Apigee logs the event, including details like the affected metric and severity level, in the Anomaly Events dashboard, where you can further investigate the issue.\u003c/p\u003e\n"]]],[],null,["# About anomaly detection\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\n| **Important:** \"Anomaly Detection\" describes the Advanced API Operations Anomaly Detection functionality, which is available in the Classic Apigee UI. This functionality is comparable to the \"Operations Anomalies\" functionality in [Apigee UI in Cloud console](https://console.cloud.google.com/apigee). Both are available at this time. See [Operations Anomalies overview](/apigee/docs/api-platform/analytics/operations-anomalies-overview) for information on the Operations Anomalies functionality.\n\nWhat is an anomaly?\n-------------------\n\nAn *anomaly* is an unusual or unexpected API data pattern. For example,\ntake a look at the graph of API error rate below:\n\nAs you can see, the error rate suddenly jumps up at around 7 AM. Compared\nto the data leading up to that time, this increase is unusual enough to be classified as an anomaly.\n\nHowever, not all variations in API data represent anomalies: most\nare simply random fluctuations. For example, you can see some relatively minor variations in\nerror rate leading up to the anomaly, but these are not significant enough to be called a true\nanomaly.\n\nAAPI Ops continually monitors API data and performs statistical analysis to distinguish true\nanomalies from random fluctuations in the data.\n\nWithout anomaly detection, you need to choose a *threshold* for detecting each\nanomaly yourself. (A threshold is a value that a quantity, such as error rate, must reach to trigger\nan anomaly.) You also need to keep the threshold values up to date, based on the latest data.\nBy contrast, AAPI-Ops chooses the best anomaly thresholds for you, based on recent\ndata patterns.\n\nWhen AAPI detects an anomaly like the one shown above, it displays the anomaly details in the\n[Anomaly Events dashboard](/apigee/docs/aapi-ops/anomaly-detect-ui).\nAt this point, you can investigate the anomaly in the API Monitoring dashboards and\ntake appropriate action if necessary. You can also\ncreate an alert to notify you if similar events occur in future.\n\nA detected anomaly includes the following information:\n\n- The metric that caused the anomaly, such as proxy latency or an HTTP error code.\n- The severity of the anomaly. The severity can be slight, moderate, or severe, based on its confidence level in the model. A low confidence level indicates that the severity is slight, while a high confidence level indicates that it is severe.\n\nAnomaly types\n-------------\n\nApigee automatically detects the following types of anomalies:\n\n- Increase in HTTP 503 errors at the organization, environment, and region level\n- Increase in HTTP 504 errors at the organization, environment, and region level\n- Increase in all HTTP 4xx or 5xx errors at the organization, environment, and region level\n- Increase in the total response latency for the 90th percentile (p90) at the organization, environment, and region level\n\nHow anomaly detection works\n---------------------------\n\nAnomaly detection involves the following stages:\n\n- [Train models](#train-models)\n- [Log anomaly events](#log-anomaly-events)\n\n### Train models\n\nAnomaly detection works by training a model of the behavior of your API proxies from historical\ntime-series data. There is no action required on your part to train the model. Apigee automatically\ncreates and trains models for you from the previous six hours of API data.\nTherefore, Apigee requires a minimum of six hours of data on an API proxy to train the model before\nit can log an anomaly.\n\nThe goal of training is to improve the accuracy of the model, which can then be tested\non historical data. The simplest\nway to test a model's accuracy is to calculate its *error rate*---the\nsum of false positives and false negatives, divided by the total number of predicted events.\n\n### Log anomaly events\n\nAt runtime, Apigee anomaly detection compares the current behavior of your API proxies with the behavior\npredicted by the model. Anomaly detection can then determine, with a specific confidence level,\nwhen an operational metric is exceeding the predicted value. For example, when the rate of 5xx errors\nexceeds the rate predicted by the model.\n\nWhen Apigee detects an anomaly, it automatically logs the event in the\n[Anomaly Events\ndashboard](/apigee/docs/aapi-ops/anomaly-detect-ui). The list of events displayed in the dashboard includes all\ndetected anomalies, as well as triggered alerts."]]