.. role:: raw-html-m2r(raw) :format: html outlier ==================================================================================================== outlier 명령어 문법 및 연동규격 설명서 입니다. 개요 ---------------------------------------------------------------------------------------------------- * 여러 그룹을 대상으로 outlier 에 해당하는 그룹을 찾는 명령어 입니다. * 디폴트 알고리즘인 dbscan 은 비슷한 그룹으로 clustering 을 한 결과 데이터의 패턴이 달라서 묶이지 않는 그룹을 찾습니다. * 알고리즘을 mad 로 지정하여 실행하면 그룹 내의 데이터중에서 일정 비율 이상의 anomal 한 데이터를 갖고 있는 그룹을 탐지합니다. 타입 ---------------------------------------------------------------------------------------------------- 설명 ---------------------------------------------------------------------------------------------------- * 3개 이상의 그룹(=by 필드) 을 대상으로 outlier 에 해당하는 그룹을 찾아 냅니다. * 기본 알고리즘 = dbscan 알고리즘 * dbscan 알고리즘: 여러 개의 그룹 데이터를 clustering 하여 어느 cluster 에도 포함이 되지 않는 그룹을 찾아 냅니다. * mad 알고리즘: 그룹 내의 데이터에서 중간값을 기반으로 탐지한 anomal 데이터가 일정비율 이상으로 발생한 그룹을 찾아 냅니다. Parameters ---------------------------------------------------------------------------------------------------- .. code-block:: none ... | outlier target by=field (key=value)* ex) ... | outlier target by=field_name alg=mad tolerance=3.0 pct=0.1 .. list-table:: :header-rows: 1 * - 이름 - 설명 - 필수/옵션 * - target - 분석할 데이터 필드명 입니다. - 필수 * - by = field - outlier 계산을 위해 그룹이 되는 필드명을 지정합니다. **옵션 키 리스트 참고** - 필수 * - key = value - 옵션의 키 입니다. 종류는 ``by``\ , ``alg``\ , ``tolerance``\ , ``pct`` 의 4종류가 있습니다. **옵션 키 리스트 참고** - 옵션 - 옵션 key list .. list-table:: :header-rows: 1 * - key - 설명 * - by - 그룹으로 각각의 비정상그룹을 탐지할 수 있습니다. **반드시** 지정해줘야합니다. * - alg - **dbscan** , **mad**. 밀도기반 클러스터링 알고리즘과 중앙값 편차를 이용하여 비정상적인 그룹을 찾아냅니다. ``default = dbscan`` * - tolerance - 임계값 범위의 scale을 지정합니다. 위의 수식에 값의 범위를 늘리는 데 사용 합니다. :raw-html-m2r:`
`\ dbscan 알고리즘에서는 tolerance = 0.5 (eps로 사용됨) 가 기본값.포인트간의 거리를 의미하므로 데이터의 최대거리를 고려한 값을 입력한다. \ :raw-html-m2r:`
`\ mad 알고리즘에서는 tolerance = 3.0 이 기본값. 일반적으로 1.5 ~ 5.0 사이 값 * - pct - ``mad`` 알고리즘에서 사용되는 파라미터.\ :raw-html-m2r:`
`\ 이상하다고 판단하는 데이터의 그룹내의 비율 입니다. (0.1= 10%) :raw-html-m2r:`
`\ 이 비율 이상으로 이상치가 발생하면 해당 그룹 데이터 전체는 outlier 그룹으로 표시됩니다. ``0 < pct < 1`` **검색어 사용예시** .. code-block:: none ## alg=dbscan ## # outlier target by=field ... | outlier CNT by=HOST [alg=dbscan] [tolerance=0.5] # outlier target by=field tolerance=0.8 ... | outlier CNT by=HOST alg=dbscan tolerance=2.0 ## alg=mad ## # outlier target by=field alg=mad ... | outlier CNT by=HOST alg=mad [tolerance=3.0] [pct=0.1] # outlier target by=field alg=mad tolerance=4.0 pct=0.2 ... | outlier CNT by=HOST alg=mad tolerance=4.0 pct=0.2 Examples ---------------------------------------------------------------------------------------------------- - 예제 데이터 .. list-table:: :header-rows: 1 * - DATETIME - HOST - CNT * - 20200910140000 - hadoop01 - 1274 * - 20200910130000 - gcs5 - 8320 * - 20200910150000 - tsdn-svr1 - 2483 * - 20200910130000 - gcs6 - 8363 * - 20200910140000 - ans41 - 3025 * - 20200910140000 - gcs1 - 5543 * - 20200910130000 - gcs4 - 8343 * - 20200910140000 - gcs4 - 8349 * - 20200910120000 - hadoop04 - 10 * - 20200910120000 - ans41 - 2983 * - 20200910130000 - hadoop02 - 11 * - 20200910150000 - hadoop01 - 1479 * - 20200910120000 - tsdn-svr1 - 7447 * - 20200910150000 - hadoop04 - 11 * - 20200910120000 - gcs4 - 8194 * - 20200910130000 - hadoop04 - 11 * - 20200910150000 - hadoop02 - 11 * - 20200910130000 - hadoop03 - 11 * - 20200910150000 - hadoop03 - 11 * - 20200910140000 - gcs3 - 80 * - 20200910140000 - hadoop03 - 11 * - 20200910130000 - ans41 - 3021 * - 20200910140000 - tsdn-svr1 - 2362 * - 20200910140000 - gcs6 - 8389 * - 20200910150000 - gcs6 - 8369 * - 20200910120000 - gcs1 - 5402 * - 20200910140000 - hadoop02 - 11 * - 20200910150000 - gcs5 - 8346 * - 20200910130000 - gcs3 - 80 * - 20200910120000 - hadoop01 - 932 * - 20200910120000 - tsdn-db - 1844 * - 20200910130000 - hadoop01 - 784 * - 20200910120000 - hadoop03 - 10 * - 20200910130000 - tsdn-db - 1876 * - 20200910150000 - gcs2 - 8580 * - 20200910140000 - tsdn-db - 1865 * - 20200910120000 - gcs6 - 8241 * - 20200910150000 - tsdn-db - 1884 * - 20200910150000 - gcs1 - 5525 * - 20200910150000 - ans41 - 2749 * - 20200910120000 - hadoop02 - 10 * - 20200910130000 - gcs1 - 5525 * - 20200910140000 - gcs2 - 8554 * - 20200910120000 - gcs5 - 8195 * - 20200910140000 - gcs5 - 8346 * - 20200910130000 - gcs2 - 8581 * - 20200910150000 - gcs4 - 8329 * - 20200910130000 - tsdn-svr1 - 2086 * - 20200910120000 - gcs2 - 8410 * - 20200910150000 - gcs3 - 80 * - 20200910140000 - hadoop04 - 11 * - 20200910120000 - gcs3 - 54 - dbscan 알고리즘으로 이상 그룹 탐지 .. code-block:: none ... | outlier CNT by=HOST .. list-table:: :header-rows: 1 * - DATETIME - HOST - CNT - label - outlier * - 20200910140000 - hadoop01 - 1274 - 0 - False * - 20200910130000 - gcs5 - 8320 - 1 - False * - 20200910150000 - tsdn-svr1 - 2483 - 0 - False * - 20200910130000 - gcs6 - 8363 - 1 - False * - 20200910140000 - ans41 - 3025 - 0 - False * - 20200910140000 - gcs1 - 5543 - -1 - True * - 20200910130000 - gcs4 - 8343 - 1 - False * - 20200910140000 - gcs4 - 8349 - 1 - False * - 20200910120000 - hadoop04 - 10 - 0 - False * - 20200910120000 - ans41 - 2983 - 0 - False * - 20200910130000 - hadoop02 - 11 - 0 - False * - 20200910150000 - hadoop01 - 1479 - 0 - False * - 20200910120000 - tsdn-svr1 - 7447 - 1 - False * - 20200910150000 - hadoop04 - 11 - 0 - False * - 20200910120000 - gcs4 - 8194 - 1 - False * - 20200910130000 - hadoop04 - 11 - 0 - False * - 20200910150000 - hadoop02 - 11 - 0 - False * - 20200910130000 - hadoop03 - 11 - 0 - False * - 20200910150000 - hadoop03 - 11 - 0 - False * - 20200910140000 - gcs3 - 80 - 0 - False * - 20200910140000 - hadoop03 - 11 - 0 - False * - 20200910130000 - ans41 - 3021 - 0 - False * - 20200910140000 - tsdn-svr1 - 2362 - 0 - False * - 20200910140000 - gcs6 - 8389 - 1 - False * - 20200910150000 - gcs6 - 8369 - 1 - False * - 20200910120000 - gcs1 - 5402 - -1 - True * - 20200910140000 - hadoop02 - 11 - 0 - False * - 20200910150000 - gcs5 - 8346 - 1 - False * - 20200910130000 - gcs3 - 80 - 0 - False * - 20200910120000 - hadoop01 - 932 - 0 - False * - 20200910120000 - tsdn-db - 1844 - 0 - False * - 20200910130000 - hadoop01 - 784 - 0 - False * - 20200910120000 - hadoop03 - 10 - 0 - False * - 20200910130000 - tsdn-db - 1876 - 0 - False * - 20200910150000 - gcs2 - 8580 - 1 - False * - 20200910140000 - tsdn-db - 1865 - 0 - False * - 20200910120000 - gcs6 - 8241 - 1 - False * - 20200910150000 - tsdn-db - 1884 - 0 - False * - 20200910150000 - gcs1 - 5525 - -1 - True * - 20200910150000 - ans41 - 2749 - 0 - False * - 20200910120000 - hadoop02 - 10 - 0 - False * - 20200910130000 - gcs1 - 5525 - -1 - True * - 20200910140000 - gcs2 - 8554 - 1 - False * - 20200910120000 - gcs5 - 8195 - 1 - False * - 20200910140000 - gcs5 - 8346 - 1 - False * - 20200910130000 - gcs2 - 8581 - 1 - False * - 20200910150000 - gcs4 - 8329 - 1 - False * - 20200910130000 - tsdn-svr1 - 2086 - 0 - False * - 20200910120000 - gcs2 - 8410 - 1 - False * - 20200910150000 - gcs3 - 80 - 0 - False * - 20200910140000 - hadoop04 - 11 - 0 - False * - 20200910120000 - gcs3 - 54 - 0 - False * mad 결과 (위 예시데이터 사용) .. code-block:: none ... | outlier CNT by=HOST alg=mad tolerance=2.5 pct=0.1 .. list-table:: :header-rows: 1 * - DATETIME - HOST - CNT - lower - upper - anomaly - outlier * - 20200910140000 - hadoop01 - 1274 - 454.88 - 1751.12 - False - False * - 20200910150000 - hadoop01 - 1479 - 454.88 - 1751.12 - False - False * - 20200910120000 - hadoop01 - 932 - 454.88 - 1751.12 - False - False * - 20200910130000 - hadoop01 - 784 - 454.88 - 1751.12 - False - False * - 20200910130000 - gcs5 - 8320 - 8222.38 - 8443.62 - False - True * - 20200910150000 - gcs5 - 8346 - 8222.38 - 8443.62 - False - True * - 20200910120000 - gcs5 - 8195 - 8222.38 - 8443.62 - True - True * - 20200910140000 - gcs5 - 8346 - 8222.38 - 8443.62 - False - True * - 20200910150000 - tsdn-svr1 - 2483 - -1003.75 - 5848.75 - False - True * - 20200910120000 - tsdn-svr1 - 7447 - -1003.75 - 5848.75 - True - True * - 20200910140000 - tsdn-svr1 - 2362 - -1003.75 - 5848.75 - False - True * - 20200910130000 - tsdn-svr1 - 2086 - -1003.75 - 5848.75 - False - True * - 20200910130000 - gcs6 - 8363 - 8269.75 - 8462.25 - False - True * - 20200910140000 - gcs6 - 8389 - 8269.75 - 8462.25 - False - True * - 20200910150000 - gcs6 - 8369 - 8269.75 - 8462.25 - False - True * - 20200910120000 - gcs6 - 8241 - 8269.75 - 8462.25 - True - True * - 20200910140000 - ans41 - 3025 - 2805.75 - 3198.25 - False - True * - 20200910120000 - ans41 - 2983 - 2805.75 - 3198.25 - False - True * - 20200910130000 - ans41 - 3021 - 2805.75 - 3198.25 - False - True * - 20200910150000 - ans41 - 2749 - 2805.75 - 3198.25 - True - True * - 20200910140000 - gcs1 - 5543 - 5436.88 - 5613.12 - False - True * - 20200910120000 - gcs1 - 5402 - 5436.88 - 5613.12 - True - True * - 20200910150000 - gcs1 - 5525 - 5436.88 - 5613.12 - False - True * - 20200910130000 - gcs1 - 5525 - 5436.88 - 5613.12 - False - True * - 20200910130000 - gcs4 - 8343 - 8230.38 - 8441.62 - False - True * - 20200910140000 - gcs4 - 8349 - 8230.38 - 8441.62 - False - True * - 20200910120000 - gcs4 - 8194 - 8230.38 - 8441.62 - True - True * - 20200910150000 - gcs4 - 8329 - 8230.38 - 8441.62 - False - True * - 20200910120000 - hadoop04 - 10 - 10.38 - 11.62 - True - True * - 20200910150000 - hadoop04 - 11 - 10.38 - 11.62 - False - True * - 20200910130000 - hadoop04 - 11 - 10.38 - 11.62 - False - True * - 20200910140000 - hadoop04 - 11 - 10.38 - 11.62 - False - True * - 20200910130000 - hadoop02 - 11 - 10.38 - 11.62 - False - True * - 20200910150000 - hadoop02 - 11 - 10.38 - 11.62 - False - True * - 20200910140000 - hadoop02 - 11 - 10.38 - 11.62 - False - True * - 20200910120000 - hadoop02 - 10 - 10.38 - 11.62 - True - True * - 20200910130000 - hadoop03 - 11 - 10.38 - 11.62 - False - True * - 20200910150000 - hadoop03 - 11 - 10.38 - 11.62 - False - True * - 20200910140000 - hadoop03 - 11 - 10.38 - 11.62 - False - True * - 20200910120000 - hadoop03 - 10 - 10.38 - 11.62 - True - True * - 20200910140000 - gcs3 - 80 - 63.75 - 96.25 - False - True * - 20200910130000 - gcs3 - 80 - 63.75 - 96.25 - False - True * - 20200910150000 - gcs3 - 80 - 63.75 - 96.25 - False - True * - 20200910120000 - gcs3 - 54 - 63.75 - 96.25 - True - True * - 20200910120000 - tsdn-db - 1844 - 1838.62 - 1902.38 - False - False * - 20200910130000 - tsdn-db - 1876 - 1838.62 - 1902.38 - False - False * - 20200910140000 - tsdn-db - 1865 - 1838.62 - 1902.38 - False - False * - 20200910150000 - tsdn-db - 1884 - 1838.62 - 1902.38 - False - False * - 20200910150000 - gcs2 - 8580 - 8443.88 - 8690.12 - False - True * - 20200910140000 - gcs2 - 8554 - 8443.88 - 8690.12 - False - True * - 20200910130000 - gcs2 - 8581 - 8443.88 - 8690.12 - False - True * - 20200910120000 - gcs2' - 8410 - 8443.88 - 8690.12 - True - True