Simple question with send java log to logstash via tcp

I need to send logs from a java application to logstash, but I can't. What am I doing wrong?

input {

        tcp {
                port => 5555
                type => "app"
        }

}


filter {
   

    if [type] == "app" {

        json {
            source => "message"
            target => "app"
            remove_field=>["message"]
        }

    }


}



output {

    if [type] == "app" {
        elasticsearch {
                hosts=> ["elasticsearch:9200"]
                index => "app-%{+MM.YYYY}"
       }
        stdout { codec => rubydebug }
    }

}

logback
<?xml version="1.0" encoding="utf-8" ?>




XXXXX:XXXX






java
public class App {

    private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
    
    public static void main(String[] args) {
        
    	LOGGER.info("Teste ");    	

	}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.