Cacti / plugin_reportit

ReportIt Plugin for Cacti
GNU General Public License v2.0
7 stars 8 forks source link

Running a scheduled report via crontab doesn't work #64

Closed ikorzha closed 5 years ago

ikorzha commented 5 years ago

This issue should be addressed after issue #63 resolved as it has emailing and archiving dependency. When I attempt to run a report from command line as this functionality existed in reportit 0.7x branch I get the following errors:

[root@CACTIONE ~]# php /var/www/html/plugins/reportit/runtime.php -d -v PHP Fatal error: Uncaught Error: Call to undefined function db_fetch_cell() in /var/www/html/plugins/reportit/setup.php:591 Stack trace:

0 /var/www/html/plugins/reportit/runtime.php(43): reportit_define_constants()

1 {main}

thrown in /var/www/html/plugins/reportit/setup.php on line 591 [root@CACTIONE ~]#

rchen14b commented 5 years ago

This issue should be addressed after issue #63 resolved as it has emailing and archiving dependency. When I attempt to run a report from command line as this functionality existed in reportit 0.7x branch I get the following errors:

[root@CACTIONE ~]# php /var/www/html/plugins/reportit/runtime.php -d -v PHP Fatal error: Uncaught Error: Call to undefined function db_fetch_cell() in /var/www/html/plugins/reportit/setup.php:591 Stack trace:

0 /var/www/html/plugins/reportit/runtime.php(43): reportit_define_constants()

1 {main}

thrown in /var/www/html/plugins/reportit/setup.php on line 591 [root@CACTIONE ~]#

I tried same thing and got same result.

netniV commented 5 years ago

This is likely the fixes that were put in to correct the issues via the web. There is something being applied at cli level that shouldn't.

netniV commented 5 years ago

This is now in the main development code, please check and close if issue is resolved.

ikorzha commented 5 years ago

netniV did you do the GIT push all I see last update is for view.php to fix visual defects in report view. I don't see any additional updates on GIT

netniV commented 5 years ago

Probably not, I’ll do it in the morning.

netniV commented 5 years ago

Pushed 👍

ikorzha commented 5 years ago

Looks like the fix might be a bit more involved :) just like everything else with this plugin. I have ran a job manually, there are no longer any errors reported, However the job doesn't see that there is a report to run...

[root@CACTIONE reportit]# php /var/www/html/plugins/reportit/runtime.php -d -v 2018/10/05 08:46:13 - PLUGIN REPORTIT STATS: Frequency:daily Time:0 Reports:0 Emails:0 Exports:0 [root@CACTIONE reportit]#

Lastly report doesn't show it was run as runtime is n/a after I made changes to it prior to cli run:

image

netniV commented 5 years ago

That's a different problem, different issue number ;-)

Just kidding... likely that it's not recognising the 'on' for enabled.

ikorzha commented 5 years ago

I will wait for your expert diagnosis and git push...

netniV commented 5 years ago

I might give you average diagnosis and no git pull like last night?

ikorzha commented 5 years ago

netniV I will wait until Git push. I can’t utilize the potential fix until issue with email delivery and archive is resolved

netniV commented 5 years ago

This has now been committed to the development code.

ikorzha commented 5 years ago

netniV opened a separate issue 66 as the result of latest commit :)