전체 글

전체 글

    [Elasticsearch] monitoring execution failed 오류

    Elasticsearch 로그 모니터링 중, 아래와 같은 오류가 발생했다. [2020-03-19T00:00:17,340][WARN ][o.e.x.m.MonitoringService] [xx-xx-log-1] monitoring execution failed org.elasticsearch.xpack.monitoring.exporter.ExportException: Exception when closing export bulk at org.elasticsearch.xpack.monitoring.exporter.ExportBulk$1$1.(ExportBulk.java:95) ~[?:?] at org.elasticsearch.xpack.monitoring.exporter.ExportBulk$1.onFailur..

    자바스크립트 테트리스

    자바스크립트로 제작된 테트리스 게임입니다. 방향키로 조작 가능합니다.

    자바스크립트 타자 연습 게임

    var sentence = new Sentence(); function Sentence(){ this.word_data = new Array( "안녕하세요.", "가까운 무당보다 먼 데 무당이 용하다.", "가나다라도 모른다.", "사공 배 둘러대듯", "사기전에 종짓굽 맞추듯", "칼끝의 원쑤", "차 치고 포 친다.", "차돌에 바람 들면 석돌보다 못하다.", "바늘 가는 데 실 간다.", "바늘구멍으로 황소바람 들어온다.", "다 된 농사에 낫 들고 덤빈다.", "다 된 죽에 코 빠졌다.", "가난도 비단 가난", "가래장부는 본고을 좌수도 몰라본다.", "가랑잎이 솔잎더러 바스락거린다고 한다.", "고기 새끼 하나 보고 가마솥 부신다.", "그 아버지에 그 아들", "급하면 바늘허리에 실 매어 쓸..

    youtube 영상 다운로드

    app.js const request = require('request'); app.post("/getYoutube", (req, res) => { const cookies = "lang=en; _ga=GA1.2.1682187592.1407390651; _dc=1;"; const options = { url : "http://en.savefrom.net/savefrom.php", form: { sf_url: req.body.sf_url, sf_submit: "" }, method: "POST", headers: { "Cache-Control" : "max-age=0", "Connection" : "keep-alive", "Content-Type" : 'application/x-www-form-urlenc..

    Elasticsearch Cluster 재기동, Rolling restart

    2EA 이상 Cluster로 구성된 Elasticsearch 서버를 재기동 해야할 때, 하나의 Elasticsearch를 서비스 종료 시, 데이터 Node들이 relocate 되서, 많은 리소스가 소모 된다. 빠르게 재기동 하기 위해서는 이 relocate 옵션을 끄고 진행한다. shard allocation 옵션을 disable $ curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d' { "transient" : { "cluster.routing.allocation.enable" : "none" } } ' 노드 shutdown $ curl -XPOST 'localhost:9200/_clus..

    body-parser (urlencoded, extended 옵션)

    request.body에 있는 데이터에 접근하기 위해 사용 //application/json 방식의 Content-Type 데이터 bodyParser.json(); //text/xml 방식의 Content-Type 데이터 bodyParser.text(); //application/x-www-form-urlencoded Content-Type 데이터 bodyParser.urlencoded({extended: true}); extended: true /false 차이점 true : qs모듈을 사용하여 쿼리 스트링 값을 해석 false : querystring 모듈을 사용하여 쿼리 스트링 값을 해석 let data = { info: { name: 'andy', age: 33 }, hobby[1]: sport,..

    Kibana Mapping Conflict 해결 방법

    kibana mapping conflict 현상 발생 시 우선적으로 해결해야 할 두가지 문제 1. index의 기존 데이터 매핑을 수정 2. 새로 만들어지거나, 새로 만들어질 index가 정확한 매핑이 가능하게 수정 but... Elasticsearch 에서는 이미 인덱싱된 기존 데이터는 매핑을 변경할 수 없다. 기존 데이터를 수정하려면, 새 인덱스를 생성하고 기존데이터를 복사해야 한다 (재 색인화: reindex) Template Mapping curl -XPUT 'localhost:9200/_template/access?pretty' -H 'Content-Type: application/json' -d' { "index_patterns": [ "access-*" ], "settings": { "num..

    Electron Package Config 정보 가져오기

    Electron에서 Package.json에 정의된 정보 가져오기 //package.json { "name": "application", "version": "1.0.0", "description": "Desktop Application!", "main": "main.js", "scripts": { "start": "electron ." }, "author": "GitHub", "license": "CC0-1.0", "devDependencies": { "electron": "^4.1.4" } } //main.js const { app } = require('electron'); console.log(app.getVersion()); console.log(app.getName());

    td-agent, Fluentd Permission denied

    td-agentd.conf 설정파일에서 POS, Buffer 파일에 로그생성시 권한문제가 간혹 발생한다. unexpected error error_class=Errno::EACCES error=#​unexpected error error_class=Errno::EACCES error=#​이럴경우 td-agent의 설정값을 수정하자. TD_AGENT_USER, TD_AGENT_GROUP을 root로 수정 $ vi /etc/init.d/td-agent TD_AGENT_NAME=td-agent TD_AGENT_HOME=/opt/td-agent TD_AGENT_DEFAULT=/etc/sysconfig/td-agent TD_AGENT_USER=root TD_AGENT_GROUP=root TD_AGENT_RUBY=..

    kibana unassigned 처리

    Elasticsearch의 ./kibana index가 Unassigned 발생하는 이유는 ./kibana index의 number_of_replicas 값이 ES의 기본 설정값 보다 높은 경우 발생한다. 이런 경우 ./kibana index의 template 값을 변경 $ curl -XPUT 'localhost:9200/.kibana/_settings' -H 'Content-Type: application/json' -d ' { "index" : { "number_of_replicas" : 0 } } '