Constant Type Description
Amount of Time Passed
(Timepassed)
For fields that gather data based on a time interval that has elapsed. For example, the amount of time it took to run a backup job. Can be specified in the following formats:
HH:MM:SS (22:10:11) – Based on a 24-hour clock HHMMSS (221011) – Based on a 24-hour clock Boolean Arguments
(boolean)
For fields that return boolean results. For example,
‘Does the machine have the Server version of NVBU’ = Yes/No ‘<option X> is enabled for this job’ = True.
Examples of boolean values: Yes or No
True or False
Date Specific date an NVBU event occurred. For example, nvreport -class “job history” -include “%STARTDATE >= [Date]”.
This can be specified in the following formats: Specific Date:
YYYY/MM/DD (2005/01/15) – Year/Month/Date YYYYMMDD (20050115) – YearMonthDate Past Date:
now-[number value][time variable (YE = Year, MO = Month, WE = Week, DA = Date, HO = Hour, MI = Minute, SE = Sec- ond)]. For example, “now-1YE” would be one year ago) Days of the Week
(daysinweek)
For fields that return a day of the week, use the following format: [NN] – A two letter indication for each day of the week:
Sunday = “SU” Monday = “MO” Tuesday = “TU” Wednesday = “WE” Thursday = “TH” Friday = “FR” Saturday = “SA” Days of the Month
(daysinmonth)
For fields that require a specific date in the month, use the following format:
[Day(s) of the Month] – Date(s). For example, 1, 2, 4, 8, 23. For multiple values use a comma separator and all enclose all values in quotes.
Count of Hours, Days, Weeks, Months and Years (hdwmycount)
For fields that require a total number of hours, days weeks months and years, use the following format:
[#H] [#D] [#W] [#M] [#Y] - For example, “12H 2W 10M 18Y” would be 12 hours, two weeks, 10 months, and 18 years. Each time variable can be added or omitted as required.
Large Number Value (Integer)
Same as “Number Value” below, but for larger numeric values. For example, 764874497498723497. No commas needed. Number Value
(Integer)
For fields require a numeric value as their resulting data. For example, to only list jobs whose instance ID meets a given value nvreport -class “job history” -include %INSTANCEID = [Number Value] 1 5 pluginscreen N/A selectiontree N/A String of Text (String)
For fields that require a string. For example,
nvreport -class “job history” -include “%EXITSTATUS != [String of Text]”
Some examples of strings that are issued and can be used as a “[constant]”:
Failed
“Completed with Warnings”
Strings of text with spaces must be enclosed in quotes). System Time
(Systime)
Specific time applying to an NVBU event that occurred in relation to the system time on the NVBU Server. This can be specified in two ways:
Specific Time: The number of seconds that have passed since midnight, on January 1st 1970: (for example, a value of “1104537600” seconds would be midnight on January 1st, 2005, taking all leap years into account since 1970) Past Time: now-[number value][time value] (YE = Year,
MO = Month, WE = Week, DA = Date, HO = Hour, MI = Min- ute, SE = Second -- for example, “now-30mi” would be 30 hours ago)
Time Specific time an NVBU event occurred, for example, nvreport -class "job history" -include "%STARTTIME >= [Time]"
This can be input in two ways:
Specific Time: Use the following formats:
HH:MM:SS (22:10:11) - Based on a 24-hour clock HHMMSS (221011) - Based on a 24-hour clock
Past Time: now-[number value][time variable (YE = Year, MO = Month, WE = Week, DA = Date, HO = Hour, MI = Minute, SE = Second)]. For example, “now-12ho” would be 12 hours ago.
Unique N/A
Note the following:
Use the Field’s “Real Name” as Set in the Template File – You must provide the real name for the field that is to be included/excluded.
Prefix the Fields with a Percentage (“%”) Symbol - In order for the CLI to recognize each field, it must be prefixed with a “%” symbol. If a percentage symbol exists in a field title for a selected template, use the escape sequence “%%” when inputting the field title.
Use Boolean Arguments to Join Multiple Include/Exclude Expressions – To join multiple include/exclude expressions, use the boolean arguments – “AND” and “OR”. In addition, use parenthesis to indicate the priority of the boolean arguments. When using multiple entries, enclose all in quotes (“ ”). nvreport -class “Job History” -include
“(%JOBDEFINITIONID > 50 AND %INSTANCEID < 5) OR %TYPE = restore”
4.2.3.e Title Option
When a report is run and viewed from the command line, it is given the default title
Report “CLI Report” in the output. This option can be used to change the report title, and is applied using the following syntax:
-title <NewReport Title> Note the following:
If a title is to contain any spaces, the entire value must be enclosed in quotes (as demonstrated in the example image, above).
While the “-title” option can be used to label a CLI-output report, it is better suited to label a report that is output to file, and viewed outside of the CLI. Weeks of the Month
(weeksinmonth)
For fields that require a specific week in the month. Input in the following format:
[Week Number] - Desired week number(s). “L” refers to the last week in the month (for example, 134L would include the first, third, fourth, and last week in the month)
4.3.0 External Reports
By default, a report run using the nvreport command from a terminal session window will be output in that window for viewing. However, NVBU also makes it possible to generate actual report files from the command line that are saved to an external directory. These report files can then be used as required. For example, they can be opened for viewing in an HTML-based browser software, they can be sent as e-mail attachments for others to view. This is all made possible through the use of the proper options in the nvreport command syntax.
4.3.1 Creating External Report Files
The process used to create an external report file is generally the same as the process used to run a report and view the results in the terminal session window. Some differences in the syntax do apply, and additional options must be applied. The sections that follow describe how to create an external report.
4.3.1.a Step 1: Select the Template File to Be Used
It is recommended that you use only following options to create an external report file:
The “-templatename” Option – Use this option with the “Nice Name” associated with a specific template file.
The “-templatefile” Option - Use this option to provide the file path for the specific template file to be used. The report templates are present in
the...\reports\templates directory (where “...” refers to the NVBU installation directory).
Important: While it is possible, it is recommended that you avoid using the “-class” option to generate a report file for viewing outside of the terminal session window. The “-class” option is designed to be used with a default template file and create a report for viewing in the terminal session window. You may not obtain the desired end result in an external report when the “-class” option is used.