Skip to content

Instantly share code, notes, and snippets.

@asomov
asomov / gelfsender.sh
Created Dec 12, 2016 — forked from gm3dmo/gelfsender.sh
Send a log message to a gelf server using the shell.
View gelfsender.sh
# 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')