cancel
Showing results for 
Search instead for 
Did you mean: 

OpCenter Analytics - Capacity Reporting for 30 Days

I have a customer who is insisting there be a way to truncate the default 90-day Capacity report to 30 days without any scripting and in a single-push button method. We've tried the following to no avail:

  1. /usr/openv/netbackup/bin/admincmd/nbdeployutil --gather --traditional --hoursago=720 –output=<folder name of your choice > --exclude-all-cli
  2. Modifying the PURGE_INTERVAL=30  in nbdeployutilconfig.txt
  3. for i in 'cat filename'
    do
    mkdir /tmp/nbdeploy/$i
    echo $i >/tmp/nbdeploy/$i/master.txt
    /usr/openv/netbackup/bin/admincmd/nbdeployutil --master $i --gather --capacity --hoursago=720 –output=/tmp/nbdeploy/$i --exclude-all-clients
    /usr/openv/netbackup/bin/admincmd/nbdeployutil --master $i --capacity --report /tmp/nbdeploy/$i --output=/tmp/nbdeploy/$i
    done

Bullets one and two returned 90 days. Bullet three was not the customer's preferred method. The config file is the closest to what the customer wants. I noticed there is a 'minimum value' that can be defined in the file, but where?

Excerpt from https://www.veritas.com/support/en_US/doc/24437881-131832103-0/v120885038-131832103:

If fewer than 90 days is indicated, nbdeployutil uses 90 days as the value. Data that is older than 180 days is purged.

Data to be purged = current date - purge_interval.

Minimum value = 90 days.

Anyone know where I can modify that value? Or am I just chasing my tail and this can't be done?

Tags (2)
1 Solution

Accepted Solutions
Accepted Solution!

Re: OpCenter Analytics - Capacity Reporting for 30 Days

HI @KameliaB 

I'm not sure why your original option 1 didn't work - that is the way to change how far backup the nbdeployutil will report.

I do note that the example you provided indicated "traditional" rather than capacity, but assume that this was just a typo. Also you still need to generate the repoort from the gathered data (so a two step process).

I have just tested this on a test system I have and using the --hoursago=720 doies restrict the "look back" to 30 days.

Your original option 2 - the purge interval relates to the smartmeter automatic reporting (using nbdeployutil incrementally each week) and cleaning up after this period of time - it does not change the "look back" value.

Option 3 looks to be what you intended in option 1 with both the gather and report commands used - but for multiple master servers. 

The only one button approach I know of is using OpsCenter NetBackup Licensing report, (this can with a few clicks generate reports for all master servers monitiored. Not sure it is possible to alter the "look back" default of 90 days though. I do not believe it is a parameter that can be set in the nbdeployutilconfig.txt file.

 

View solution in original post

8 Replies

Re: OpCenter Analytics - Capacity Reporting for 30 Days

Hey
I did check the commands reference guide and found this

PREREQUISITES
The following are the prerequisites for the nbdeployutil utility:
■ The master server daemons or services must run in the environment to gather
the data.
■ Confirm that sufficient disk space exists on the master server that runs the gather
command. Gathering capacity licensing data collects bpimagelist output for
the previous 90 days. The size of the output is a function of the number of images
in the catalog for that period. The default time period can be moved or shrunk.
Shorter time range analysis causes less accurate or incomplete figures.

and this:

--start
Specifies the start date for a restricted date range for the collection period. The
format for this parameter is "MM/DD/YYYY hh:mm:ss". Specify the time value
hh:mm:ss in 24 hour notation, where 6:00 A.M. is 06:00:00 and 6:00 P.M. is
18:00:00. Be aware the double quotation marks around the date time value
are required.

--end
Specifies the end date for a restricted date range of the collection period. This
option is used only with the start option. The format for this parameter is
"MM/DD/YYYY hh:mm:ss". Specify the time value hh:mm:ss in 24 hour notation,
where 6:00 A.M. is 06:00:00 and 6:00 P.M. is 18:00:00. Double quotation
marks must surround the date time value.

 

so you can give a try - but still it will be script methodology...

Re: OpCenter Analytics - Capacity Reporting for 30 Days

Thank you quebek,

Can I plug in those values at the end of the following script:

nbdeployutil --master <master names> --capacity --report /tmp/nbdeploy --output=/tmp/nbdeploy --start <MM/DD/YYYY hh:mm:ss> --end <MM/DD/YYYY hh:mm:ss>

Or do I replace "hoursago" in this command with --start and --end

nbdeployutil --gather --capacity--hoursago=720 –output=<folder name of your choice> --exclude-all-clients

Re: OpCenter Analytics - Capacity Reporting for 30 Days

Just to get rid of their initial objection point out that not all months have 720 hours in them. Ta da, now you have to script it. =) 

