Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Nagios plugin that checks Bacula logs for last status run.
Current Version
1.8
Last Release Date
2011-01-11
Owner
Elan Ruusamäe
Website
https://github.com/glensc/nagios-plugin-check_bacula_log
Download URL
https://github.com/glensc/nagios-plugin-check_bacula_log/releases
License
GPL
Compatible With
include check_bacula
check_bacula.log.pl v1.7
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
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$dateEs/) or ($job{'Start time'} =~ m/^Q$yesterdateEs/); thanks !
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
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 !
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
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!