mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:15 +02:00
update elk
This commit is contained in:
parent
3409a35bc5
commit
83d151a51c
@ -1,6 +0,0 @@
|
||||
input {
|
||||
lumberjack {
|
||||
port => 5000
|
||||
type => "logs"
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
input {
|
||||
beats {
|
||||
port => 5044
|
||||
ssl => false
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
filter {
|
||||
if [type] == "syslog" {
|
||||
grok {
|
||||
match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
|
||||
add_field => [ "received_at", "%{@timestamp}" ]
|
||||
add_field => [ "received_from", "%{host}" ]
|
||||
}
|
||||
syslog_pri { }
|
||||
date {
|
||||
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
filter {
|
||||
if [type] == "nginx-access" {
|
||||
grok {
|
||||
match => { "message" => "%{NGINXACCESS}" }
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
output {
|
||||
elasticsearch {
|
||||
hosts => ["elasticsearch"]
|
||||
sniffing => true
|
||||
manage_template => false
|
||||
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
|
||||
document_type => "%{[@metadata][type]}"
|
||||
}
|
||||
}
|
6
elk/data/logstash.yml
Normal file
6
elk/data/logstash.yml
Normal file
@ -0,0 +1,6 @@
|
||||
http.host: "0.0.0.0"
|
||||
path.config: /usr/share/logstash/pipeline
|
||||
#xpack.monitoring.enabled: false
|
||||
xpack.monitoring.elasticsearch.url: http://elasticsearch:9200
|
||||
#xpack.monitoring.elasticsearch.username: logstash_system
|
||||
#xpack.monitoring.elasticsearch.password: changeme
|
14
elk/data/pipeline/logstash.conf
Normal file
14
elk/data/pipeline/logstash.conf
Normal file
@ -0,0 +1,14 @@
|
||||
input {
|
||||
beats {
|
||||
port => 5044
|
||||
}
|
||||
}
|
||||
|
||||
output {
|
||||
stdout {
|
||||
codec => rubydebug
|
||||
}
|
||||
elasticsearch {
|
||||
hosts => [ "elasticsearch:9200" ]
|
||||
}
|
||||
}
|
@ -1,33 +1,42 @@
|
||||
version: '2'
|
||||
services:
|
||||
elasticsearch:
|
||||
image: elasticsearch:5.0
|
||||
ports:
|
||||
- '9200:9200'
|
||||
- '9300:9300'
|
||||
volumes:
|
||||
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
- ./data:/usr/share/elasticsearch/data
|
||||
mem_limit: 4g
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
nofile:
|
||||
soft: 65536
|
||||
hard: 65536
|
||||
cap_add:
|
||||
- IPC_LOCK
|
||||
logstash:
|
||||
image: logstash:5.0
|
||||
ports:
|
||||
- '5000:5000'
|
||||
- '5044:5044'
|
||||
volumes:
|
||||
- ./conf:/etc/logstash/conf.d
|
||||
kibana:
|
||||
image: kibana:5.0
|
||||
ports:
|
||||
- '5601:5601'
|
||||
environment:
|
||||
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.1
|
||||
ports:
|
||||
- "9200:9200"
|
||||
volumes:
|
||||
- ./data:/usr/share/elasticsearch/data
|
||||
environment:
|
||||
- node_name=elastic-search
|
||||
- cluster.name=docker-cluster
|
||||
- bootstrap.memory_lock=true
|
||||
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
restart: unless-stopped
|
||||
|
||||
logstash:
|
||||
image: docker.elastic.co/logstash/logstash:6.1.1
|
||||
ports:
|
||||
- "5044:5044"
|
||||
- "9600:9600"
|
||||
links:
|
||||
- elasticsearch
|
||||
volumes:
|
||||
- ./data/logstash.yml:/usr/share/logstash/config/logstash.yml
|
||||
- ./data/pipeline:/usr/share/logstash/pipeline
|
||||
- /usr/share/logstash/vendor/bundle
|
||||
environment:
|
||||
LS_JAVA_OPTS: "-Xms1g -Xmx1g"
|
||||
restart: unless-stopped
|
||||
|
||||
kibana:
|
||||
image: docker.elastic.co/kibana/kibana:6.1.1
|
||||
ports:
|
||||
- "5601:5601"
|
||||
links:
|
||||
- elasticsearch
|
||||
environment:
|
||||
SERVER_NAME: kibana
|
||||
ELASTICSEARCH_URL: http://elasticsearch:9200
|
||||
restart: unless-stopped
|
||||
|
@ -1,2 +0,0 @@
|
||||
network.host: 0.0.0.0
|
||||
bootstrap.mlockall: true
|
Loading…
Reference in New Issue
Block a user