A simple bash script to email some log reports

| No Comments | No TrackBacks

I wrote a simple bash script to help monitor some aspects of Mac OS X Server. You might find it helpful. You'll need to edit it accordingly for your purposes, and of course, there are no guarantees. Feel free to modify it to your purposes and environment.

I tried to make somewhat agnostic regarding hardware (specifically, which NIC reflects the primary IP). And since I use Tivoli Storage Manager to back up some of our hosts, it includes a grep statement to send notices about TSM.

I'm quite certain it can be made more sophisticated, as I'm a scripting newbie, I'll admit. Nevertheless, you can find it at http://stanford.edu/~nbfa/files/daily-report.sh.

On my 10.4 and 10.5 servers, I made a launchd process that runs this script daily. On my 10.3 server, I made a cron job.

If it helps you learn, then all the better. If you repurpose and use it, then rock on. If you have suggestions to make it better, please comment.

No TrackBacks

TrackBack URL: http://www.stanford.edu/group/macosxsig/cgi-bin/mt/mt-tb.cgi/33

Leave a comment

About this Entry

This page contains a single entry by Noah Abrahamson published on April 6, 2008 8:44 PM.

WebAuth on Leopard (an update) was the previous entry in this blog.

Building WebAuth on Leopard Server is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.