logstash debug test
# DataBase/Elasticsearch2021. 4. 6. 10:29logstash debug test

JSON데이터 준비 # vi cat SendMessage.json {"Hello": "World"} logstash debug test 파일생성 # vi /etc/logstash/conf.d/test.conf input { tcp { port => 5050 codec => json } } output { file { path => "/var/log/logstash/logstash.log" codec => rubydebug } } 5050포트로 json데이터를 받으면 output경로에 로그가 쌓이게끔 설정 실행 및 포트 확인 # /usr/share/logstash/bin/logstash -f test.conf Using JAVA_HOME defined java: /apps/java WARNING, usin..

아파치 로그포맷 JSON 변경
# Web&WAS/Apache2021. 4. 1. 17:49아파치 로그포맷 JSON 변경

LogFormat "{ \"time\":\"%t\", \"clientip\":\"%a\",\"host\":\"%V\", \"request\":\"%U\", \"query\":\"%q\", \"method\":\"%m\", \"status\":\"%>s\", \"userAgent\":\"%{User-agent}i\", \"referer\":\"%{Referer}i\" }" json_format

image