2024-09-17T15:08:44.375437739Z 2024-09-17T15:08:44.375Z INFO 1 --- [ main] com.intelsat.ceo.CeoAp plication : Started CeoApplication in 7.837 seconds (process running for 8.42)
2024-09-17T15:08:44.544767697Z On server start scheduler
2024-09-17T15:08:44.544825780Z No active schedule
2024-09-17T15:33:49.692192221Z 2024-09-17T15:33:49.691Z INFO 1 --- [nio-8085-exec-1] o.a.c.c.C.[.[localhost ].[/ceo/v1] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-09-17T15:33:49.692243653Z 2024-09-17T15:33:49.691Z INFO 1 --- [nio-8085-exec-1] o.s.web.servlet.Dispat cherServlet : Initializing Servlet 'dispatcherServlet'
2024-09-17T15:33:49.694066083Z 2024-09-17T15:33:49.693Z INFO 1 --- [nio-8085-exec-1] o.s.web.servlet.Dispat cherServlet : Completed initialization in 2 ms
2024-09-19T13:13:45.337897996Z 2024-09-19T13:13:45.337Z INFO 1 --- [nio-8085-exec-6] o.springdoc.api.Abstra ctOpenApiResource : Init duration for springdoc-openapi is: 516 ms
2024-09-24T15:58:02.902999238Z Scheduling task with job id: 72 and cron expression: 0 */30 * * * ?
2024-09-24T16:00:00.001242789Z Running action: Test_Action
2024-09-24T16:00:00.001280873Z With Data: Test Data
I downloaded the manifest file at Run Filebeat on Kubernetes | Filebeat Reference [8.15] | Elastic, then made a copy of it. Then in the copied file I deleted the filestream input and uncommented the autodiscover section just as suggested in the comment. Thus the relevant section looks like this:
I then ran kubectl create -f on the copied file. However when I look at Discover in Kibana I don't see the data coming from the filebeat-* index pattern.
After discussion with the team, we decided to give up on autodiscover.
Instead the team will configure Spring Boot apps to log to explicitly named log files and Filebeat will collect from those log files via a filestream input.
Some of the lines in this example output were created by calls to System.out.println, like No active schedule and Running action: Test_Action
2024-09-17T15:08:44.375437739Z 2024-09-17T15:08:44.375Z INFO 1 --- [ main] com.intelsat.ceo.CeoAp plication : Started CeoApplication in 7.837 seconds (process running for 8.42)
2024-09-17T15:08:44.544767697Z On server start scheduler
2024-09-17T15:08:44.544825780Z No active schedule
2024-09-17T15:33:49.692192221Z 2024-09-17T15:33:49.691Z INFO 1 --- [nio-8085-exec-1] o.a.c.c.C.[.[localhost ].[/ceo/v1] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-09-17T15:33:49.692243653Z 2024-09-17T15:33:49.691Z INFO 1 --- [nio-8085-exec-1] o.s.web.servlet.Dispat cherServlet : Initializing Servlet 'dispatcherServlet'
2024-09-17T15:33:49.694066083Z 2024-09-17T15:33:49.693Z INFO 1 --- [nio-8085-exec-1] o.s.web.servlet.Dispat cherServlet : Completed initialization in 2 ms
2024-09-19T13:13:45.337897996Z 2024-09-19T13:13:45.337Z INFO 1 --- [nio-8085-exec-6] o.springdoc.api.Abstra ctOpenApiResource : Init duration for springdoc-openapi is: 516 ms
2024-09-24T15:58:02.902999238Z Scheduling task with job id: 72 and cron expression: 0 */30 * * * ?
2024-09-24T16:00:00.001242789Z Running action: Test_Action
2024-09-24T16:00:00.001280873Z With Data: Test Data
We had started down the path of just leaving the System.out.println calls in the application code (Spring Boot and Java) and trying to harvest the output with Filebeat using the autodiscover features.
But then the team decided to replace the System.out calls with Logback or something like it to generate log files on the file system, then use Filebeat filestream input to collect data from those log files.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.