in How to

How to integrate Zabbix with CloudBacko for MSPs

CloudBacko is designed as a standalone cloud backup solution. Managed services providers or enterprises working with more than one installation of CloudBacko can utilize third party monitoring software as the management module for CloudBacko. We recommend using Zabbix together with CloudBacko as a central management platform. Zabbix, an open source enterprise-level software, is designed for monitoring availability and performance of IT infrastructure components.

Zabbix has advanced features in network data collection, problem detection, visualization, notification, templating and auto discovery on a network. Zabbix also provides physical and virtual servers monitoring. The software is powerful and easy to use, highly recommended by the industry.

This article briefly describes how to integrate Zabbix and CloudBacko.

For detailed information about Zabbix, refer to the Zabbix documentation:

https://www.zabbix.com/documentation/

Zabbix provides a quickstart guide which is a good entry point for users testing out Zabbix:

https://www.zabbix.com/documentation/2.4/manual/quickstart

CloudBacko and Zabbix integration

Notification in CloudBacko

CloudBacko has a built-in basic email notification function. In the Settings page, click on Email Report, and provide outgoing SMTP Server and login details. After test connection is established, the “Email Address” and “Reports to Receive” sections will appear. Users can then input email addresses recipients and choose reports type to receive. Multiple email recipients are allowed.

CloudBacko provides three types of report: daily Backup Error/Warning Report, Missed Backup Report and Storage Alert Report.

CloudBacko Email Notification

Zabbix for advanced monitoring

Daily warning report is supported in CloudBacko. If users need to immediate notification upon backup job failure, Zabbix is the right tool for the job.  Besides, Zabbix can also be used to monitor log files generated by CloudBacko in different hosts. Integrating Zabbix with CloudBacko can:

  1. Monitor multiple CloudBacko installations in a network
  2. Receive customized failure report at any time of the day by email
  3. Visualize backup job reports from multiple CloudBacko installations in Zabbix dashboard

CloudBacko log file locations

CloudBacko generates detailed backup and restore log files for every backup job. The log files are kept in the following locations:

For CloudbBacko Pro
(Windows XP/2003) -> C:\Documents and Settings\{username}\.cbp\log
(Windows Vista/7/8/8.1/2008/2008 R2/2012) -> C:\users\{username}\.cbp\log

For CloudbBacko Lite
(Windows XP) -> C:\Documents and Settings\{username}\.cbl\log
(Windows Vista/7/8/8.1) -> C:\users\{username}\.cbl\log

The logs are organized by backup set id, each individual backup set has a unique 13 digit numeric number.

For example:
Backup log: C:\users\{username}\.cbp\log\%backupset_id%\Backup\YYYY-MM-DD-HH-MM-SS.log
Restore log: C:\users\{username}\.cbp\log\%backupset_id%\Restore\YYYY-MM-DD-HH-MM-SS.log

The backup/restore log is organized by date and time, YYYY-MM-DD-HH-MM-SS.log.

Scheduler Log
The CloudBacko scheduler logs are used for troubleshooting why the automatic or scheduled backups are not running on time or are missed. The log file is called debug.log, it will record the status of all backup sets on the machine. The debug.log is automatically rotated when they reach 256KB.

Scheduler log can be found in the following locations:

For example:
C:\Documents and Settings\{username}\.cbp\Scheduler
C:\users\{username}\.cbp\Scheduler

Zabbix can be configured to monitor any errors or warnings generated in these CloudBacko log files.

Backup job status

CloudBacko backup jobs can be either complete or incomplete. In CloudBacko log files, there are 7 possible backup job status. Keywords that appear in log files are:

  1. Backup Completed Successfully
  2. Backup completed with error(s)
  3. Backup completed with warning(s)
  4. Backup Interrupted by Error
  5. Backup Interrupted by System Error
  6. Backup Interrupted by Scheduler
  7. Backup Interrupted by User

It is common practice for IT system admin to receive notifications on status 2-7, leaving status 1 alone.

Zabbix configuration

The current stable Zabbix edition is version 2.4. A simplified outline in configuring Zabbix is provided below.  The links and screen captures refers to 2.4 documentation.

Step 1) Download and install Zabbix

Users should first download and install Zabbix server and/or agent in the network. Zabbix provides several installation methods. Users can install from packages or from sources. Refer to the Zabbix documentation for system requirements and detailed installation instructions.

Configuration should start by adding any hosts where CloudBacko is installed.

Step 2) Configure Zabbix: add host

Add host in Configuration → Hosts. Enter host name, groups and IP address.

Step 3) Add log file item

Log file monitoring can be enabled by adding a log file type. It allows log file monitoring by regular expression.

Enter a name for this log item and choose Zabbix agent (active) for type. The key field is where we set up the log file monitoring with regular expressions.

The key field uses format

logrt[/path/to/file/regexp_describing_filename_pattern,<regexp>,<encoding>,<maxlines>,<mode>,<output>]

To monitor a CloudBacko backup (set id:1409103670275) in a Windows 2012 server host with username “benjamin.yip”, use the following key:
logrt["C:\users\benjamin.yip\.cbp\log\1409103670275\Backup\^.*log$","Backup completed with error",,,,1]

The above key will scan log files under user “benjamin.yip” that are generated by backup job id 1409103670275. It will trigger alert in Zabbix if the log files contain the phase “Backup completed with error”.

Restore or schedule log files can be monitored by setting up similar items in Zabbix.

Refer to Zabbix documentation for usage on the optional fields.

Step 4) Add trigger and action, and test configuration

Refer to documentation on detailed configuration and set up steps.

Upon receiving notification, user can login to the host and refer to the Report section in CloudBacko to check which backup or restore job has failed.

Conclusion

This article demonstrates one possible way to monitor CloudBacko log files. Zabbix supports flexible configuration to monitor items and triggers. You can design suitable monitoring scheme according to your business needs.

Write a Comment

Comment