ZABBIX Forums  
  #1  
Old 22-10-2007, 22:40
milprog milprog is offline
Junior Member
 
Join Date: Jul 2007
Location: Switzerland
Posts: 20
Default zabbix and bacula: cookbook contribution

Hi all

I use bacula to back up and verify lots of servers. After I had found zabbix to monitor these, I now was tired of checking all those silly "Backup OK ..." mails every day. Moreover, I needed a simple way to monitor the size of each server's backup.

So I made bacula work with zabbix using a self-made perl script. I use bacula 2.0.3, but the procedure should work with other versions as well; perhaps the text strings in the script need some adjustment. Here is my cookbook contribution:

1) On your server hosting the bacula director, create a perl script /etc/zabbix/bin/custom_bacula (see attachment, remove .txt extension), chmod 0755

(sorry, this is my first perl script: not very elegant, but it works for me. Improvements are welcome!)

2) in /etc/bacula/bacula-dir.conf, replace the mailcommand line by:

mailcommand = "/etc/zabbix/bin/custom.bacula %r %c"

and modify the mail line as follows (of course, replace my.zabbixserver.fqdn by your server's dns name):

mail = my.zabbixserver.fqdn = all, !skipped

...this way, the bacula result messages go through the zabbix_sender process instead of being mailed through bsmtp.

3) create zabbix trapper items with the names given in the custom.bacula script, e.g.
bacula.backup.result
bacula.fd.fileswritten (Units: Bytes)
bacula.fd.byteswritten (Units: Bytes)
(etc.)

4) ensure that the FD names in the bacula-dir.conf file correspond to the hostnames used in zabbix.

5) Enjoy! Add triggers for bacula.backup.result >1 or bacula.verify.result >0 to report errors; add thresholds to monitor backup size etc. etc.

Regards
--Marcel
Attached Files
File Type: txt custom.bacula.txt (2.6 KB, 541 views)

Last edited by milprog; 22-10-2007 at 22:49. Reason: Typo
Reply With Quote
  #2  
Old 10-05-2010, 19:41
paje paje is offline
Junior Member
 
Join Date: May 2010
Posts: 2
Default Zabbix and bacula: Key value??

Hello.

What value I put in the key during the configuration itens?
Reply With Quote
  #3  
Old 10-05-2010, 20:49
milprog milprog is offline
Junior Member
 
Join Date: Jul 2007
Location: Switzerland
Posts: 20
Default

simply attach the items to the host that is being backed up. It does not matter whether the value comes from the zabbix_agent located on the host to be backed up or from somewhere else (here, it's the bacula director).

HTH
--Marcel
Reply With Quote
  #4  
Old 21-05-2010, 15:26
paje paje is offline
Junior Member
 
Join Date: May 2010
Posts: 2
Default

Thanks for your help. Now it's works.

I will rewrite this cookbook and translate to brazilian portuguese.

Thank you again.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:36.