-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into graphite_options
- Loading branch information
Showing
7 changed files
with
91 additions
and
49 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
# | ||
# Very simple bash client to send metrics to a statsd server | ||
# Example with gauge: ./statsd-client.sh 'my_metric:100|g' | ||
# | ||
# Alexander Fortin <alexander.fortin@gmail.com> | ||
# | ||
STATSD="statsd-ip-address" | ||
PORT="8125" | ||
|
||
if [ $# -ne 1 ] | ||
then | ||
echo "Syntax: $0 '<gauge_data_for_statsd>'" | ||
exit 1 | ||
fi | ||
|
||
# Setup UDP socket with statsd server | ||
exec 3<> /dev/udp/${STATSD}/${PORT} | ||
|
||
# Send data | ||
echo "$1" >&3 | ||
|
||
# Close UDP socket | ||
exec 3<&- | ||
exec 3>&- |
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