[Elasticsearch] 인덱스(index) 목록 조회

    인덱스 리스트 명령어

    curl -XGET http://localhost:9200/_cat/indices

     

    결과

    C:\Users\steel>curl -XGET http://localhost:9200/_cat/indices
    yellow open test-index               wNb0z1QRQTOJdlsY7fzCuA 1 1   1 0  4.6kb  4.6kb
    green  open .apm-custom-link         Nn5uCq1kScqbQyXwPG8HMQ 1 0   0 0   208b   208b
    green  open .kibana_task_manager_1   Qn0h-L0-QcaGly3Q58Dcig 1 0   5 0   76kb   76kb
    green  open .apm-agent-configuration 62kQfIVrSdKVHXvtM74Ypg 1 0   0 0   208b   208b
    yellow open stock                    WHrvqdAqTZu5zb2jqZtn_A 1 1 248 0 41.4kb 41.4kb
    green  open .kibana_1                ep-v4ZR4SNOsU-R4xOK7Qg 1 0  24 7 82.9kb 82.9kb
    yellow open movie_kibana_execute     NXmn3wkOSZWbjM4e23JkCA 1 1   1 0  3.6kb  3.6kb

     

    컬럼표시

    C:\Users\steel>curl -XGET http://localhost:9200/_cat/indices?v
    health status index                    uuid                   pri rep docs.count docs.deleted store.size pri.store.size
    yellow open   test-index               wNb0z1QRQTOJdlsY7fzCuA   1   1          1            0      4.6kb          4.6kb
    green  open   .apm-custom-link         Nn5uCq1kScqbQyXwPG8HMQ   1   0          0            0       208b           208b
    green  open   .kibana_task_manager_1   Qn0h-L0-QcaGly3Q58Dcig   1   0          5            0       76kb           76kb
    green  open   .apm-agent-configuration 62kQfIVrSdKVHXvtM74Ypg   1   0          0            0       208b           208b
    yellow open   stock                    WHrvqdAqTZu5zb2jqZtn_A   1   1        248            0     41.4kb         41.4kb
    green  open   .kibana_1                ep-v4ZR4SNOsU-R4xOK7Qg   1   0         24            7     70.5kb         70.5kb
    yellow open   movie_kibana_execute     NXmn3wkOSZWbjM4e23JkCA   1   1          1            0      3.6kb          3.6kb

     

    JSON 포맷 구조

    C:\Users\steel>curl -XGET http://localhost:9200/_cat/indices?format=json
    [{"health":"yellow","status":"open","index":"test-index","uuid":"wNb0z1QRQTOJdlsY7fzCuA","pri":"1","rep":"1","docs.count":"1","docs.deleted":"0","store.size":"4.6kb","pri.store.size":"4.6kb"},{"health":"green","status":"open","index":".apm-custom-link","uuid":"Nn5uCq1kScqbQyXwPG8HMQ","pri":"1","rep":"0","docs.count":"0","docs.deleted":"0","store.size":"208b","pri.store.size":"208b"},{"health":"green","status":"open","index":".kibana_task_manager_1","uuid":"Qn0h-L0-QcaGly3Q58Dcig","pri":"1","rep":"0","docs.count":"5","docs.deleted":"0","store.size":"76kb","pri.store.size":"76kb"},{"health":"green","status":"open","index":".apm-agent-configuration","uuid":"62kQfIVrSdKVHXvtM74Ypg","pri":"1","rep":"0","docs.count":"0","docs.deleted":"0","store.size":"208b","pri.store.size":"208b"},{"health":"yellow","status":"open","index":"stock","uuid":"WHrvqdAqTZu5zb2jqZtn_A","pri":"1","rep":"1","docs.count":"248","docs.deleted":"0","store.size":"41.4kb","pri.store.size":"41.4kb"},{"health":"green","status":"open","index":".kibana_1","uuid":"ep-v4ZR4SNOsU-R4xOK7Qg","pri":"1","rep":"0","docs.count":"24","docs.deleted":"7","store.size":"70.5kb","pri.store.size":"70.5kb"},{"health":"yellow","status":"open","index":"movie_kibana_execute","uuid":"NXmn3wkOSZWbjM4e23JkCA","pri":"1","rep":"1","docs.count":"1","docs.deleted":"0","store.size":"3.6kb","pri.store.size":"3.6kb"}]

     

    JSON 포맷 구조(Pretty)

    C:\Users\steel>curl -XGET "http://localhost:9200/_cat/indices?format=json&pretty"
    [
      {
        "health" : "yellow",
        "status" : "open",
        "index" : "test-index",
        "uuid" : "wNb0z1QRQTOJdlsY7fzCuA",
        "pri" : "1",
        "rep" : "1",
        "docs.count" : "1",
        "docs.deleted" : "0",
        "store.size" : "4.6kb",
        "pri.store.size" : "4.6kb"
      },
      {
        "health" : "green",
        "status" : "open",
        "index" : ".apm-custom-link",
        "uuid" : "Nn5uCq1kScqbQyXwPG8HMQ",
        "pri" : "1",
        "rep" : "0",
        "docs.count" : "0",
        "docs.deleted" : "0",
        "store.size" : "208b",
        "pri.store.size" : "208b"
      },
      {
        "health" : "green",
        "status" : "open",
        "index" : ".kibana_task_manager_1",
        "uuid" : "Qn0h-L0-QcaGly3Q58Dcig",
        "pri" : "1",
        "rep" : "0",
        "docs.count" : "5",
        "docs.deleted" : "0",
        "store.size" : "76kb",
        "pri.store.size" : "76kb"
      },
      {
        "health" : "green",
        "status" : "open",
        "index" : ".apm-agent-configuration",
        "uuid" : "62kQfIVrSdKVHXvtM74Ypg",
        "pri" : "1",
        "rep" : "0",
        "docs.count" : "0",
        "docs.deleted" : "0",
        "store.size" : "208b",
        "pri.store.size" : "208b"
      },
      {
        "health" : "yellow",
        "status" : "open",
        "index" : "stock",
        "uuid" : "WHrvqdAqTZu5zb2jqZtn_A",
        "pri" : "1",
        "rep" : "1",
        "docs.count" : "248",
        "docs.deleted" : "0",
        "store.size" : "41.4kb",
        "pri.store.size" : "41.4kb"
      },
      {
        "health" : "green",
        "status" : "open",
        "index" : ".kibana_1",
        "uuid" : "ep-v4ZR4SNOsU-R4xOK7Qg",
        "pri" : "1",
        "rep" : "0",
        "docs.count" : "24",
        "docs.deleted" : "7",
        "store.size" : "70.5kb",
        "pri.store.size" : "70.5kb"
      },
      {
        "health" : "yellow",
        "status" : "open",
        "index" : "movie_kibana_execute",
        "uuid" : "NXmn3wkOSZWbjM4e23JkCA",
        "pri" : "1",
        "rep" : "1",
        "docs.count" : "1",
        "docs.deleted" : "0",
        "store.size" : "3.6kb",
        "pri.store.size" : "3.6kb"
      }
    ]

     

    반응형

    댓글

    Designed by JB FACTORY