Last active
November 5, 2015 05:30
-
-
Save davidonet/8d8461db8a0b6720c9f1 to your computer and use it in GitHub Desktop.
Gelf IP logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IP=`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` | |
MSG=\{\"short_message\":\"heartbeat\",\"host\":\"host\",\"address\":\"$IP\"\} | |
curl -XPOST http://gelf.logging.com/gelf -p0 -d $MSG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment