{"id":367,"date":"2006-07-19T17:30:28","date_gmt":"2006-07-19T16:30:28","guid":{"rendered":"http:\/\/wp.devco.net\/?p=367"},"modified":"2009-10-09T14:27:11","modified_gmt":"2009-10-09T13:27:11","slug":"monitoring_bacula_jobs_using_nagios","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2006\/07\/19\/monitoring_bacula_jobs_using_nagios.php","title":{"rendered":"Monitoring Bacula Jobs using Nagios"},"content":{"rendered":"
My previous homebrew backup system had a number of drawbacks, one of the biggest was that its daily emails were massive, listing all the files that was backed up. My previous homebrew backup system had a number of drawbacks, one of the biggest was that its daily emails were massive, listing all the files that was backed up. With a lot of machines being backed up these mails can come to several MB per day but also general Human Nature means I just didn’t […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[7],"tags":[65,64],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/367"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=367"}],"version-history":[{"count":1,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/367\/revisions"}],"predecessor-version":[{"id":600,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/367\/revisions\/600"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\nWith a lot of machines being backed up these mails can come to several MB per day but also general Human Nature means I just didn’t pay them enough attention. For instance, I would need to somehow notice if on a given day the tar died half way through by manual inspection, this was pretty useless.
\nBacula<\/a> provides good one-page job status emails on a daily basis but still I tend to not look at them as I will get about 20 of them a day, the ideal situation is to have it only mail you on errors and it does support this. There is one problem with this though, if anything prevents the mail from getting to you, or in-fact if the whole Director process dies and no backups get run at all you just wont know about it.
\nI’ve written a per-job monitoring solution that uses Bacula’s ability to run a script on the client after a successful backup has been run, it writes a small status file with a timestamp, this I pull into Net-SNMP<\/a> and query over the network using Nagios<\/a>.
\nNow if any of my jobs fail or if the whole backup system collapses Nagios will notify me via my already existing notification systems, email and SMS in my case. I will still get the Error mails from Bacula but I totally do not rely on them, they are merely there for information purposes so I can use them to quickly investigate a error once Nagios has alerted me.
\nI’ve documented this and put up the short scripts I use to achieve this, you can see this document in my wiki<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"