automationhas.blogg.se

3ware 9550sx vmware esxi 5
3ware 9550sx vmware esxi 5







3ware 9550sx vmware esxi 5
  1. 3WARE 9550SX VMWARE ESXI 5 SOFTWARE
  2. 3WARE 9550SX VMWARE ESXI 5 CODE

# (a restart will lose the exception and file, so first run of this script will re-create it) # Create Firewall Exception file and restart service to apply - runs only if not already present # Create log file if it doesn't exist - used to record changes in unit statusĮcho `date`" START OF FILE" > $PROG_PATH/lol.log PROG_PATH=/vmfs/volumes/Datastore/3Ware # the server path of this script (and tw_cli) PORT=465 # your SMTP server port # your destination e-mail # the sending e-mail address

3ware 9550sx vmware esxi 5

# if all is working, after 5 mins, a lol.log file should appear in /vmfs/volumes/Datastore/3Ware/ and you should receive your first status email.ĪDDRESS= # your SMTP server FQDN # save the script, make it executable (chmod 755 script_name), and run this script directly (./script_name) # chmod u+w /var/spool/cron/crontabs/root # To set this up instantly (before reboot), write these lines to a script, prefix these lines with: # /bin/echo "*/5 * * * * /vmfs/volumes/Datastore/3Ware/tw_diskcheck" > /var/spool/cron/crontabs/root Thanks Paul! # To setup to run every 5 mins via cron, edit /etc/rc.local and add the following lines: In case anyone wants to reference the old version it is located here. My old script is still running on my ESX system and working fine. Paul also added some enhancements, including much better comments, to the script which is now below. Apparently there was some issues with the way the date was parsed outside of the USA. UPDATE! Thanks to Paul Atherton for creating a modified version of the script. Hopefully this script can also help someone who wants to use openssl to send email using gmail. You also have to make sure your files are stored on a volume at /vmfs/volumes so they don't get erased after a reboot. This will setup a cron job so the script runs every 5 minutes. usr/lib/vmware/busybox/bin/busybox crond bin/echo "*/5 * * * * /vmfs/volumes/vol/emailalerts/tw_diskcheck" > /var/spool/cron/crontabs/root

3ware 9550sx vmware esxi 5

For ESXi 5.1 you have to edit /etc/rc.local.d/local.sh and add the following lines: VMWare has a bunch of hoops you have to jump through in order to schedule tasks and where to put files so they aren't erased after a reboot. Without the sleep command, openssl would just hang after about 2 lines of input. The trick was making the input sleep for gmail's servers to respond.

3WARE 9550SX VMWARE ESXI 5 CODE

I finally got it working using openssl which can be seen in the code below. That was a bunch of headaches trying to figure out the syntax. The real issue arose when I wanted to send an email using gmail as my smtp server. After a little searching, I found that an app called tw_cli that can check the status of the RAID array from the command line.

3WARE 9550SX VMWARE ESXI 5 SOFTWARE

I got it installed just fine but there wasn't any software that would automatically check the status of the array and email me if something was wrong. So I bought myself a new 3ware 9650SE-4LPML RAID Controller for my ESXi 5.1 server and ran into a few issues regarding email alerts.









3ware 9550sx vmware esxi 5