Reporter scripting

It enhances Reporter feature.
It is available only in the Enterprise edition of the product.

You can run whatever defined report in this scripting way and further work with generated output.
It is useful when you want the generated report data/graphs to send or copy somewhere, if you want to import already exported data into 3rd party tools etc.

Another advance is your own scheduling (via crontab). LPAR2RRD execute reports only once a day (1st run after the midnight).

When report is intended to be used only via this scripting then you can set in LPAR2RRD UI option “no recurrence” in “Recurrence rule” window or select "Disabled" on report properties.

Run report manually

Under lpar2rrd user:
. /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg ; sh ./bin/genreport.sh <report name> <user> 

Example

$ . /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg ; sh ./bin/genreport.sh "CSV test"  admin

  manual startup : bin/genreport.sh "CSV test" "admin"
  reporter START : Mon Nov 19 09:18:03 2018
  ...
  zip report     : admin/CSV_test/20181119_091803/* to /home/lpar2rrd/lpar2rrd/reports/admin/CSV_test/CSV_test-20181119_091803.zip
  emails found   : 0
  download       : /home/lpar2rrd/lpar2rrd/reports/admin/CSV_test/CSV_test-20181119_091803.zip
  stored zip     : /home/lpar2rrd/lpar2rrd/reports/admin/CSV_test/CSV_test-20181119_091803.zip
  stored report  : /home/lpar2rrd/lpar2rrd/reports/admin/CSV_test/20181119_091803
  reporter END   : Mon Nov 19 09:18:13 2018
Script returns "1" as the exit code when report creation fails.

Crontab planning

Star report each 6am under lpar2rrd user:
$ crontab -e
0 6 * * *  . /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg ; sh ./bin/genreport.sh "CSV test" admin > /var/tmp/lpar2rrd-report-CSV_test.out 2>>/var/tmp/lpar2rrd-report-CSV_test.err

How to disable report recurrence

When defining a report add the option “no recurrence” in “Recurrence rule” window or select "Disabled" on report properties.