Created
March 22, 2017 20:10
-
-
Save asigatchov/face9b8aa301bdab1f4a5643e17bf53d to your computer and use it in GitHub Desktop.
конфиг файл для heka
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[nginx_access_logs] | |
type = "LogstreamerInput" | |
splitter = "TokenSplitter" | |
decoder = "nginx_access_decoder" | |
log_directory = "/opt/nginx/logs" | |
file_match = 'access\.log' | |
[nginx_access_decoder] | |
type = "SandboxDecoder" | |
filename = "lua_decoders/nginx_access.lua" | |
[nginx_access_decoder.config] | |
log_format = '$scheme://$host $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" "$http_via" $request_time' | |
type = "nginx.access" | |
[ESJsonEncoder] | |
index = "nginx-%{%Y.%m.%d}" | |
es_index_from_timestamp = true | |
type_name = "%{Type}" | |
[ElasticSearchOutput] | |
server = "http://myhost:9200" | |
username = "user" | |
password = "secret" | |
message_matcher = "Type == 'nginx.access'" | |
encoder = "ESJsonEncoder" | |
flush_interval = 3000 | |
flush_count = 10000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment