How do I post splunk results to twitter. This old script by Splunk no longer works.
#!/bin/sh
# tweet.sh - Post Splunk saved search result to Twitter.
# Greg Albrecht (gba@splunk.com)
# (c)2010 Splunk, Inc.
if [ -f "$9" ]; then
export IFS=$'\n'
for MSG in $(gzcat $9 | cut -d , -f 5|grep -v "_raw"|sed s/^\"//g|sed s/\"$//g); do \
/usr/local/bin/curl --basic --user "TWITTERUSER:TWITTERPASS" --data-ascii "status=$MSG" http://twitter.com/statuses/update.json \
;done
fi
↧