4

I have set-up an ELK server in testing environment. I intend to send log messages from different clients to ELK, but first i want to test it from localhost to verify it running properly.

Previously i had directly , used a python library to interact with elastic-search (since there was a problem in using urllib2 , 400 bad request) , but this time i want to send the message to log-stash and let the log-stash deal with it before it goes to Elastic Search.

I used netcat , but there is some problem with the port number:

  echo "access denied" | nc localhost 5514
  Ncat: Connection refused.

Seems like there is nothing on this port. The logstash service is running.

1
  • Fixed it , i figured out the correct port and it works now. Commented Jan 6, 2016 at 3:35

1 Answer 1

4

You could use logger with the -P switch to set your port to 5514.

Check man logger for other suitable switches, eg -t.

echo "access denied" | logger -t myservice -P 5514

To check if port 5514 is currently associated with logstash, lsof -i :5514, or check logstash startup logs (meta!). Are you certain your logstash is using that particular port?

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.