test Graylog GELF UDP input from Bash

for i in {1..100} ; do echo '{"version": "1.1","host":"david.org","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"}' | nc -w 1 -u graylog.mydomain.com 12201 ; done   nJoy 😉

UDP send and listen for passing messages and test connectivity

Setting up a listener in UDP : Install socat Jist here (Centos 6.6 : http://jist.sudoall.com/socat/setup install curl “http://jist.sudoall.com/socat/setup” | bash – socat -u udp-recv:8888 – To send the datagram : nc -u 127.0.0.1 8888 njoy 😉

Sending Elasticsearch to a syslog server

yum install rsyslog -y Add the following to rsyslog.conf on the client system ############ $ModLoad imfile $InputFileName /var/log/elasticsearch/elasticsearch.log $InputFileTag elasticsearch $InputFileStateFile stat-elasticsearch $InputFileSeverity Info $InputFileFacility daemon $InputRunFileMonitor #local3.* hostname:<portnumber> daemon.* @192.168.1.66:514 ############   Also if you want all logs to go through to syslog server:   *.* @192.168.1.66   at the end of the file….