# udp

echo '{"version": "1.1","host":"8d9.ru","short_message":"A short message that helps you identify what is going on","full_message":"Backtrace here\n\nmore stuff","level":1,"_user_id":9001,"_some_info":"foo","_some_env_var":"bar"}' | gzip | nc -u -w 1 127.0.0.1 12201

# tcp

echo -e '{"version": "1.1","host":"8d9.ru","short_message":"Short message","full_message":"Backtrace here\n\nmore stuff","level":1,"_user_id":9001,"_some_info":"foo","_some_env_var":"bar"}\0' | nc -w 1 127.0.0.1 12201

# если сообщения не доходят

apt-get update && apt-get install netcat net-tools telnet telnetd -y

# проверить открыты ли порты

netstat -atn # For tcp
netstat -aun # For udp
netstat -tulpn #all

# проверить соединение

telnet localhost 12201

 

DevOps