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
| <filter es.**> | |
| @type record_transformer | |
| enable_ruby | |
| auto_typecast true | |
| <record> | |
| hostname ${hostname} | |
| bitps ${record["size"] * 8 / (record["resptime"] + 0.001)} | |
| </record> | |
| </filter> |
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
| <match *.**> | |
| @type elasticsearch_dynamic | |
| buffer_type memory | |
| buffer_chunk_limit 100m | |
| buffer_queue_limit 128 | |
| logstash_format true | |
| logstash_prefix ${tag_parts[1]} | |
| include_tag_key true | |
| tag_key @log_name | |
| host 127.0.0.1 |
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
| <source> | |
| @type tail | |
| format /(?<schema>https?)://(?<domain>[^ ]*) (?<remote>[^ ]*) (?<host>[^ ]*) (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)") (?<message>.*) (?<resptime>\d+\.\d+)$/ | |
| time_format %d/%b/%Y:%H:%M:%S %z | |
| types remote:string,host:string,user:string,time:time,method:string,path:string,code:integer,referer:string,agent:string,message:string,size:integer,resptime:float | |
| path /tmp/access.log | |
| pos_file /tmp/access_tail_pos.log | |
| tag es.demo.access | |
| read_lines_limit 1000 | |
| </source> |
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" |
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
| upstream elastic { | |
| server elasticsearch:9200; | |
| } | |
| client_max_body_size 1G; | |
| client_body_buffer_size 200M; | |
| server { | |
| listen *:9200; | |
| server_name _; | |
| location / { |
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
| version: '2' | |
| services: | |
| nginx-proxy: | |
| image: jwilder/nginx-proxy | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| restart: unless-stopped | |
| volumes: | |
| - "/etc/nginx/vhost.d" |
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
| <?php | |
| $data = json_decode(file_get_contents('php://input'), true); | |
| $data['first_name'] .= " " . md5($data['first_name']); | |
| $data['last_name'] .= " " . md5($data['last_name']); | |
| $data['say'] = 'PHP is Good'; | |
| $data['current_time'] = date("Y-m-d H:m:s z"); | |
| echo json_encode($data, JSON_UNESCAPED_UNICODE); |
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
| user www-data; | |
| pid /run/nginx.pid; | |
| worker_processes 2; | |
| worker_rlimit_nofile 65535; | |
| #include /etc/nginx/modules-enabled/*.conf; | |
| events { | |
| worker_connections 8192; |
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
| server { | |
| listen 8080; | |
| root /home/ubuntu/sigatchov/php; | |
| index orel-codes.php index.html index.htm index.nginx-debian.html; | |
| # server_name example.com; | |
| location / { | |
| } | |
| location ~ \.php$ { |
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
| #!/usr/bin/env bash | |
| # Usage: | |
| # timeout 10 docker_iptables.sh | |
| # | |
| # Use the builtin shell timeout utility to prevent infinite loop (see below) | |
| if [ ! -x /usr/bin/docker ]; then | |
| exit | |
| fi |