Skip to content

Instantly share code, notes, and snippets.

@mhenes
mhenes / gelfsender.sh
Created May 27, 2016 16:47 — forked from gm3dmo/gelfsender.sh
Send a log message to a gelf server using the shell.
# This script can be used to raise a graylog2/gelf message
# gzip it and send it to a graylog server using netcat (nc)
hostname='gelftester'
short_message='test message short version'
full_message='longer test message. dont\n worry be happy'
level=1
facility='gelftester'
# gnu date
date=$(date +'%s.%N')