[Kibana4.x] 생성한 dashboard export & import 하기.

Elastic/Kibana 2015. 7. 29. 17:40

매뉴만 몇번 눌러 보시면 다 아시는 내용인데요.

눌러 보기 귀찮아 하시는 분들도 있을 것 같아 걍 올려 봅니다.


간혹 작성한 kibana dashboard를 export 받고 싶거나 import 받고 싶을 때가 있습니다.

근데 이거 어디서 백업을 받을 수 있지 하고 찾으면 잘 안찾아 지죠.


아래 페이지에서 export & import 받을 수 있으니 참고하세요.


[매뉴 tree]

GNB -> Settings -> Objects


[매뉴]



:

[Logstash] logstash 개발 및 디버그 시 유용한 설정

Elastic/Logstash 2015. 7. 29. 17:32

제목 쓰기가 참 어렵내요.

logstash를 많이 사용해 보신 분들은 다들 잘 아실 것 같습니다.


저 같은 경우 output 은 거의 elasticsearch를 사용하고 있기 때문에 개발 시 디버깅을 위해서 아래 설정을 많이 이용합니다.


[디버그용 설정]

input {

  http {

    port => 8080

    codec => json_lines {}

  }

}


output {

  stdout {

    codec => rubydebug

  }

}


[디버그용 로그 스태쉬 실행]

$ bin/logstash -e "input { http { port => 8080 codec => json_lines {} } } output { stdout { codec => rubydebug } }"


잘 아시겠지만 output 은 여러개를 지정해 줄 수 있습니다.

실제 elasticsearch로도 색인을 하고 싶으시다면 아래와 같이 하시면 되겠죠.


[ouput - elasticsearch + stdout]

output {

  elasticsearch {

    cluster => "xxxxxx"

    bind_host => "localhost"

    bind_port => "9300"

    protocol => "transport"

    index => "logstash-%{+YYYY.MM.dd}"

  }

  stdout {

    codec => rubydebug

  }

}


:

[MacPorts] Mac Ports 재설치.

ITWeb/개발일반 2015. 7. 27. 11:53

참고문서)

https://guide.macports.org/chunked/installing.macports.html


맥북에서 mac port 문제가 있어서 위 문서 보고 재 설치 했습니다.

제 맥북은 MacPorts 2.3.3. 이였습니다.

The OS X package installer automatically installs MacPorts, sets the shell environment, and runs a selfupdate operation to update the ports tree and MacPorts base with the latest release.

  1. Download the latest MacPorts-2.3.3-....pkg installer from the MacPorts download directory. Here are direct links for the latest versions of OS X:

  2. Double-click the downloaded package installer to perform the default easy install.

  3. After this step you are done already, MacPorts is now installed and your shell environment was set up automatically by the installer. To confirm the installation is working as expected, now try using port in a new terminal window.

    $ port version
    Version: 2.3.3

    In case of problems such as command not found, make sure that you opened a new terminal window or consult Section 2.5, “MacPorts and the Shell”. Otherwise, please skip the remainder of this chapter and continue with Chapter 3, Using MacPorts in this guide.

재 설치 하고 나니 잘 됩니다.

:

[Elasticsearch] 매일 보는 페이지.

Elastic/Elasticsearch 2015. 7. 8. 10:44

elasticsearch 를 주 업으로 삼으면서 매일 보는 페이지들 입니다.


https://www.elastic.co/blog

https://github.com/elastic/elasticsearch/issues

https://www.elastic.co/guide/en/elasticsearch/resiliency/current/index.html


아주 유용한 정보들이 많이 들어 있고 어떻게 발전해 가는지도 확인이 가능 합니다.

:

[Elasticsearch] shard allocation 운영 테스트용 REST 코드 - 1.6.0 이상.

Elastic/Elasticsearch 2015. 7. 3. 13:59

작성하고 보니 최신 내용을 반영할걸 이라는 후회가 밀려 오내요.

이전 글 http://jjeong.tistory.com/1034 이거는 사실 deprecated 예정입니다.

코드에도 명시되어 있어서.. ^^;;


아래 코드로 변경 합니다.

참고하세요.


curl -XPUT localhost:9200/_cluster/settings -d '{

    "persistent" : {

        "cluster.routing.allocation.enable" : "primaries",

        "cluster.routing.allocation.allow_rebalance" : "indices_all_active",

        "cluster.routing.allocation.cluster_concurrent_rebalance" : 2,

        "cluster.routing.allocation.node_initial_primaries_recoveries" : 4,

        "cluster.routing.allocation.node_concurrent_recoveries" : 2

    }

}'

※ 위 값들은 default 값입니다. "primaries" 만 빼고요 ^^


상세 내용을 확인 하고 싶으신 분들은 아래 문서를 참고하시길 바랍니다.


https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html#shards-allocation


그냥 넘어 갈라고 했지만...


▷ cluster.routing.allocation.allow_rebalance

설명에 있지만 이건 shard rebalance에 대한 설정 입니다.

아래 값들에 대한 조건일 때 rebalance 하겠다는 것으로 이해 하시면 됩니다.

always : 항상 할 거다.

indices_primaries_active : primary shard 가 올라 오면 할 거다.

indices_all_active : 전체 shard 가 올라 오면 할 거다.


당연히 indices_all_active 가 default 설정이 되겠죠.


▷ cluster.routing.allocation.cluster_concurrent_rebalance

클러스터를 통틀어서 동시에 rebalance 할 shard 수를 제한 하는 설정 입니다.

기본은 2개로 설정 되어 있습니다.


▷ cluster.routing.allocation.node_initial_primaries_recoveries

각 노드 당 primary shard recovery에 대한 초기 크기를 설정 하는 것입니다.

기본은 4개로 설정 되어 있습니다.


▷ cluster.routing.allocation.node_concurrent_recoveries

노드에서 동시에 수행할 recovery 크기를 설정 하는 것입니다.


▷ cluster.routing.allocation.enable

이게 이전에 deprecated 된 설정의 확장인데요. (위에 설정도 포함 이지만..)

shard 종류에 따라 어떻게 처리 할 것인지를 결정 하게 합니다.

all : 몽땅 다 하겠다.

primaries : primary shard 만 하겠다.

new_primaries : 새로 생성한 인덱스의 primary shard 만 하겠다.

none : 몽땅 다 안하겠다.


딱 보면 disable_allocation:true = primaries + none 정도로 보면 쉽쥬.

반대는 disable_allocation:false = all 정도로 보면 쉽쥬.


: