Xsanity Sanity for Apple's Xsan and Final Cut Server.
  
Sunday, May 19 2013 @ 09:36 PM EDT
Topics
Storage (39)
People (1)
Xsan (103)
How To (26)
User Functions
Username:

Password:

Don't have an account yet? Sign up as a New User
Who's Online
Guest Users: 15
Sponsorship

Xsanity is proudly sponsored by:

Tekserve
The Old Reliable Mac Shop

Tips & Tricks
Scripting Xsan monitoring

This is a bash script I wrote for automating notifications for things that Xsan doesn't notify you about by itself. 318 has quite a few Xsan deployments to keep an eye on, and this helps get a quick overview of volume status and latency for them, so we know which ones need a little extra attention.

Lithium and other similar applications can do some of what we're doing here, but this is a quick way to do it without licensing.

Here's what it does:

  1. Grabs volume names by looking at the directories in /Library/Filesystems/Xsan/data
  2. Runs cvfsck -nv on the volumes it finds, extracting the Volume Status (Clean or Dirty)
  3. Looks through the volumes' current cvlog for hourly latency summaries from the current day, pulling out sysavg
  4. f the volume is Dirty, or any of the syavg numbers are above a predefined level, sends a notification email

  Options:

   -h
   Prints a usage summary.

   -l [Latency Level]
   Sets your acceptable latency level. Default is 500. You'll probably want to set that higher, especially if you've got a Promise instead of an Xserve RAID.

   -a [email address]
   Specify the address you want to send notifications to. Default is "root@localhost". You'll probably want to change that too.

I created an installer package, that installs both the script and a launch daemon that runs daily at 11 PM. Or you can just grab the script, sans installer.



Scripting Xsan monitoring | 3 comments | Create New Account
The following comments are owned by whomever posted them.
Scripting Xsan monitoring
Authored by: Moe on Friday, October 30 2009 @ 03:00 AM EDT
Thanks for the script

It seems to work fine
one bug ( or a feature :) I found is that complains if the xsan directories /Library/Filesystems/Xsan/ and /Library/Filesystems/Xsan/data contains .DS_Store files
solution was to remove these files

[ Reply to This ]
  • Scripting Xsan monitoring - Authored by: techychic on Wednesday, December 09 2009 @ 04:23 AM EST
  • Scripting Xsan monitoring - Authored by: koppenhoefer on Friday, August 27 2010 @ 09:55 AM EDT
  • Story Options
    Best Viewed on a Mac | Suggested Browser: Whatever floats yer boat.