'전체 글'에 해당되는 글 96건

1. sudo apt-get update

2. sudo apt install python-pip

3. pip install --upgrade pip

4. pip install --upgrade virtualenv

5. virtualenv -p python3 p3.5


블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

  multiline.pattern: '^[[:space:]]'

  multiline.match: after

'서버 교양' 카테고리의 다른 글

How to make game server log system  (0) 2017.11.03
Mysql visualization tool(그래프 툴) Super set!  (0) 2017.11.03
logstash conf example  (0) 2017.10.13
python 3.5 flask gevent async requests test  (0) 2017.04.07
Logstash install  (0) 2017.03.17
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

logstash conf example

서버 교양 2017. 10. 13. 16:33

# this is for logstash configuration
input {
beats {
port => 5044
}
}

filter {
grok {
match => {
"message" => "%{TIMESTAMP_ISO8601:timestamp} \[%{DATA:log_level}\] %{DATA:url} (?<content>(.)*)"
}
}

if "_grokparsefailure" not in [tags] {
if [content] {
json {
source => "content"
}

if [dest] == "mongo" {
mutate {
add_field => {"logType" => "query"}
}
}
else {
mutate {
add_field => {"logType" => "log"}
}
}

}

mutate {
remove_field => [ "content", "message", "tags"]
gsub => ["timestamp", ",[0-9]+", ""]
}
}
else {
mutate {
add_field => {"logType" => "else"}
}
}
}

output {
if [logType] == "query" { # this is for query log
mongodb {
collection => "log"
database => "gamedb"
uri => "mongodb://"
codec => json
isodate => true
}
}
else if [logType] == "log" and [log_level] == "INFO" {
s3 {
access_key_id => ""
secret_access_key => ""
region => "us-east-1"
prefix => "%{+YYYY/MM/dd}/"
bucket => ""
size_file => 100000 # size: bytes, 100000 = 100kbytes
time_file => 5
codec => "json_lines"
}
}

elasticsearch {

    hosts => [search.~~.es.aws.com:80]

}
}


'서버 교양' 카테고리의 다른 글

Mysql visualization tool(그래프 툴) Super set!  (0) 2017.11.03
filebeat traceabck multiline config  (0) 2017.10.16
python 3.5 flask gevent async requests test  (0) 2017.04.07
Logstash install  (0) 2017.03.17
[펌] 인증 암호화와 해쉬  (0) 2016.10.29
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,