Is it possible to get Foglight to save a PDF or Excel report to a folder (like a UNC), instead of mailing it to a SMTP address?
To implement this functionality, please follow the procedure below, to create one of the following custom rule.
SaveReportToLocalDrive (updated version), SaveReportToLocalDrive_2 (alternate version), and SOL74181_SaveReportToLocalDrive_0
These are "Event Driven" rule to save a report to a local drive. Attached to the solution is a XML file which can be import to the FMS using fglcmd command.
NOTE: In our testing, this would ONLY write to a local drive. Designating a Windows shared drive will not produce results.
The details of the implementation are as follows:
Import the file using command above and the new rule “Save Reports to Local Drive” will be created.
It is a simple rule, which is "Event Driven". It will be triggered on "ReportGeneratedEvent" events.
The rule contains two Rule Variables:
Defaults name is "Name of Report_Date and Time Run.file type", for example: Test 5 minute performance report_2010-Jul-29_1207.PDF
The severity level variable are:
a. saveReport: runs some very simple groovy to save the contents of the report to the path and file name specified.
Currently it puts all reports in the same directory. To put different reports in different directories, make new copies of the rule.
In each copy of the rule, edit the "path" rule variable and the condition to run only on the report name that should go into that directory; for example: edit the rule condition
reportObj = @event.get("report");
to copy only reports called "xxx" to the given directory.
The file name can be configured in the "filename" rule variable if the name should have a different format.
The usage of the "updated" version of the rule is described above. The usage of the alternate version of the rule is described in the Additional Information section.
SaveReportToLocalDrive (updated version) - Can be used on a specific report you must define in the rule.
SaveReportToLocalDrive_2 (alternate version) - Can be used to have ALL scheduled reports saved to local drive.