Forked from kimlindholm/email_varnish_reports.sh
Last active
August 29, 2015 14:08
-
-
Save ShadySQL/beed95ec17810e0d3d48 to your computer and use it in GitHub Desktop.
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