구글의 public dns가 8.8.8.8만 있는 줄 알았는데.. 8.8.4.4도 있었다.  역시 위키를 봐야..... 



https://en.wikipedia.org/wiki/Google_Public_DNS


Google Public DNS operates recursive name servers for public use at the IP addresses 8.8.8.8 and 8.8.4.4 for IPv4 service, and 2001:4860:4860::8888 and 2001:4860:4860::8844, for IPv6access.[5][6]

Posted by '김용환'
,

grafana에서 특정 metric을 downsample을 1m으로 하면 잘 보이는 장점이 있다.

그러나 해당 메트릭 패널이 많이 모인 dashboard에서는 당연히 DataSource(예, tsdb)가 영향을 받을 수 있다. 

따라서 auto downsampling을 하는 게 좋다.

자세한 내용은 아래를 참고한다.

https://railsadventures.wordpress.com/2015/07/17/advanced-grafana-using-automatic-intervals/


Posted by '김용환'
,




ansible에 lineinfile(https://docs.ansible.com/ansible/latest/modules/lineinfile_module.html)이라는 모듈이 있다.



- name: replace config

  become: true

  lineinfile:

    path: /usr/local/zookeeper/conf/zoo.conf

    regexp: '^#maxClientCnxns'

    line: 'maxClientCnxns'






Posted by '김용환'
,




리눅스에서 일반 유저가 사용하지 못하는 0~1023 포트를 시스템(system)포트 또는 잘 알려진(well-known)  포트 라 한다.

1024 포트부터는 등록된(registered) 포트라 한다.




그리고 통신 프로그래밍(http)에서처럼 잠깐 쓰는 포트를 임시(ephemeral) 포트라 한다.




https://en.wikipedia.org/wiki/Port_(computer_networking)


The well-known ports (also known as system ports) are those from 0 through 1023.


The registered ports are those from 1024 through 49151.



https://en.wikipedia.org/wiki/Ephemeral_port


An ephemeral port is a short-lived transport protocol port for Internet Protocol (IP) communications.


'영어앤영문권' 카테고리의 다른 글

BYOD  (0) 2018.07.28
생성자(constructor)를 짧게 영어로 하면..  (0) 2018.07.27
=> 를 영어로 어떻게 발음할까?  (0) 2017.11.24
언커링: dual transformation/double transformation  (0) 2017.11.21
feature toggle 용어  (0) 2017.05.20
Posted by '김용환'
,



python에서 옵션(매개 변수)를 받고, 공백(white space)가 있으면 처리해준다.



from optparse import OptionParser

import re


parser = OptionParser()

parser.add_option("--exclude_host", help="excluded host", type="string", default='')

..

exclude_host = re.split("^\s+|\s*,\s*|\s+$", options.exclude_host)




이외에 배열에 대해 A-B 같은 substract 같은 연산을 하고 싶으면 다음 예시를 참조한다.


..

if options.exclude_host is not '':

    fqdn_list = [item for item in fqdn_list if item not in exclude_host ]


Posted by '김용환'
,

grafana solo

web 2018. 7. 4. 18:19



http://docs.grafana.org/reference/sharing/



grafana 대시보드를 iframe으로 연동하면 dashboard의 이름이 dashboard-solo가 된다.



<iframe src="https://snapshot.raintank.io/dashboard-solo/snapshot/y7zwi2bZ7FcoTlB93WN7yWO4aMiz3pZb?from=1493369923321&to=1493377123321&panelId=4" width="650" height="300" frameborder="0"></iframe>


Posted by '김용환'
,


opentsdb 개발 환경 구성하기


$ git clone https://github.com/OpenTSDB/opentsdb.git

$ cd opentsdb

$ sh build.sh pom.xml

$ mvn compile



intellij에서 open project... maven 기반으로 읽는다. 


그래도 source generated되는게 있어서 완벽하지 않지만 그럭저럭 쓸만하다.



Posted by '김용환'
,

Apache NIFI의 한계

scribbling 2018. 6. 29. 11:07



http://knight76.tistory.com/entry/Apache-NIFI



최근까지 NIFI를 상용에서 쓰고 있었지만.. 아주 간단한 곳에서 사용하고 있다. 

테스트했던 환경은 중량급 서버 (32 core, 64 Memory) 에 4대를 사용해서 테스트했다.


내가 내린 결론은 대용량(하루 최소 5T 용량) 또는 복잡한 환경에서는 쓰지 않기를 바란다.


현재 NIFI의 한계는 threashold가 넘어가는 클러스터링 장애가 발생하고 나서 복구가 무척 어렵다. (재시작 3번 해야 복구된다.) 따라서 로그가 유실되며 재처리할 수 있는 작업 컴포넌트가 현재 없다.

또한 로그가 현재 부실한 편이라 정확한 어떻게 하기 어렵다. 장애 발생 후 재시작 이후에 여전히 설정이 traffic을 받는 구조라 썩 좋지 않다.


그러나, 이런한 단점에도 NIFI는 계속 좋아질 가능성이 보이고 있으며,

소스 구조가 java bean에 맞춰 착실하게 개발되어 있어 컴포넌트 추가 개발이 쉽다는 큰 장점이 있다..



좋은 성능 튜닝 참조 자료

https://community.hortonworks.com/articles/7882/hdfnifi-best-practices-for-setting-up-a-high-perfo.html






Posted by '김용환'
,



ruby의 irb/pry 조합과 동일하게 사용할 수 있는 파이썬 조합이다.



1. ipython


찾은 링크는 다음과 같다. 

https://gist.github.com/Integralist/a2f01ab4aabb786268d5006da5013c9e


pip install ipython만 하면 된다.




[~] cat test.py

#!/usr/bin/env python


from IPython import embed


print("1")


embed()

print("2")

print("3")




pry처럼 정확히 


[~] ipython test.py

1

Python 3.6.0 (default, Sep 19 2017, 16:07:26)

Type 'copyright', 'credits' or 'license' for more information

IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.


In [1]:



2. pdb


https://docs.python.org/3/library/pdb.html


http://pythonstudy.xyz/python/article/505-Python-%EB%94%94%EB%B2%84%EA%B9%85-PDB



[~] cat test.py

#!/usr/bin/env python


import pdb


print("1")

pdb.set_trace()

print("2")

print("3")



[~] python -m pdb test.py



3. pudb


https://github.com/inducer/pudb


http://python -m pudb.run test.py





Posted by '김용환'
,






<기억 나는 대사>

우리는 모두 인생에서 선택을 해야 하지. 살아가면서 꼭 필요한 어려운 부분이지. 그리고 그걸 도와줄 사람은 아무도 없지.

하지만 진짜와 가짜중 하나만 선택하라고. 둘이 비슷해 보여도 같을 수가 없거든. 말도 안되는 가짜를 믿지 말라고

(하지만 영화는 황당 스토리였다. 말은 멋있지만 실제로는 말과 역설적인 상황에서 나오는 말..)

'영화를 보고' 카테고리의 다른 글

어벤져스 엔드게임 중에 좋았던 대사  (0) 2019.08.20
"아름다운 것들은 관심을 바라지 않지"  (0) 2018.11.21
레디 플레이어 원  (0) 2018.04.04
칠드런 오브 맨  (0) 2016.10.25
[마이크롭 앤 가솔린]  (0) 2016.07.02
Posted by '김용환'
,