Skip to content

Instantly share code, notes, and snippets.

@typomedia
Last active December 22, 2015 15:29
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 typomedia/6492919 to your computer and use it in GitHub Desktop.
Save typomedia/6492919 to your computer and use it in GitHub Desktop.
ZFS Status Report Mailer
#!/bin/sh
# Copyright 2013 Typomedia Foundation. All rights reserved.
# Released under GPL version 3.
#
# ZFS Status Report Mailer v1.2
mailx -t \
<<EOF
MIME-Version: 1.0
FROM:Fileserver <server@domain.tld>
TO:Administrator <admin@domain.tld>
SUBJECT:ZFS Status Report: `zpool status -x`
Content-Type: text/html
<html>
<body>
<pre>
`uname -a`
`host \`hostname\``
`zpool status`
`zpool list`
</pre>
</body>
</html>
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment