Created
February 9, 2015 07:19
-
-
Save k9ert/18fce5fc99f389c5dacc to your computer and use it in GitHub Desktop.
Passing the number of some errormessages to graphite daily
This file contains hidden or 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
#!/bin/bash | |
PORT=2003 | |
SERVER=graphite.yourcompany.com | |
yesterday=`date --date="yesterday" +%Y-%m-%d` | |
counter=`less /some/log/file/program-${yesterday}.log | grep "An errormessage" | wc -l` | |
#echo "echoing $counter" | |
echo "com.hybris.fra.yrd.stash.logging.crowdunavailable $counter `date +%s` " | nc -q 2 ${SERVER} ${PORT}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment