reportIt auto export - change file name

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Post Reply
Author
Message
amitayb
Cacti User
Posts: 96
Joined: Thu Mar 29, 2012 2:19 am

reportIt auto export - change file name

#1 Post by amitayb » Tue Dec 25, 2018 6:12 am

Hi,
I using reportIt with auto export enable.
How can I change name of the CSV when reportit does his export?
this file name always includes the reporting period, I'de like to add to the file name the report name.

is it possible?

Amitay

netniV
Cacti Guru User
Posts: 2881
Joined: Sun Aug 27, 2017 12:05 am

Re: reportIt auto export - change file name

#2 Post by netniV » Thu Dec 27, 2018 10:12 am

I think you'd have to open that as a request on the github page for the plugin. I don't recall you being able to set the filename, but my memory is fuzzy right now on it.

diegoisra
Posts: 1
Joined: Thu May 30, 2019 9:40 pm

Re: reportIt auto export - change file name

#3 Post by diegoisra » Thu May 30, 2019 9:45 pm

Try editing runtime.php under reportit folder:

from:
$filename = $report_settings['start_date'] . '_' . $report_settings['end_date'] . ".$file_type";
to:
$filename = $report_settings['description'] . '_' . $report_settings['start_date'] . '_' . $report_settings['end_date'] . ".$file_type";

netniV
Cacti Guru User
Posts: 2881
Joined: Sun Aug 27, 2017 12:05 am

Re: reportIt auto export - change file name

#4 Post by netniV » Fri Jun 07, 2019 3:19 pm

You can do that but you will need to keep updating that anytime you upgrade.

Post Reply