Once you've done that, yes, running the command with --hoursago ought to do what you want. 

 

Re: OpCenter Analytics - Capacity Reporting for 30 Days

Smiley LOL I just spit my coffee! 

Thanks, will do!!

Accepted Solution!

Re: OpCenter Analytics - Capacity Reporting for 30 Days

HI @KameliaB 

I'm not sure why your original option 1 didn't work - that is the way to change how far backup the nbdeployutil will report.

I do note that the example you provided indicated "traditional" rather than capacity, but assume that this was just a typo. Also you still need to generate the repoort from the gathered data (so a two step process).

I have just tested this on a test system I have and using the --hoursago=720 doies restrict the "look back" to 30 days.

Your original option 2 - the purge interval relates to the smartmeter automatic reporting (using nbdeployutil incrementally each week) and cleaning up after this period of time - it does not change the "look back" value.

Option 3 looks to be what you intended in option 1 with both the gather and report commands used - but for multiple master servers. 

The only one button approach I know of is using OpsCenter NetBackup Licensing report, (this can with a few clicks generate reports for all master servers monitiored. Not sure it is possible to alter the "look back" default of 90 days though. I do not believe it is a parameter that can be set in the nbdeployutilconfig.txt file.

 

View solution in original post

Re: OpCenter Analytics - Capacity Reporting for 30 Days

Thank you for a very comprehensive response, @davidmoline. I found you are correct and that the following two commands will return a 30-day report, if ran on a Master server. The reason it didn't work initially is because the customer ran it off the OpsCenter server.

I've confirmed that you can add a list of masters to the command, but it will request credentials for each remote server. The customer is requesting to run one command to return results for 45 servers, I'm pretty sure this will not fly. Also confirmed OpsCenter will always return 90-days if the command is modified to look back 90days or less. 

nbdeployutil --gather --capacity--hoursago=720 –output=<folder name of your choice> --exclude-all-clients

nbdeployutil --master <master1,master2...> --capacity --report /tmp/nbdeploy --output=/tmp/nbdeploy --start <MM/DD/YYYY hh:mm:ss> --end <MM/DD/YYYY hh:mm:ss>

 

Re: OpCenter Analytics - Capacity Reporting for 30 Days

@KameliaB you're welcome.

The nbdeployutil utilises/generates a file called gather_options.json which contains the hoursago value. I'm not sure what process creates this file nor at what stage in the process it is created. If you can figure out what creates this and whether it is an input to the process or merely the output, then maybe the OpsCenter method could be made to do what your customer would like. 

Out of curiousity, what is the problem with the 90 day report and why does your customer only want to review for 30 days?

Re: OpCenter Analytics - Capacity Reporting for 30 Days

As far as credential prompting goes...not that it'd be supported, but you could always just run the nbdeployutil binary from NBU v8.0 - that one doesn't have that logic and will run just fine against remote trusted Masters up to at least v8.1.1 (as far as I tested). Not that anyone would do something like that of course. ;)

NBDEPLOYUTIL=/scripts/nbdeployutil80
HOSTNAME=`hostname`
DATE=`date "+%Y%m%d_%H%M%S_"`
GATHER_FILE=`echo "$DATE$HOSTNAME"`
MASTERS="master1,master2,master3"
HOURSinMON=720 # testing value only, you should dynamically calculate this of course

$NBDEPLOYUTIL --gather --master ${MASTERS} --capacity --hoursago $HOURSinMON

# Dynamically figure out what Masters have been gathered and run the report against them.
MASTER_GATHERS=( /usr/openv/var/global/reports/${GATHER_FILE}/`date +"%Y"`* )
$NBDEPLOYUTIL --report --capacity ${MASTER_GATHERS[@]}

Have fun. =)