@sanjeev1895
What version are you on?
How much do you want to parse.
With just filebeat + multiline processing
- type: filestream
# Unique ID among all inputs, an ID is required.
id: cake-log
tags: "cake-log"
# Change to true to enable this input configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /Users/sbrown/workspace/sample-data/discuss/multi-line/cake.log
#- c:\programdata\elasticsearch\logs\*
parsers:
- multiline:
type: pattern
pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
negate: true
match: after
This loaded the cake.log the error log is the same you could us a separate filestream and tag.
If you want to parse it further you can use and ingest pipeline OR you could use logstash there are pros and cons to each.
Ingest pipeline you do not need to logstash and you could probably parse.
Logstash has more powerful parsing but requires running another component.
Get the logs loaded with just filebeat and come back with more questions.
Here is my sample files these loaded fine with the above config just change the path.
cake-error.log
2023-07-26 04:35:45 Error: [BadRequestException] Invalid Store
Request URL: /
Stack Trace:
#0 /var/www/build/storefront/storefront-516/app/Controller/AppController.php(76): AppController->checkStore()
#1 /var/www/build/storefront/storefront-516/app/Controller/SiteController.php(25): AppController->beforeFilter()
#2 /var/www/build/storefront/storefront-516/lib/Cake/Event/CakeEventManager.php(243): SiteController->beforeFilter()
#3 /var/www/build/storefront/storefront-516/lib/Cake/Controller/Controller.php(682): CakeEventManager->dispatch()
#4 /var/www/build/storefront/storefront-516/lib/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#5 /var/www/build/storefront/storefront-516/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#6 /var/www/build/storefront/storefront-516/app/webroot/index.php(114): Dispatcher->dispatch()
#7 {main}
2023-07-26 04:36:45 Error: [BadRequestException] Invalid Store
Request URL: /
Stack Trace:
#0 /var/www/build/storefront/storefront-516/app/Controller/AppController.php(76): AppController->checkStore()
#1 /var/www/build/storefront/storefront-516/app/Controller/SiteController.php(25): AppController->beforeFilter()
#2 /var/www/build/storefront/storefront-516/lib/Cake/Event/CakeEventManager.php(243): SiteController->beforeFilter()
#3 /var/www/build/storefront/storefront-516/lib/Cake/Controller/Controller.php(682): CakeEventManager->dispatch()
#4 /var/www/build/storefront/storefront-516/lib/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#5 /var/www/build/storefront/storefront-516/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#6 /var/www/build/storefront/storefront-516/app/webroot/index.php(114): Dispatcher->dispatch()
#7 {main}
2023-07-26 04:37:45 Error: [BadRequestException] Invalid Store
Request URL: /
Stack Trace:
#0 /var/www/build/storefront/storefront-516/app/Controller/AppController.php(76): AppController->checkStore()
#1 /var/www/build/storefront/storefront-516/app/Controller/SiteController.php(25): AppController->beforeFilter()
#2 /var/www/build/storefront/storefront-516/lib/Cake/Event/CakeEventManager.php(243): SiteController->beforeFilter()
#3 /var/www/build/storefront/storefront-516/lib/Cake/Controller/Controller.php(682): CakeEventManager->dispatch()
#4 /var/www/build/storefront/storefront-516/lib/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#5 /var/www/build/storefront/storefront-516/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#6 /var/www/build/storefront/storefront-516/app/webroot/index.php(114): Dispatcher->dispatch()
#7 {main}
cake/log
2023-07-26 16:33:39 Cake: Error:- Custom Forms - SMTP server did not accept the password. Array
(
[file] => /var/www/build/storefront/storefront-522/app/Controller/FormsController.php
[line] => 42
[function] => save_form_responses
[class] => CustomFormComponent
[type] => ->
)
2023-07-26 16:34:39 Cake: Error:- Custom Forms - SMTP server did not accept the password. Array
(
[file] => /var/www/build/storefront/storefront-522/app/Controller/FormsController.php
[line] => 42
[function] => save_form_responses
[class] => CustomFormComponent
[type] => ->
)
2023-07-26 16:35:39 Cake: Error:- Custom Forms - SMTP server did not accept the password. Array
(
[file] => /var/www/build/storefront/storefront-522/app/Controller/FormsController.php
[line] => 42
[function] => save_form_responses
[class] => CustomFormComponent
[type] => ->
)