On 07/02/2011 12:06, Dan Langille wrote: > On 2/6/2011 4:31 PM, Allan Black wrote: >> 30 21 * * 5 /usr/local/nagios/bin/bacula_monitor Gershwin >> 40 21 * * 5,6 /usr/local/nagios/bin/bacula_monitor -W Catalog > > One entry per job?
Sorry, yes. BTW, "Gershwin" and "Catalog" are the job names, and Gershwin is scheduled for 21:30 on a Friday, Catalog for 21:40 on Friday and Saturday, exactly the same times as the monitor is started. The monitor script starts with a sleep, so it's OK to start it at the same time as the backup. >> I have also attached another script (bnu) which sends Nagios a passive >> alert >> to update a service with the status of a job which has already >> terminated. I >> use this script sometimes if I have to restart a job manually, but >> didn't run >> bacula_monitor again. If Nagios is still critical because the original >> job >> failed, bnu will update the Nagios service. > > How do I use bnu? Again, sorry (I think the original email was getting a bit too big) "bnu <jobname>" or "bnu -i <jobid>" It looks in the "st dir" output for the jobid or the most recent run of the job name, and updates the Nagios service with the termination status. If it can't find the job in the director output, it will go to the Catalog. (Dan - I've just realised - you use PostgreSQL, don't you? You'll need to change the mysql command, although it won't actually matter unless you try to update a really old job!) Another apology (oh dear) - I should have said you'll need to change the paths at the top of the script (but most people should be able to cope with that!) Allan ------------------------------------------------------------------------------ The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users