Cacti / plugin_reportit

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

ReportIT graphical report viewing is un-available #52

Closed ikorzha closed 5 years ago

ikorzha commented 5 years ago

Another issue while you are working on 1.10 release: After report is generated, vertical bars on the right hand side of the screen suppose to open graphical reporting: image

When user clicks on it: php errors appear in the log: image

Also as per reportIT 0.8 version screenshot below report viewing screen suppose to contain option for graphical view, summary and subheaders:

image

netniV commented 5 years ago

I believe that's already been reported and closed in #50

ikorzha commented 5 years ago

Ok I will close it and will validate in 1.10

ikorzha commented 5 years ago

Just tested 1.10 and re-opening this issue. When clicking on graphical report get the following php error: (and no graphical report either) image

netniV commented 5 years ago
$rrd_data['step']   = (isset($step)) ? $step : $data[0][$b+1] - $rrd_data['start'];

That would appear to be a definite data issue. If you could have exported the table, I could have used that to recreate against your DB.

netniV commented 5 years ago

Try adding the following to it:

cacti_log($rrd_data['step'] . "  = (isset($step)) ? $step : " . $data[0][$b+1] . " - $rrd_data['start'] ($b)");

It's in an area of code I'm not familiar with yet.

ikorzha commented 5 years ago

Can you please let me know which table you want to export I can do that for you. When it comes to adding a log entry I need you to specify the file and position.

netniV commented 5 years ago

You already have the file and position 👍 It's in the error message

netniV commented 5 years ago

I suspect, btw, I just need to add a safety check to make sure that the value isn't a U but I'm still interested to know what you're getting 👍

netniV commented 5 years ago

The answer is that it isn't U:

