How to connect log file as an input in Logstash

0 votes

Hi Guys,

I want to connect my web server log file in Logstash to monitor in real-time. Can anyone help me, how can I do this? 

Jun 17, 2020 in DevOps Tools by akhtar
• 38,260 points
1,840 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use the file plugin to connect your log file in Logstash. In your Logstash configuration file, you have to tell your file name. I have attached the configuration code below.

input {
 file {
 path => '/root/logstash-7.7.1/bin/file.txt'
 }
}
output {
 file {
 path => 'output.txt'
 codec => rubydebug
  }
}

Hope this will help you.

answered Jun 17, 2020 by MD
• 95,460 points

Related Questions In DevOps Tools

0 votes
1 answer

How to install Logstash in CentOS/RHEL?

Hi@akhtar, To install Logstash on the system, you ...READ MORE

answered Jun 17, 2020 in DevOps Tools by MD
• 95,460 points
4,350 views
0 votes
1 answer

How to expose an app in Minishift?

Hi@akhtar, To expose your app, you need to ...READ MORE

answered Aug 18, 2020 in DevOps Tools by MD
• 95,460 points
684 views
0 votes
1 answer

How to create a secret from a file in Minishift?

Hi@akhtar, You can create a secret using generic ...READ MORE

answered Aug 19, 2020 in DevOps Tools by MD
• 95,460 points
776 views
0 votes
0 answers

How to create maven build on bamboo ? Unable to create build by using profile as in pom.xml

As given in the above question that ...READ MORE

Oct 28 in DevOps Tools by Anila
• 3,490 points
39 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,041 views
+2 votes
1 answer
0 votes
1 answer

How to configure Keyboard as stdin in Logstash?

Hi@akhtar, You can find stdin and stdout plugins ...READ MORE

answered Jun 17, 2020 in DevOps Tools by MD
• 95,460 points
1,815 views
0 votes
1 answer

How to filter IP from a log file using Logstash?

Hi@akhtar, You can use the filter plugin in Logstash. It ...READ MORE

answered Jun 18, 2020 in DevOps Tools by MD
• 95,460 points
1,460 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP