Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
NetBackup latest backup status check
1.1
2011-06-01
- Nagios 2.x
- Nagios 3.x
GPL
106193
File | Description |
---|---|
check_nbu_backstat.ps1 | NetBackup latest backup status check plugin |
nbuerror.csv | NetBackup return code list (check_nbu_backstat.ps1 refers to this) |
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!
This PowerShell script works with NSClient++ on MS-Windows environment.
You can check the latest backup status of NetBackup within 24 hours.
This script is written in the MS-PowerShell, is used for Windows NetBackup Master server.
<< Distribution Files >>
1. check_nbu_backstat.ps1 <-- this script
2. nbuerror.csv <-- CSV file
<< How To Install >>
[check_nbu_backstat.ps1 Settings]
1. Copy "check_nbu_backstat.ps1" and "nbuerror.txt" into the scripts folder of NSClient++(ex. C:Program FilesNSClient++scripts).
2. Modify / Check the values of $nbuBin and $statFile if you need.
3. Modify / Add the "RETURN CODE TABLE SETTING" in the "searchRtnStat" function if you need.
[NSClient++ Settings]
4. Add the following setting in the [Wrapped Scripts] in the section in the "NSC.ini".
check_nbu_backstat=check_nbu_backstat.ps1 $ARG1$
5. Enable the settings in the "NSC.ini".
- port=5666
- command_timeout=60
- allow_arguments=1
- allow_nasty_meta_chars=1
- script_dir=scripts
- socket_timeout=30
- allowed_hosts=xxx.xxx.xxx.xxx/xx
6. Restart the "NSClient++" service.
[Nagios Settings]
7. Add the following setting to Nagios "commands".
$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_nbu_backup -a $ARG1$
8. Add new Nagios "service" to check status of the backup job.
* The backup client name that you want to check the latest backup status have to be set to $ARG1$ in the "service" setting.
<< Evaluation Environment >>
- NetBackup 7.x
- Windows Server 2003, 2008
1. check_nbu_backstat.ps1 <-- this script
2. nbuerror.csv <-- CSV file
<< How To Install >>
[check_nbu_backstat.ps1 Settings]
1. Copy "check_nbu_backstat.ps1" and "nbuerror.txt" into the scripts folder of NSClient++(ex. C:Program FilesNSClient++scripts).
2. Modify / Check the values of $nbuBin and $statFile if you need.
3. Modify / Add the "RETURN CODE TABLE SETTING" in the "searchRtnStat" function if you need.
[NSClient++ Settings]
4. Add the following setting in the [Wrapped Scripts] in the section in the "NSC.ini".
check_nbu_backstat=check_nbu_backstat.ps1 $ARG1$
5. Enable the settings in the "NSC.ini".
- port=5666
- command_timeout=60
- allow_arguments=1
- allow_nasty_meta_chars=1
- script_dir=scripts
- socket_timeout=30
- allowed_hosts=xxx.xxx.xxx.xxx/xx
6. Restart the "NSClient++" service.
[Nagios Settings]
7. Add the following setting to Nagios "commands".
$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_nbu_backup -a $ARG1$
8. Add new Nagios "service" to check status of the backup job.
* The backup client name that you want to check the latest backup status have to be set to $ARG1$ in the "service" setting.
<< Evaluation Environment >>
- NetBackup 7.x
- Windows Server 2003, 2008
Reviews (2)
byNapsty, November 24, 2011
Very good once it works, but complicated to get it running!
I finally got it running by using this line in the [NRPE Handlers] section:
check_nbu_backstat=cmd /c echo scriptscheck_nbu_backstat.ps1 $ARG1$ | powershell.exe -command -
I finally got it running by using this line in the [NRPE Handlers] section:
check_nbu_backstat=cmd /c echo scriptscheck_nbu_backstat.ps1 $ARG1$ | powershell.exe -command -
bysantoshkp, October 27, 2011
Thanks for the script.
I am facing some issues when running this script from a path where path name contains a space (eg; C:\Program Files\NSClient++\scripts). My entry is like as follows in nsc.ini file at "NRPE handler section).
Entry in NRPE handle section:
check_nbu_backup=cmd /c echo & 'C:\Program Files\NSClient++\scripts\check_nbu_backstat.ps1' $ARG1$ $ARG2$; exit $LastExitCode | powershell.exe -command -
On executing the command from collector:
[root@inblr-gitotest1 libexec]# ./check_nrpe -H inhyd-gitos2 -c check_nbu_backup -a "-nbuClient" "test"
getting the output as "ECHO is on.
The filename, directory name, or volume label syntax is incorrect."
If one will go by your instaructions, the standalone run of the script wants 2 arguments ( 1 option - "-nbuClient" and [nbu client name - let be named as "test"). If this is the case then how can be command in NSC.ini file will be with one argument as (check_nbu_backstat=check_nbu_backstat.ps1 $ARG1$
).
If i am configuring the way you mentioned then the PS script is not invoked by the nrpe.
Please guide if i am doing anything wrong here.
let me know if u need any more details here.
Thanks,
Santosh
I am facing some issues when running this script from a path where path name contains a space (eg; C:\Program Files\NSClient++\scripts). My entry is like as follows in nsc.ini file at "NRPE handler section).
Entry in NRPE handle section:
check_nbu_backup=cmd /c echo & 'C:\Program Files\NSClient++\scripts\check_nbu_backstat.ps1' $ARG1$ $ARG2$; exit $LastExitCode | powershell.exe -command -
On executing the command from collector:
[root@inblr-gitotest1 libexec]# ./check_nrpe -H inhyd-gitos2 -c check_nbu_backup -a "-nbuClient" "test"
getting the output as "ECHO is on.
The filename, directory name, or volume label syntax is incorrect."
If one will go by your instaructions, the standalone run of the script wants 2 arguments ( 1 option - "-nbuClient" and [nbu client name - let be named as "test"). If this is the case then how can be command in NSC.ini file will be with one argument as (check_nbu_backstat=check_nbu_backstat.ps1 $ARG1$
).
If i am configuring the way you mentioned then the PS script is not invoked by the nrpe.
Please guide if i am doing anything wrong here.
let me know if u need any more details here.
Thanks,
Santosh