cancel
Showing results for 
Search instead for 
Did you mean: 

Monitoring nbpemreq command

albatroz19
Level 5

Hi,
is there a chance to monitoring

nbpemreq -suspend_scheduling

operation, in order to avoid someone disable schedule and then forget to reactivate, and we risk to loose new backup?

Any suggest is appreciated.

Thanks and Regards,

 

1 ACCEPTED SOLUTION

Accepted Solutions

VerJD
Level 4
Employee

Hi @albatroz19 

You may have to create a script that periodically runs on the server to check if scheduling is suspended (disabled), if it's disabled then resume scheduling (enabled).

The following KB article shows the outputs you would need to look for...

To check scheduled backups are suspended / disabled:
# /usr/openv/netbackup/bin/admincmd/nbpemreq -subsystems screen all | grep -i Scheduling | grep disabled
Scheduling disabled via external command

On Linux:
Here's an example of a bash script for you, that you can use for testing to hopefully accomplish this task:

#!/bin/bash
output=$(/usr/openv/netbackup/bin/admincmd/nbpemreq -subsystems screen all | grep -i Scheduling | grep disabled)
if [[ $output == *"disabled"* ]]; then
    /usr/openv/netbackup/bin/admincmd/nbpemreq -resume_scheduling
fi

This script checks the filtered output of the nbpemreq -subsystems screen all command for the word disabled and if it is found, it runs the nbpemreq -resume_scheduling command to resume scheduling.

You can save this script to a file, for example check_nbpemreq.sh, and make it executable by running the command chmod +x check_nbpemreq.sh. You can then run the script by calling ./check_nbpemreq.sh, or use the Linux cron utility to schedule the Bash script to run at the desired frequency.

On Windows:
Otherwise, for any NetBackup Windows server admins, the same thing could be tested with this example batch script:

@echo off
for /f "tokens=2" %%a in ('"install_path\Veritas\NetBackup\bin\admincmd\nbpemreq" -subsystems screen all | findstr Scheduling | findstr disabled') do (
if "%%a"=="disabled" (
"install_path\Veritas\NetBackup\bin\admincmd\nbpemreq" -resume_scheduling
)
)

Note: Make sure to replace install_path with the actual installation path of NetBackup on your system (e.g. default path C:\Program Files\Veritas).

You can save this script to a file, for example check_nbpemreq.bat, and run it by double-clicking on the file, calling it from the command prompt, or use the Windows Task Scheduler to run the batch script at the desired frequency. Hope that helps!

JD | Veritas NetBackup Support

View solution in original post

5 REPLIES 5

quebek
Moderator
Moderator
   VIP    Certified

hey

run a cron or task schedule job to check for this - and if suspended send an email??

command to use and parse its output

nbpemreq -subsystems screen 30

 

Hi,
thanks for answer, but we don't use email from primary, and i would not use a crontab job , but monitor something that alert me if the scheduler is paused, like snmp trap.

Any other suggestion?

VerJD
Level 4
Employee

Hi @albatroz19 

You may have to create a script that periodically runs on the server to check if scheduling is suspended (disabled), if it's disabled then resume scheduling (enabled).

The following KB article shows the outputs you would need to look for...

To check scheduled backups are suspended / disabled:
# /usr/openv/netbackup/bin/admincmd/nbpemreq -subsystems screen all | grep -i Scheduling | grep disabled
Scheduling disabled via external command

On Linux:
Here's an example of a bash script for you, that you can use for testing to hopefully accomplish this task:

#!/bin/bash
output=$(/usr/openv/netbackup/bin/admincmd/nbpemreq -subsystems screen all | grep -i Scheduling | grep disabled)
if [[ $output == *"disabled"* ]]; then
    /usr/openv/netbackup/bin/admincmd/nbpemreq -resume_scheduling
fi

This script checks the filtered output of the nbpemreq -subsystems screen all command for the word disabled and if it is found, it runs the nbpemreq -resume_scheduling command to resume scheduling.

You can save this script to a file, for example check_nbpemreq.sh, and make it executable by running the command chmod +x check_nbpemreq.sh. You can then run the script by calling ./check_nbpemreq.sh, or use the Linux cron utility to schedule the Bash script to run at the desired frequency.

On Windows:
Otherwise, for any NetBackup Windows server admins, the same thing could be tested with this example batch script:

@echo off
for /f "tokens=2" %%a in ('"install_path\Veritas\NetBackup\bin\admincmd\nbpemreq" -subsystems screen all | findstr Scheduling | findstr disabled') do (
if "%%a"=="disabled" (
"install_path\Veritas\NetBackup\bin\admincmd\nbpemreq" -resume_scheduling
)
)

Note: Make sure to replace install_path with the actual installation path of NetBackup on your system (e.g. default path C:\Program Files\Veritas).

You can save this script to a file, for example check_nbpemreq.bat, and run it by double-clicking on the file, calling it from the command prompt, or use the Windows Task Scheduler to run the batch script at the desired frequency. Hope that helps!

JD | Veritas NetBackup Support

Hi VerJD,
thank you for your suggestion. I think that probably is best solution, but i would like a chance to use snmp trap or OpsCenter to monitor the scheduler, and have an alarm without using scripts and crontab.
Veritas may consider an improvement on the scheduler monitoring in order to avoid human error and that scheduler remain disabled withuout an alert or any other action.

Best Regards,

VerJD
Level 4
Employee

Hi @albatroz19 In the latest supported versions, OpsCenter has been replaced by NetBackup IT Analytics.

That being said, I don't foresee any future improvements being considered for a product that is being deprecated.

Recommend upgrading to one of the latest versions of NetBackup and leverage the features in NetBackup IT Analytics to see if it better suits your needs. For more information, please see the link below.

Hope that helps!

 

JD | Veritas NetBackup Support