What It Be
Using the command-line workstation (CLW), this script will execute specified reports (via regular expressions found in a configuration file) and email them to appropriate parties. It is designed to be automated via cron so that reports are sent at regular intervals.
You can create a wrapper script that calls this report utility once for each application that needs reports. Each application would have its own configuration file with specified management modules, report names, and destination email addresses. The wrapper would simply have something like this:
reportGenerator.pl -f app1_config.properties
reportGenerator.pl -f app2_config.properties
Then you'd setup crontab to execute the wrapper at a specified time each day or week, and all your reporting will be automated.
This is a free offering from Wily, and thus currently not an officially supported product from Wily Technology. Consult your field rep/SE for assistance, rather than contact Wily Technical Support.
The field extension is tested and developed against Introscope v8.x and v9.x; it will work with any version of the command-line workstation.
It requires Perl 5.8 or newer.
It has been tested on Windows, Linux, and Mac OS-X.
This script requires shared libraries. It will not run by itself. See the lib directory that accompanies.
You need to copy in your CLW.jar file to the clw/lib/ directory.
No special installation necessary. However, to keep the file size small, I did not include the CLW jar file(s). Therefore, you need to copy the clw jar file(s) to the clw/lib/ directory, as noted by the readme. Then point to the appropriate version jar file using the config file.
Run with -? for usage statement. There are options to send mail only, run reports only, etc.
All other properties are found in the properties file, for which there's a template provided. The template WILL need editing before the tool will work, as some properties do not have valid default values (such as for mail details).
If you have issues with this script, turn on debug and see if you can find the problem. Debug is enabled using the DEBUG environment variable with integers; the higher the number the more verbose debug will be. A debug level of 2 will dump the loaded configuration so you can validate that all values were properly picked up.
If you have issues with timestamps, see the comments at the top of the script or in the properties file. It often has to do with missing libraries or a failure to resolve timezones.
If you get a crash running a change-detector related report (such as if you select to run ALL reports), try skipping the change-detector report if CD is not enabled.
If you get an error about "Undefined subroutine &Date::Manip::UnixDate" then open reportGenerator.pl and look at the comments that explain which lines to uncomment to fix the issue.
# 1.0 12/13/11 Initial.
# 1.0.1 12/16/11 Tested and fixed to run on Mac, Linux, and Windows
# 1.0.2 01/03/12 Fixed for timezone support for Windoze
# 1.1 01/10/12 Added EM port argument, fixed issue with single vs multiple to: email address parsing
# Added support for CC email. Incorporated into svn
# 1.1.1 01/11/12 Fix to support SunOS running Perl 5.8.
# 1.1.2 02/23/12 Fix for starttime/endtime overrides in config file
# 1.1.3 06/06/12 Fix for multiple email addresses (caused by 1.1); also fixed in Utils.pm
# 1.2 07/05/12 Fix for metachars in report names, cc addresses, inactive reports being excluded
# 1.2.1 09/06/12 Cosmetic fixes only