How to modify a scheduled report from the command line.

Document ID : KB000056693
Last Modified Date : 14/02/2018
Show Technical Document Details

For this example, we will show how to modify the scheduled report to show element alias names instead of element names.

Use the –args and enclose all the report arguments in single quotes. For more information on the syntax :

 

 nhSchedule -h

 nhReport -h

 

Here is the original scheduled report from nhSchedule -list -full:

 

1000050 Su,M,Tu,W,Th,F,Sa Enabled  04:02 PM     Trend Report, nhReport -rptType trend -rptName Standard -subjType element -elemType lanIf -subjName 1579278 -uiNamesType names -autoRange prev24Hours -vars latency -protocols all -divBy time -namesType names -chartType line -chartOpts standard -gran asIs -web $(SUBJECT)_$(DATE)_$(TIME) -webUser admin -outputDir $(NH_HOME)/output/$(_reportType)/ -pdf $(SUBJECT)_$(DATE)_$(TIME).pdf -after "nhMail user@domain.com"

 

1. Check the syntax for the proper value of -namesType using nhReport -h:

 

-namesType <type>       display names in reports as (aliases, names)

 

2. Check the syntax for modifying a job via nhSchedule -h where jobId = 1000050:  (in this case, we are only modifying the report, not the parameters of the Scheduled job:

 

-modify <jobId>
     (Required to modify a job) Modifies the specified job.

 

For Windows and Unix (this example was performed on Windows using the Bourne shell (sh)).

> nhSchedule -modify 1000050 -time "04:02 PM" –daily “yyyyyyy” -args 'nhReport -rptType trend -rptName Standard -subjType element -elemType lanIf -subjName 1579278 -uiNamesType names -autoRange prev24Hours -vars latency -protocols all -divBy time -namesType aliases -chartType line -chartOpts standard -gran asIs -web $(SUBJECT)_$(DATE)_$(TIME) -webUser admin -outputDir $(NH_HOME)/output/$(_reportType)/ -pdf $(SUBJECT)_$(DATE)_$(TIME).pdf -after "nhMail user@domain.com"'

Job was modified.

 

3. Verify the results using nhSchedule-list -full:

>nhSchedule -list -full

<snipped>

 

1000050 Su,M,Tu,W,Th,F,Sa Enabled  04:02 PM     Trend Report, nhReport -rptType trend -rptName Standard -subjType element -elemType lanIf -subjName 1579278 -uiNamesType names -autoRange prev24Hours -vars latency –protocols all -divBy time -namesType aliases -chartType line -chartOpts standard -gran asIs -web $(SUBJECT)_$(DATE)_$(TIME) -webUser admin -outputDir $(NH_HOME)/output/$(_reportType)/ -pdf $(SUBJECT)_$(DATE)_$(TIME).pdf -after user@domain.com