examples/projects/realtime-log-monitoring/logstash-pathway-elastic/README.md
The purpose of this project is to do an end-to-end application with Pathway to monitors logs (such as nginx logs). It connects Filebeat/Logstash to Pathway (via Kafka) and send the alerts to ElasticSearch.
The project is organized in six docker containers:
The logs are processed as follows (in ./pathway-src/alerts.py):
To install the project, you only need to clone the repository.
How to launch the project:
make in the root repo. It will start all the four containersmake connect to connect to the Filebeat container../generate_input_stream.sh to launch the stream generation from the Filebeat container.The updates should be received directly in ElasticSearch.
To access the logs in ElasticSearch, you can do curl localhost:9200/alerts/_search?pretty.
Note that ElasticSearch takes a few seconds before being available: you should wait ~15s before accessing it and generating the logs.
You can use make connect-pathway to connect to the pathway container.
By adding a pw.io.csv.write(log_table, "./logs.csv") you can see the logs by typing cat logs.csv from the pathway container.
To stop, use make stop.