Collecting logs using Filebeat
If you have successfully set up nginx
to serve the Recipe Search Service web page, you will have noticed some access and error logs being generated for every request served by the web server. The logs can often contain useful insights into how the web server is being used, the distribution of requests being made, and where requests originate from.
Collecting these logs using Filebeat is easy. Follow the instructions to set up the Filebeat agent to collect the logs and ship them to your Elasticsearch deployment for analysis:
- Install Filebeat on the web server host. Detailed installation options for installing Elastic Stack components are provided in Chapter 2, Installing and Running the Elastic Stack.
- The Filebeat agent can be configured from the
filebeat.yml
file located in the/etc/filebeat/
directory on Linux installations or in theconfig/
directory on tar archives. Edit the file as shown in the reference file,Chapter6/filebeat/filebeat...