- Get and Start Kong and Co
git clone [email protected]:Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
- Create Kong API Route
geo $whitelist_ip { | |
default 1; | |
# Your office ip | |
127.0.0.1/32 0; | |
} | |
map $whitelist_ip $default_limit { | |
1 $binary_remote_addr; | |
0 ""; |
git clone [email protected]:Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
This is an example configuration to have nginx output JSON logs to make it easier for Logstash processing. I was trying to get nginx > Filebeat > Logstash > ES working and it wasn't until I connected Filebeat directly to Elasticsearch that I saw the expected data. Google led me to ingest-convert.sh
and I realized filebeat setup
works for Filebeat > ES but not Filebeat > Logstash > ES. This is because Logstash does not use ingest pipelines by default. You have to enable them in the elasticsearch
output block.
Having nginx log JSON in the format required for Elasticsearch means there's very little processing (i.e. grok
) to be done in Logstash. nginx can only output JSON for access logs; the error_log
format cannot be changed.
Extra fields are output and not used by the Kibana dashboards. I included them in case they might be useful. Since they are not declared in the filebeat setup
, their default is "string" when yo
#!/bin/bash | |
#### Default Configuration | |
CONCURRENCY=4 | |
REQUESTS=100 | |
ADDRESS="http://localhost:8080/" | |
show_help() { | |
cat << EOF |
# Optimized my.cnf configuration for MySQL/MariaSQL | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated January 2020 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Response; | |
use Illuminate\Cache\RateLimiter; | |
class ThrottleRequests | |
{ |