I am using the following configuration file, but it does not delete the CUITS numbers that I get from my SQL database in the elasticsearch index.
This is the code in the file
input {
jdbc {
jdbc_connection_string => "jdbc:sqlserver://172.30.1.74;databaseName=DW"
jdbc_user => "user"
jdbc_password => "password"
jdbc_validate_connection => true
jdbc_driver_library => "/home/ec2-user/logstash-6.5.4/driverJDBC/sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
statement => "SELECT * from DELETE_ELASTIC"
}
}
output {
amazon_es {
hosts => ["https://search-dataqa-p4w23l3f76cdt7mjkwgvao6rhy.us-east-1.es.amazonaws.com"]
region => "us-east-1"
aws_access_key_id => 'Acceskey'
aws_secret_access_key => 'secretkey'
action => "delete"
index => "enriquecimiento"
document_type => "personas"
document_id => "%{cuitnumero}"
}
}