in Others

Integrate Nagios Log Server to monitor CloudBacko

Integrate Nagios Log Server to monitor CloudBacko

As CloudBacko is designed as a standalone cloud backup tool, IT infrastructure management software can be used together with CloudBacko for monitoring purpose. Nagios Log Server, the enterprise-class log monitoring tool is a perfect fit. Nagios has a wide variety of plug-ins. It is well-received and used among the system administrator community.

It is possible to use Nagios Log Server to monitor multiple installations of CloudBacko in a network. The following tutorial shows how to integrate Nagios Log Server with CloudBacko.

The following instructions are taken from the user manual of Nagios Log Server. For details, always refer to the Nagios Log Server user manual.

Overview of log files and integration steps

As described in previous blog post, How to integrate Zabbix with CloudBacko for MSPs, CloudBacko log files are stored at the following path:

For CloudbBacko Pro
(Windows XP/2003) -> C:\Documents and Settings\{username}\.cbp\log\%backupset_id%\Backup\YYYY-MM-DD-HH-MM-SS.log
(Windows Vista/7/8/8.1/2008/2008 R2/2012) -> C:\users\{username}\.cbp\log\%backupset_id%\Backup\YYYY-MM-DD-HH-MM-SS.log

For CloudbBacko Lite
(Windows XP) -> C:\Documents and Settings\{username}\.cbl\log\%backupset_id%\Backup\YYYY-MM-DD-HH-MM-SS.log
(Windows Vista/7/8/8.1) -> C:\users\{username}\.cbl\log\%backupset_id%\Backup\YYYY-MM-DD-HH-MM-SS.log

For each backup set, it is necessary to create a new alert in Nagios for every backup set.

In general integration has three steps:

1) Configure input source: set up the log file path for Nagios Log Server to monitor files

2) Create input query: set up which key word to monitor

3) Create alert: set up notifications

Step-by-step tutorial

The following provides a step-to-step tutorial.

(1) Install Nagios Log Server

Check the system requirements. Download and install the log server. For details, please refer to Nagios Log Server the official documentation.

(2) Configure input source

In the main screen, select Administration. A panel of options will appear and select Global Configuration. There are two log input defaults included: Syslog and Windows Event Log.

To add a custom input, click on the + Add input button on top right. The format follows Logstash. Example will be given in paragraphs below.

Assuming we have a CloudBacko Pro in Windows 7 with backup set ID 1409103670275 and Windows username login benjamin.yip, the log file will be generated at the following path:


The log file name is formed by date and time of the backup process.

To configure the new input source in Nagios, add the following in input:

  file {
    path => "C:\users\benjamin.yip\.cbp\log\1409103670275\Backup\*.log"
    start_position => beginning

Click save to keep the setting.

(3) Configure query

Nagios Log Server has a powerful query filter for log file analysis. You should add at least an Error query so that you will be notified of any error in backup actions. You can also view the query result on dashboard. Refer to How to integrate Zabbix with CloudBacko for MSPs for the complete list of backup job status.

To add filter, simply click the ‘FILTERING’ button and click the plus ‘+’ symbol next to the current view filters. Type in the query term “error” and save the query.

Add query

(4) Configure notification

Nagios allows notification to be sent by email or executing a script. To enable email notification, click on the Alert section on the web user interface.

Create AlertSelect the “New Alert” button. Enter the Alert Name, Query, Check Interval and Lookback Period. In Query, choose the query you have saved in step 3. Then select ‘Email Users’ under the Alert Method field. Finish with selecting the Thresholds and users to email the alert to.

New email alert

It’s also possible to execute scripting file. Select the “New Alert” button. As in the previous instruction, enter the Alert Name, Query, Check Interval and Lookback Period. Select “Execute Script” under the Alert Method field. Then add the absolute path in the script field.

Execute scriptThe last field allows you to enter the arguments for further configurations.

(5) Testing

Test your installation. Check if log files are received in server web console.

You should be able to manage multiple CloudBacko installations in servers or desktops, and receive email notifications when error occurs.

Write a Comment