array ( 0 => '1538175660:', 1 => '-nan', 2 => '-nan', 3 => '1538175720:', 4 => '-nan', 5 => '-nan', 6 => '1538175780:', 7 => '-nan', 8 => '-nan', 9 => '1538175840:', 10 => '-nan', 11 => '-nan', 12 => '1538175900:', 13 => '-nan', 14 => '-nan', 15 => '1538175960:', 16 => '-nan', 17 => '-nan', 18 => '1538176020:', 19 => '-nan', 20 => '-nan', 21 => '1538176080:', 22 => '-nan', 23 => '-nan', 24 => '1538176140:', 25 => '-nan', 26 => '-nan', 27 => '1538176200:', 28 => '-nan', 29 => '-nan', 30 => '1538176260:'

netniV commented 5 years ago

I've applied a fix for this. Not 100% sure about it but it seems to work.

ikorzha commented 5 years ago

I am still unable to click on graphical report, it doesn't generate any log errors just returns me back to previous screen.

netniV commented 5 years ago

Can you create an animated gif to show me what is visually happening?

netniV commented 5 years ago

Try now.

ikorzha commented 5 years ago

Thank you for making suggestion for animated gif. Graphical reporting still not functioning. graphical-not-working

See attached for problem scope.

netniV commented 5 years ago

You know what, I didn't even know that tick box was there... glad I asked !!

ikorzha commented 5 years ago

Anyone who didnt use reportit 0.7x wouldn't have a clue it even existed since it never worked in 1.x :)

netniV commented 5 years ago

Do you still have a 0.7.x db?

ikorzha commented 5 years ago

I do have a fully functional 0.8 install which same as 0.7. Please let me know which tables you want exported and I will upload them here

netniV commented 5 years ago

Be good to have a dump of plugin_reportit_* so that I can run it through an upgrade make sure older people aren't hit with the same issues.

netniV commented 5 years ago

Could you try the latest version just pushed up. It has more changes/fixes.

ikorzha commented 5 years ago

netniV, I have email you a copy of reportitDB from my Cacti 0.8x install. I have also applied the latest version and do not see any improvements to items we are working on. Graphical reporting still doesn't work Lastly latest build result in SQL errors in log: See below: image

netniV commented 5 years ago

Set the plugin version back to 1.0.2 in the table, it should sort itself out when you view the plugin management page

ikorzha commented 5 years ago

I think we are talking about different things You are saying: Set the plugin version back to 1.0.2 in the table 'plugin_reportit_reports` I have to say to that there is no such field in that table.

I am saying after latest update I am getting in log these 2 errors: Error occur continuously after every poller run which is every min. To me it looks like column last_state is missing from that table. Please help

2018/09/30 14:46:01 - CMDPHP ERROR: A DB Exec Failed!, Error: Unknown column 'last_state' in 'where clause' 2018/09/30 14:46:01 - DBCALL ERROR: A DB Exec Failed!, Error:1054, SQL:'UPDATE plugin_reportit_reports SET last_state = NOW(), state = -2 WHERE state = 1 AND last_state - NOW() < ?'

netniV commented 5 years ago

Plugin_config

ikorzha commented 5 years ago

Thank you for your tip, you were right setting Plugin_config did resolve the sql log errors, it didnt resolve Graphical reporting issue or saving the "Scheduled Reporting" settings/

netniV commented 5 years ago

Hmm, thought it would solve the scheduled settings. I'll have to take another look.

netniV commented 5 years ago

24 is all about scheduling so that I will answer over there. Lets keep this to the report view.

netniV commented 5 years ago

So... here's where I am at with this one...

$ grep "Graph View" * -R
lib/funct_html.php:             print "<div style='background: rgba(0,0,0,0.9);text-align: right;padding: 3px 0px;border-bottom: 1px solid rgba(0,0,0,0.5);font-weight: 700;font-size: 1em;'  class='' ><span>" . ($add_text != '' ? "<a href='" . html_escape($add_text) . "'>" . "<img src='./images/bar.gif' title='Graph View'>" . '</a>':'') . '</span></div>';
README.md:* bug#00073: Graph View: Uncomplete parameter used in a function call causes SQL
README.md:  * Switch to Graph View (if activated under "settings")

Now, this claims there is a setting for enabling Graph View... but there isn't.

I'm assuming it is the Graph Overview that this should link to, but i'm not sure as I never used it before.

netniV commented 5 years ago

If there was something else... I did notice an action for showing graphs... however that leads to a plugin shutdown:

2018/10/02 15:17:41 - ERROR PHP ERROR in Plugin 'reportit': Uncaught Error: Call to 
undefined function show_graphs() in /usr/share/cacti/site/plugins/reportit/view.php:48 
Stack trace: #0 {main} thrown in file: /usr/share/cacti/site/plugins/reportit/view.php on line: 48
ikorzha commented 5 years ago

netniV, I am not a developer, my question is how can I help? All I can do is share with you old 0.8 code where the functionality was operational for compare and contrast.

netniV commented 5 years ago

Show me how it worked on 0.8? I'll have to download a copy.

ikorzha commented 5 years ago

Here you go animated gif how functionality was operating: Please also notice that graphical reporting image in right upper corner in reportit tab is missing in v1.10 image

Here is functionality of 0.8 scheduling-not-working

browniebraun commented 5 years ago

This feature has been removed as long as there is no appropriate replacement for Graidle. I'm sorry, but health issues and a extremely stressful job, beside being a single father makes it at the moment difficult for me to make any good progress. As long as this is the legacy version of ReportIt I do not really want to re-introduce it.

netniV commented 5 years ago

Maybe you could email me with your latest version @browniebraun ? That way I can keep things progressing for you? I did look at the Feature/2.0 branch but that appears to be an older version of the 1.x branch so should probably just be removed. Alternatively, you can ping me on the slack channel.

netniV commented 5 years ago

@ikorzha I recommend you try v1.1.2 ;-)

ikorzha commented 5 years ago

netniV thank you, I have tried an initial graphical interface. Thank you for your hard work by screenshot below you can see what it looks like on production system. As you can see graphs would need further work down the road as graph scaling is unreadable.. Lets leave it for later time, as there are more pressing functionality issues. Thank you once again for getting initial functionality operational!

image

netniV commented 5 years ago

Separate issue ;-)