[nginx] 서비스 점검공지 올리는 방법
·
DevOps/nginx
2019-03-04-nginx-점검-페이지.md 라는 이름으로 github.io 블로그에 올렸던 내용을 가져온 내용입니다. nginx 에서 간단하게 503 에러코드를 사용하여 점검페이지를 띄워보자 서비스 점검 공지 서비스 점검 공지 페이지가 사용되는 경우가 종종 있음. 장애 무중단이 불가능한 빅 업데이트 내가 속한 팀에서는 주로 위와 같은 사유로 점검페이지를 사용함. Nginx 를 L4 뒤, application 앞에 두는 구조이기 때문에 점검 페이지를 nginx 쪽에서 관리하고있음. 실제 점검 페이지는 html 파일로, 마크업/디자인 팀에서 전달받은 파일을 nginx 서버에 업로드 하여 사용함. nginx 설정 nginx에서 점검 페이지를 관리하려면 conf 파일에 수정을 해야함. http status..
[성능] heap dump 분석 툴 / heap dump analyzer
·
DevOps/devops
설치 필요 X / 10mb 파일 사이즈 제한 있음 Heap Hero https://heaphero.io/ World-class heap Dump analysis - Java, Android memory dump analyzer How much memory your application wastes? Due to inefficient programming, modern applications waste 30% to 70% of memory. HeapHero is the industry's first tool to detect the amount of wasted memory. It reports what lines of source code originating the memor heaphero.io RE..
[대충로그] grafana-loki query
·
DevOps/monitoring
loki로 수집된 로그중에 json body (string)에서 값을 쿼리해야한다. loki로 수집된 로그중에 json body (string)에서 값을 쿼리해야한다. {container_name="도커컨테이너명"} |= " orderNo" |= "123123123" { } 안의 값은 label |= 는 로그 파이프라인, 필터처럼 사용
[ubuntu] python을 찾을 수 없다고 할때
·
DevOps/devops
Command 'python' not found, but can be installed with: 라고 뜨는 경우가 있다. 하지만 python은 설치 되어있는데? 🤔고민하지 말고 아래와 같이 입력해주자. # 터미널 (bashrc or bash_aliases) vim ~/.bashrc # bashrc (python3나 원하는 python 버전) alias python=python3 # 터미널 source ~/.bashrc 다시 python을 입력하면, 원하는 버전에 맞게 잘 실행되는것을 확인할 수 있다.
[TIL] pip install 시 "Consider using the `--user` option or check the permissions" 에러
·
DevOps/etc
Consider using the `--user` option or check the permissions. pip로 패키지 설치시 이런 에러가 발생함. 권한이 없는 디렉토리에서 설치하려고 하기 때문에 발생하는 에러. --user 옵션을 넣어서 설치하면 된다. 뭐든 모를땐 man page 나 -h를 사용해서 설명을 읽어본다. --user 옵션은 권한없는 디렉토리 (내경우의 C드라이브)가 아닌 사용자의 디렉토리 (home directory)에 설치해준다. --user Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python do..
crontab 을 사용해보자
·
DevOps/etc
서버에서 주기적으로 작업을 해야하는 일을 생성할때는 종종 crontab을 사용한다. cron으로 등록된 job list 확인 crontab -l cron에 새로운 job을 등록 crontab -e cron 스케줄 expression 주기적으로 cron을 실행시키기 위해서는 다음의 expression과 함께 등록해야한다. [분] [시간] [날짜/월] [월] [날짜/주] wildcard sign = any 예시 아래와 같이 세팅하면 매주 0시 0분 (자정) 목요일에 해당 file path에 있는 스크립트를 실행 으로 해석하면 된다. 0 0 * * THU [file path] 참고 cron schedule 유용한 링크: https://crontab.guru/
[curl] (60) SSL certificate problem: certificate has expired
·
DevOps/etc
curl command 를 사용하다가 만난 이슈 해결방법 (임시방편) curl의 옵션인 -k (or --insecure)를 사용한다. certificate validation을 스킵해준다.
fluentd - host is unreachable
·
DevOps/monitoring
2020-10-05 16:19:32 +0000 [warn]: #0 failed to flush the buffer. retry_time=15 next_retry_seconds=2020-10-05 21:09:56 +0000 chunk="5b0e6e3d58b7cec7f1d92eaa332995c8" error_class=Fluent::Plugin::ElasticsearchOutput::RecoverableRequestFailure error="could not push logs to Elasticsearch cluster ({:host=>\"호스트명\", :port=>포트번호, :scheme=>\"http\"}): Host is unreachable - connect(2) for IP주소 (Errno::EHO..