Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This document documents the mechanisms for generating (and managing) reports on demand one-off (instead of via schedules, which are described here).

...

You find the report generating interface under the menu Views , On-Demand Reports or from the dashboard page>> Report Schedules page using the Create one-off Report button.

The interface is mostly self-explanatory, and has a number of tooltips for documenting some of the non-obvious items.

When you hit the Generate button the report creation is started in the background, and you will be shown a message with a link to the report display; if your report covers lots of nodes or a long period, then it may take some time until generation is complete, but the GUI will be completely usable in the meantime. Your new report will show up as "in progress" on the report list until it's finished.

Report Naming and Storage Locations

Reports generated from the GUI are saved in /usr/local/omk/var/reports /on-demand(but this is configurable, see see <omk_reports_ondemand> in reports> in opCommon.nmis).

Reports generated by the scheduler are saved in the output directory that was set for the particular schedule. The GUI lets you select from any directory that is listed under opreports_output_dirs in opCommon.nmis.

If you don't select a report name (under advanced options), then the report name will be generated from report type, date and a few other properties. If a name clash is detected, then newer reports will be named <originalname>.1.2 and so on. This de-clashing also applies to your custom report name!

Aging

Old onone-demand off reports are pruned based on the configuration setting default_report_keep_for, subsection onsubsection one-demandoff (in opCommon.nmis) by default that is set to 42 days.

...

We recommend that you primarily use the report scheduling system and the GUI onone-demand off report creation for maximum robustness, but if utmost flexibility is required (at the expense of fewer safeguards) then there's a tool available for that, too: opReports ships with a command line tool for report generation:   opreports-cli.pl (in /usr/local/omk/bin/).
Most of its options correspond closely to the ones described on the page on  Scheduling Reports.

...

  1. All output_file_N options must point to the same directory, and it must be one of the configured report directories (or the onone-demand off report directory).
    If you use the simplified setup with output_dir, then that must be one of the configured report directories.
    Output to STDOUT (using output_file_1=-) is not allowed in this situation.
  2. All the relative file names given in output_N must be identical (but for the extension).
    this works: format_1=HTML output_file_1=/usr/local/omk/var/reports/on-demand/testme.html format_2=XLSX output_2=/usr/local/omk/var/reports/on-demand/testme.xlsx
    whereas this doesn't: output_file_1=.../test_one.html output_file_2=..../test_two.csv
  3. You must add the option actual_name=<the name of your report files minus extension>.
    For the example from step 2 this would be actual_name=testme.
  4. You must add the option actual_uuid=<unique identifier>.
    The uuid should follow the UUID V4 standard format , but any globally unique string will do.
    You can use the uuid program to create a a proper uuid.
  5. If you want your report to be treated as an instance of a scheduled report, then you must pass the schedule's uuid parameter.
  6. If you want report aging, then you have to add a keep_for=<days> option.

...