Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_bacula_log
1.8
2011-01-11
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
GPL
97128
File | Description |
---|---|
nocturnal_nagios_plugins-1.0.tar.gz | include check_bacula |
check_bacula_log.pl.txt | check_bacula.log.pl v1.7 |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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.
Requirements:
- Nagios
- Perl
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.
Requirements:
- Nagios
- Perl
Reviews (4)
byarnotixe, March 4, 2017
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 :)
#http://stackoverflow.com/questions/3506475/how-do-i-get-yesterdays-date-using-localtime
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 !
#Yesterday :)
#http://stackoverflow.com/questions/3506475/how-do-i-get-yesterdays-date-using-localtime
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 !
byalfred, March 2, 2011
hello,
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));
regards
alfred
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));
regards
alfred
bydaveb93, June 13, 2010
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/p1.pl line 250.\n
I can provide more information if needed ... I would love this script as it does exactly what I need !
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/p1.pl 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
hi.
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.
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_bacula_log/check_bacula_log.pl
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.
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_bacula_log/check_bacula_log.pl