Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1


Remember Me

Directory Tree


Current Version
Last Release Date
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
nocturnal_nagios_plugins-1.0.tar.gzinclude check_bacula v1.7
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Nagios plugin that checks Bacula logs for last status run.
check_bacula_log is a Nagios plugin that checks whether the backups made for today with the Bacula backup system were succesful.

This requires the Nagios user to have read access to the bacula log file.

Make sure that the user that runs Nagios has read access to the Bacula logs, make sure it also has the right to enter the directory where the log is stored.

- Nagios
- Perl
Reviews (4)
Since I run backups late night I needed also yesterday's backups checked, and did: after #my $date = strftime("%d-%b-%Y", localtime); I added:

#Yesterday :)
my $date = strftime("%d-%b-%Y", localtime);
my ($sec, $min, $hour, $mday, $mon, $year) = localtime();
my $yesterday_midday=timelocal(0,0,12,$mday,$mon,$year) - 24*60*60;
($sec, $min, $hour, $mday, $mon, $year) = localtime($yesterday_midday);
my $yesterdate = strftime("%d-%b-%Y", localtime($yesterday_midday));

and added an OR to the date check further down:
# want only todays and yesterdays jobs
next unless ($job{'Start time'} =~ m/^\Q$date\E\s/) or ($job{'Start time'} =~ m/^\Q$yesterdate\E\s/);

thanks !
nice plugin. my backup runs at night an finishes before midnight so i changed the date:

my $date = strftime("%d-%b-%Y", localtime(time-86400));

Sorry to put it out here but I cannot find a support email

Status always returns as follows:
Check of service '24 Hour Bacula Status' on host 'localhost' did not exit properly!

debug shows the following

[1276483758.016594] [016.1] [pid=13917] HOST: localhost, SERVICE: 24 Hour Bacula Status, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: No, RETURN CODE: 3, OUTPUT: **ePN failed to compile /usr/lib/nagios/plugins/check_bacula_log: "Variable "$PROGNAME" will not stay shared at (eval 1) line 181," at /usr/lib/nagios3/ line 250.\n

I can provide more information if needed ... I would love this script as it does exactly what I need !
byglen, January 21, 2010

i've improved the code to report names of failed jobs, also made code more extensible if you want to fill other info to the job, such change can be accomplised with little effort.

also i renamed the plugin to check_backula_log, not to conflict with check_bacula that is in bacula contrib sources.