HTTP log server for Kong http-log plugin for Elasticsearch and more
In some cases of running kong, we have logging server running but firewall or other policy of infrastructure didn’t allow kong connect to log server via TCP/UDP or Syslog, then kong-http-log-server was born
Edit .env file
HOST=0.0.0.0
PORT=8080
ES_HOST=elasticsearch
ES_PORT=9200
INDEX_PATTERN=kong-2006-01-02
NOTE :
HOST
andPORT
for http-es-log-server bindingES_HOST
andES_PORT
for Elasticsearch ServerINDEX_PATTERN
use Golang date format
Ref: https://gobyexample.com/time-formatting-parsing
docker-compose up -d kong-database
docker-compose up migrations
docker-compose up -d kong elasticsearch kibana kong-http-log-server
curl http://127.0.0.1:8001/services -d name=httpbin -d url=http://httpbin.org
curl http://127.0.0.1:8001/services/httpbin/routes -d name=httpbin -d paths[]=/
curl http://127.0.0.1:8001/services/httpbin/plugins \
-d name=http-log \
-d config.http_endpoint=http://kong-http-log-server:8080/
http://127.0.0.1:5601
go run .
# or
go build .
./kong-http-log-server
- Add basic auth support via .env for kong-http-log-server
- Add loki support
- Add graylog support
- Add auth support for log backend
- Add more protocol support for log backend
- Syslog
- TCP
- UDP