Thruk::Utils::Reports - Utilities Collection for Reporting
Utilities Collection for Reporting
get_report_list($c, [$noauth], [$nr])
return list of all reports for this user
get_report_list($c, $nr, [$noauth])
return report for given id
report_show($c, $nr)
generate and show the report
report_send($c, $nr, [$skip_generate, $to, $cc, $subject, $desc])
generate and send the report
return values are:
-2 : nothing to do, report runs on another cluster node already
0 : report failed
1 : report sucessful and mail was sent
2 : report generated, no mail send because of thresholds not hit
report_save($c, $nr, $data)
save a report
report_remove($c, $nr)
remove report
generate_report($c, $nr)
generate a new report
queue_report($c, $nr, [$mail])
queue a report for update. returns true if report got queued.
queue_report_if_busy($c, $nr, [$mail])
Queue a report for update. Queue will only be used if all slots are busy. Returns 1 if queue is used or undef if there are free slots.
generate_report_background($c, $report_nr, $with_mails, $report, $force, $debug)
start a report in the background and queue it if all slots are busy
get_report_data_from_param($params)
return report data for given params
update_cron_file($c)
update reporting cronjobs
set_running($c, $nr, [$val])
$val can be
* 0 to indicate the report is finished
* pid of the report generating process
update running state of report
set_waiting($c, $nr, $with_mails)
set waiting status of job
clean_report_tmp_files($c, $nr)
remove any tmp files from this report
get_report_templates($c)
return available report templates
get_report_languages($c)
return available report languages
add_report_defaults($c, [$fields], $report)
add report defaults
get_running_reports_number($c)
returns list ($running, $waiting)
get_new_report($c, [$data])
returns default report data
store_report_data($c, $nr, $data)
writes report to disk
read_report_file($c, $nr, [$rdata, $noauth, $simple])
returns report
normalize_required_field($c, $field)
returns normalized field structure, convert old array list into hash structure
check_for_waiting_reports($c)
works on next queued report
returns nothing
apply_report_parameters($c, $to, $from)
set report parameters into target hash
returns target hash
get_report_themes($c)
returns list of themes which have a 'stylesheets/*reports.css' file.