Home Directory Plugins Backup and Recovery Nakivo Backup and Replication monitoring

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Nakivo Backup and Replication monitoring

Current Version
1.8.8
Last Release Date
2016-04-12
Compatible With
  • Nagios 3.x
License
GPL
Hits
42131
Files:
FileDescription
check_nakivo_job.plCheck the status of a Nakivo Backup Job
check_nakivo_repository.plCheck state and free space of Nakivo Repository
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Nakivo Backup and Replication monitoring
This project is to help us connect Nagios with Nakivo Backup & Replication (Linux environment) so we can monitor important components. Currently I created 2 perl scripts, by using an example script (check_exit_status.pl) since my programming skills in perl are not that great.
Place the scripts in the /usr/lib/nagios/plugins folder and make them executable. Each of the scripts need to be edited and the Nakivo username and password filled in.
These perl scripts are using the Nakivo commandline interface script (/opt/nakivo/director/bi/cli.sh). Make sure that this script is also made executable, otherwise you get Access Denied. With this Nakivo script you can determine all backup jobs defined in it with the following command:
./cli.sh -jl -u -pwd .
The username and password are the same you use to login to Nakivo.
Also get a list of repositories in a similar way:
./cli.sh -rl -u -pwd .

Each of the jobs and repositories are numbered and you need that number to enter the check command in the nrpe.cfg file. Examples:
command[check_nakivo_job2]=/usr/lib/nagios/plugins/check_nakivo_job.pl -j 2
command[check_nakivo_repository2]=/usr/lib/nagios/plugins/check_nakivo_repository.pl -r 2 -w 5000 -c 500

The first will check job ID = 2 and report if the job ended ok or not. It will give a warning when the last run was not ok AND the job is currently running.

The second command is to check repository ID = 2 and report the state and check the free space. The free space levels is set by the -w (warning) and -c (critical) levels in MB. So in the example the warning will be activated when free space sinks below 5GB and goes red when it almost reach the bottom at 500MB.

Currently working with Nakivo v3.1 to v3.9.

Update 1.7.1: Handle large numbers with , in the Repository script.
Update 1.7.3: Change in output of Nakivo v3.9, made script more adaptive.
Update 1.8.8: Added the Status output with maintenance info. If maintenance is running the level will turn yellow (Warning).

Feel free to change the files and use it as you see fit. Good luck!
Reviews (1)
bympleite, November 26, 2021
root@nakivo:/opt/nakivo/director/bin# /usr/lib/nagios/plugins/check_nakivo_job.pl -j 1
sh: 1: Syntax error: redirection unexpected
Use of uninitialized value $part[4] in substitution (s///) at /usr/lib/nagios/plugins/check_nakivo_job.pl line 68.
Use of uninitialized value $part[5] in substitution (s///) at /usr/lib/nagios/plugins/check_nakivo_job.pl line 69.
Use of uninitialized value $part[6] in substitution (s///) at /usr/lib/nagios/plugins/check_nakivo_job.pl line 70.
Use of uninitialized value $part[6] in pattern match (m//) at /usr/lib/nagios/plugins/check_nakivo_job.pl line 72.
Use of uninitialized value $part[5] in pattern match (m//) at /usr/lib/nagios/plugins/check_nakivo_job.pl line 76.
Use of uninitialized value $part[4] in concatenation (.) or string at /usr/lib/nagios/plugins/check_nakivo_job.pl line 86.
Use of uninitialized value $part[6] in concatenation (.) or string at /usr/lib/nagios/plugins/check_nakivo_job.pl line 86.
Nakivo Job is CRITICAL - :