monitoring

Generating email warnings of Bacula jobs that complete "OK" but have zero files or zero bytes

A recent feature request on the Bacula Community version mailing list was to have Bacula set a job's status to "W" (Backup OK -- with warnings) when a job completed with zero files or zero bytes.

The general consensus was that this probably should be handled outside of Bacula code, since it would require and additional directive and of course additional coding.

This request interested me and it prompted me to write this short script.

After editing some basic variables near the top of the script, the script requires only one command line parameter - the jobid - and currently also accepts "debug" to log everything to stdout, and "zero_incremental_ok" which does not trigger when Incremental or Differential jobs have zero files or zero bytes.

Example email subject when an email report is triggered:

Subject: Warning from Bacula Server - Backup job 'SpeedyVMs' (jobid 18511) was "OK", but wrote zero files and/or zero bytes

Generating Basic Bacula Backup Email Summary Reports (Updated Version)

In April of 2013, a request was made on the Bacula mailing list for a way to get daily and weekly backup reports. This got me to thinking that such a daily email would be useful.

So, off I went to write a simple bash shell script to generate these reports. Over time, many features were added to this script and it has evolved quite a bit over the past 4 years. The original posting about this script may be found here: http://www.revpol.com/baculasummaryemails-ORIG

Getting Bacula's Bootstrap (.bsr) Files To A Safe Place Via Email

Here is a very simple script to make sure that your Bacula bootstrap files are emailed to an offsite system. This script may be called manually, or from a cron job, or from a Bacula Catalog backup job's "After" Runscript.

Monitoring Samba users, shares, and connections with Xymon

I thought it would be a good idea to monitor some basic stats from the Samba servers that we manage and maintain. It would be nice, for example, to know the total number of users in the domain (LDAP, or tbd), the total number of machines in the domain, the number of currently connected users, the number of currently opened shares, and total number of open files.

Of course, if we have all of this information, we are going to graph it too!

Below is a short Xymon external script (bash shell script) which gathers this information using pdbedit, smbldap-userlist, and smbstatus and reports the information back to the Xymon server.