Logs not being sent to logstash from .net application

I launched elk stack on docker but logstash isn't receiving any logs from my application.
I cloned this repo,added RUN logstash-plugin install logstash-input-http to the logstash's Dockerfile and changed the config file to look like this:

	http {
		port => 8080

## Add your filters / logstash plugins configuration here

output {
	elasticsearch {
		hosts => "elasticsearch:9200"
		index => "customer-%{xxxx.ww}"
		user => "elastic"
		password => "changeme"

when I send logs to http://localhost:8080,they don't show up on kibana.However,If I open the logstash shell from docker desktop and send POST request via curl to http://localhost:8080 with some json body,it shows up on kibana.
This is how my logs look like:

[12:31:12 INF] {"FirstName": "Aliyah", "LastName": "Murphy", "SSNumber": "534-84-4378", "$type": "Customer"} registered
[12:31:13 INF] {"FirstName": "Donavon", "LastName": "Roob", "SSNumber": "451-01-8812", "$type": "Customer"} registered```

Did you expose port 8080 outside of the docker container?

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