0

Hi all i have created a logstash config file scheduled every 5 minutes which transport data from MSSql sever to Elasticsearch and i run my logstash application using the windows powershell with the following command .\logstash-7.2.0\bin\logstash -f logstash.conf.txt

Logstash Config

input {
jdbc {
jdbc_driver_library => ""
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://xxxxxx\SQLEXPRESS:1433;databaseName=xxxx;"
jdbc_user => "xxxxx"
jdbc_password => "xxxx"
jdbc_paging_enabled => true
tracking_column => modified_date
use_column_value => true
clean_run => true
tracking_column_type => "timestamp"
schedule => "*/5 * * * * *"
statement => "SELECT * from [xxxxxxxx] where modified_date >:sql_last_value"
}
}

filter {
 mutate {
   remove_field => ["@version","@timestamp"]
 }
}

output {
elasticsearch {
hosts => "http://localhost:9200"
index => "employee"
document_type => "_doc"
document_id => "%{id}"

}
stdout { codec => rubydebug }
}

How to deploy the same thing in production environment? because in local machine i am using windows powershell to execute my commands how to achieve this in production environment?

Could anyone please guide how to deploy this as a service in production env?

Mohan vel
  • 505
  • 9
  • 29
  • 1
    deploy in the sense how to move this `config` file to production box? and your production runs on Linux machines? if so, you can create a Jenkins job to move it whenever you make changes to the file etc. If you are asking about how to execute/start the Logstash on Linux machines, it is same as you did. Look for the documentation. Specify what exactly are you trying solve – JBone Jan 10 '20 at 14:29
  • i will be going to deploy this in AWS environment. Let me check with AWS support guy for the details required – Mohan vel Jan 13 '20 at 09:26

1 Answers1

1

Not sure I understand the question... Are you trying to deploy the same configuration in Linux server in production?

If so, you should change jdbc_driver_class, and possibly also the jdbc_connection_string and hosts parameters, to match the production server.

Check out also the following question: Set vm.max_map_count on cluster nodes It may be of help to you, though as I said I'm not sure.

Good luck! :-)

ramco
  • 56
  • 3