This chapter is a quick step-by-step guide to building a basic but very useful reporting system. Sample script code is provided in <Report Tool installation folder>\webreport.bat. This script implements the following features:
Do you need a professional solution for change management on CUCM? Check out our product Track and Audit Configurations or contact us. |
After this script has run several times, the published files on the web page will look as follows and the report can be opened by selecting a report:
Sample script code is provided in <Report Tool installation folder>\scripts\webreport.bat – so you can quickly build a custom web reporting front end to leverage the capabilities of Report Tool further. Since it is a script, you can also fully customize it to your needs by modifying the script code. This script is a simple windows BAT file and is already deployed in the Report Tool folder by the installer (by default) to 'C:\Program Files\UPLINX Report Tool\scripts\webreport.bat'.
The script can be run from Windows Command Prompt and also by the Windows Task Scheduler to automatically generate reports at scheduled times. To generate a scheduled report, configure a new task to run this script by the Windows Task Scheduler. Perform the following steps to create and publish reports:
Step 1: Setup Report Tool in GUI Mode
Start Report Tool and configure:
After closing Report Tool, these settings will be stored in the default profile, and the default profile settings will be used when Report Tool is run from the command line without the /config option. Alternatively, you can create a specific profile in GUI mode to use its settings by calling ReportTool.exe /config "myprofile".
Step 2: Create the Script File
A sample script is provided in the file webreport.bat. It is a simple windows BAT file and is already deployed in the Report Tool folder (by default: 'C:\Program Files\UPLINX Report Tool\scripts\webreport.bat'). It needs to be modified to your needs. Please note the comments which explain the steps and any modifications required:
Step 3: Download and install BLAT http://sourceforge.net/projects/blat/files/
Blat – Windows Command Line SMTP Mailer. You can also use any other mailer – in that case you have to modify the script accordingly. Use the 32-bit program files and copy all files to the UPLINX Report Tool folder and any path which is part of your %PATH%.
Step 4: Install and Configure IIS
The Windows Task Scheduler can be started in Start > Control Panel > Programs and Features > Turn Windows Features on or off. Make sure to enable Directory Browsing and Static content.
You should now see the standard IIS welcome screen when browsing to http://localhost.
Further customize IIS by creating a virtual directory or enabling authentication. Make sure to hide files that should not appear in the web browser. For example, right click on the file 'web.config' > Properties > Enable hidden in your published folder .
There are plenty of guides on how to enable authentication per user on the web, so this is not outlined here.
Support for Scripts |
Unfortunately, scripting itself is not part of our
support for the UPLINX Report Tool. |
Step 5: Run as Windows Task
The Windows Task Scheduler can be started in Settings > Control Panel > Administrative Tools > Task Scheduler.
To create a new scheduled task, you can use the wizard “Create Task”, select 'webreport.bat' and specify a trigger to define the execution time(s). Select “C:\Program Files (x86)\ReportTool\webreport.bat" for the program to execute or your own script program which has been successfully tested from the command line.
|
Windows Task Scheduler will execute the script in the security context of the configured user account (marked with the red box above). If there are issues when running as a scheduled task, please check the user’s security privileges and configure the user for enable interactive login . |
|
Run the Windows Task under the same Account Name (user) as in interactive mode . The license is per node and per user. Hence, running it under a different user might print 'not licensed' into each 3rd record of a report. |