Skip to content

Instantly share code, notes, and snippets.

@apeckham
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apeckham/f783aa297516663f5c56 to your computer and use it in GitHub Desktop.
Save apeckham/f783aa297516663f5c56 to your computer and use it in GitHub Desktop.
collectd exec example
<Plugin exec>
Exec "ubuntu" "/home/ubuntu/app/magic_level.sh"
</Plugin>
HOSTNAME="${COLLECTD_HOSTNAME:-localhost}"
INTERVAL="${COLLECTD_INTERVAL:-60}"
while sleep "$INTERVAL"; do
echo "PUTVAL \"$HOSTNAME/exec-magic/gauge-magic_level\" interval=$INTERVAL N:$(date +%N)"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment