Created
February 13, 2012 14:52
-
-
Save kimlindholm/1817400 to your computer and use it in GitHub Desktop.
Send Munin generated Varnish statistics by e-mail
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
#!/bin/bash | |
# Send Munin generated Varnish statistics by e-mail | |
VARNISH_LOCATION="Tokyo" | |
REPORT_PATH=/var/www/html/munin/localhost/localhost | |
EMAIL_RECIPIENT="[email protected]" | |
EMAIL_SUBJECT="Varnish Weekly Statistics" | |
EMAIL_BODY="Weekly statistics attached." | |
hash mutt 2>&- || { echo -e >&2 "\nMutt not installed, aborting.\n"; exit 1; } | |
echo $EMAIL_BODY | mutt -s "$EMAIL_SUBJECT ($VARNISH_LOCATION)" \ | |
-a $REPORT_PATH/varnish_cachehitratio-week.png \ | |
-a $REPORT_PATH/varnish_hitrate-week.png \ | |
-a $REPORT_PATH/varnish_total_objects-week.png \ | |
-a $REPORT_PATH/varnish_allocated-week.png \ | |
-a $REPORT_PATH/df-week.png \ | |
-a $REPORT_PATH/threads-week.png \ | |
-a $REPORT_PATH/cpu-week.png \ | |
-a $REPORT_PATH/memory-week.png \ | |
-- $EMAIL_RECIPIENT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From presentation Improving Site Response Time, Part 3 - Varnish Configuration Step by Step