Report plugin ''ReportIt" - v0.7.5a (released 23/12/11)

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
crackrocksteady
Posts: 45
Joined: Wed Dec 06, 2006 12:02 am
Location: Perth , Australia

Post by crackrocksteady »

Would someone be so kind as to post some instruction's on how to install under windows....

Fletch
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

- Unpack the tar-file into the plugins folder. (It contains a folder called 'reportit')
- Edit /include/config.php and add " plugins[] = 'reportit'; "
- Then you will have to update your realm permissions under "Utilities/User Management".
- Update reportit's settings under "Configuration/Settings/Reports". Select under "RRDtool Connection" -> "RRDtool Cacti(slow)"
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
bengelly
Cacti User
Posts: 57
Joined: Fri Jan 26, 2007 2:28 am

Post by bengelly »

Hi,

I'm a new user to reportit and I think this plugin is great... tested it this morning and got this error:

Code: Select all

fatal error: Maximum execution time of 300 seconds exceeded in /usr/share/cacti/site/plugins/reportit/lib_int/funct_runtime.php on line 298
I was trying to generate a report for multiple cisco switchs network interfaces (average function) for the last day... Maybe I was too greedy, I'm going to try with less network interfaces and report back...

I'm running cacti under a PIII 1GHz with 1Gb of memory... here's my host info if it is any help...
Cacti Version - 0.8.6j
Plugin Architecture - 1.1
Poller Type - CMD.php
Server Info - Linux 2.6.8-2-386
Web Server - Apache/2.0.54 (Debian GNU/Linux) mod_python/3.1.3 Python/2.3.5 PHP/4.3.10-18 mod_perl/1.999.21 Perl/v5.8.4
PHP - 4.3.10-18
PHP Extensions - zip, yp, xmlrpc, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, sockets, shmop, session, posix, pcre, overload, mime_magic, mbstring, iconv, gettext, ftp, filepro, exif, dbx, dba, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, mysql, RRDTool, snmp
MySQL - 4.1.11-Debian_4sarge7-log
RRDTool - 1.0.49
SNMP - 5.1.2
Plugins
  • Network Discovery (discovery - v0.7)
    Host Info (hostinfo - v0.1)
    Device Tracking (mactrack - v0.0.1b)
    PHP Network Managing (manage - v0.4)
    Device Monitoring (monitor - v0.7)
    NTop Viewer (ntop - v0.1)
    report it! (report it! - v0.3.0)
    RRD Cleaner (rrdclean - v1.1)
    Thresholds (thold - v0.3.2)
    Network Tools (tools - v0.2)
    Update Checker (update - v0.3)
    PHP Network Weathermap (weathermap - v0.82)
Thanks
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

At first, check your settings under "RRDtool Connection". Go to Configuration: settings/reports.
If you are using the php_binding for RRDtool under Linux it's better to select "PHP BINDINGS (FAST)".

Please edit your php.ini and check the setting "memory_limit".
For great reports (2000 data items) it should be 128M or higher.


Best regards

Andreas
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
bengelly
Cacti User
Posts: 57
Joined: Fri Jan 26, 2007 2:28 am

Post by bengelly »

Hi,

thanks for being so reactive... I applied you recommandations and this the error I get (look at the attached file)... note that I already have php4-rrdtool package installed !!!

also, I have one question: do I have to edit the php.ini under /etc/php4/apache2/ or /etc/php4/cli/... I edited both of them with a memory_limit of 128 Mb...

Thanks
Attachments
Capture_1.jpg
Capture_1.jpg (25.95 KiB) Viewed 15823 times
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

Sorry, you don't have to increase the memory_limit up to 128 MB.
I've forgotten that I've optimized the code of the current release to use lesser memory. So I've just tried to create a report (with ~2000 data items, last 7 days and 8h of working time) by using a memory_limit 8 MB and it was successfull (instead of v0.3 beta). But I think Reinhard (gandalf) has said that 8 MB is not enough for Cacti or some plugins.

To give you a house number how long it takes with my linux server:

~2000 data items, last 7 days, 8h of working time, Monday-Sunday, average funktion:
  • using "PHP Bindings", scheduled:30,0s
    using "PHP Bindings", on demand:31,2s
    using "RRDtool Cacti", scheduled:105,0s
    using "RRDtool Cacti", on demand:121,6s
    using "RRDtool Server", scheduled:146,0s
    using "RRDtool Server", on demand:149,9s
So, we need 8,5% of our time to read out the rrd-files by using "PHP Bindings". 81,5% will be "loosed" for calculating and saving.
As I've written this plugin I've decided to hold the number of fetchs as little as possible. In this case we've 1957 fetchs.
By using the classic way the time to read out the rrd-files will increase to ~74% (~81% with RRDtool Server).

But why does the calculation take so long? Remember: We have 2 data sources per interface and a step of 1800s between two measuring points (MPs).
Than we've 2*48*7*1957 = ~1,3 million of MPs and "reportit" has to find the right ones for your working hours. If you have configured some special working days (e.g. Mo - Wed.) the selection of MPs will be improved by using time vectors.


>"also, I have one question: do I have to edit the php.ini under /etc/php4/apache2/ or /etc/php4/cli/... I edited both of them with a memory_limit of 128 Mb..."

To find out the correct path you can use phpinfo(). Take a look at "Configure Command" '--with-config-file-path=/ .....

>"and this the error I get (look at the attached file)..."
The error occurs because reportit looks for an extension called "rrdtool" not "RRDtool". I don't know if this versions of RPM-packet differs to the files I've uploaded, because I use to compile this extension manually.


Best regards
-Andreas-
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
pwan
Posts: 1
Joined: Mon Feb 19, 2007 11:29 am

Post by pwan »

Excellent report plugin...

Would there be a 95th percentile in the works for the calculation function?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You may want to consider this thread http://forums.cacti.net/viewtopic.php?t=17073
Reinhard
echelon360
Posts: 24
Joined: Tue Mar 28, 2006 2:40 am

problems creating report

Post by echelon360 »

My specs
Cacti Veri 0.8.6h
Windows xp with 2GB RAM

I have no problems creating the report template but when i start creating a report to run, i get nothing.

Example

-Create report template called MPLS
-Create new report called Hub Routers
>From here, once i create the report, nothing happens.

looking at the log, here's what i found

02/22/2007 10:58:34 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "CREATE TABLE reportit_rrdlist_0 ( id INT PRIMARY KEY, start_day VARCHAR(255) NOT NULL DEFAULT 'Monday', end_day VARCHAR(255) NOT NULL DEFAULT 'Sunday', start_time TIME NOT NULL DEFAULT '00:00:00', end_time TIME NOT NULL DEFAULT '24:00:00', timezone VARCHAR(255) NOT NULL DEFAULT 'GMT' )TYPE=MyISAM"

can someone advice what's going on pls?
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

Please give me some more details:
- Version of reportit
- Have all standard tables been created?
  • reportit_templates
    reportit_types
    reportit_reports
    reportit_functions
    reportit_variables
- Are there any other SQL errors?


>SQL Exec Failed "CREATE TABLE reportit_rrdlist_0
A zero at the end of the table's name is invalid. Maybe the table "reportit_reports" has not been created.

Best regards

Andreas
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
airwalk
Cacti User
Posts: 103
Joined: Fri Aug 18, 2006 11:22 am
Location: MSK, RU

Post by airwalk »

Excellent! Works like a charm on Windows.

Thank you for the "retail" plugin!
echelon360
Posts: 24
Joined: Tue Mar 28, 2006 2:40 am

Post by echelon360 »

browniebraun wrote:Please give me some more details:
- Version of reportit
- Have all standard tables been created?
  • reportit_templates
    reportit_types
    reportit_reports
    reportit_functions
    reportit_variables
- Are there any other SQL errors?


>SQL Exec Failed "CREATE TABLE reportit_rrdlist_0
A zero at the end of the table's name is invalid. Maybe the table "reportit_reports" has not been created.

Best regards

Andreas
Andreas,
thank you for the prompt response.I'm using ver 0.3.0 of reportit

I'm sorry but i am unable to create anything besides the reportit template.

Once i create the reportit template, i try to create a new report specifying the newly created template. Unfortunately, once i enter the necessary values and click "create", the screen just stays as it is, i don't get a new screen nor do i see anything created on the reports tab.

If i need to check sql, pls advice how should i be doing it?

thanks
gg234
Cacti User
Posts: 63
Joined: Fri Oct 07, 2005 11:14 am
Contact:

Export Problem

Post by gg234 »

I am clicking on .csv file to export in csv format i am getting the following error

Warning: fopen(/var/www/cacti//cacti_report3.csv): failed to open stream: Permission denied in /var/www/cacti/plugins/reportit/lib_int/funct_export.php on line 76

Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/cacti/plugins/reportit/lib_int/funct_export.php on line 82

Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/cacti/plugins/reportit/lib_int/funct_export.php on line 99

Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/cacti/plugins/reportit/lib_int/funct_export.php on line 109

Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/cacti/plugins/reportit/lib_int/funct_export.php on line 117

Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/cacti/plugins/reportit/lib_int/funct_export.php on line 133

Warning: fclose(): supplied argument is not a valid stream resource in /var/www/cacti/plugins/reportit/lib_int/funct_export.php on line 138

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/plugins/reportit/lib_int/funct_export.php:76) in /var/www/cacti/plugins/reportit/cc_view.php on line 99

I have checked the /var/www/cacti/plugins/reportit/lib_int folder permissions and the permissions are fine

Thanks for your help
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

Check the csv path you've defined under settings/reports. There should not be an slash at the end of it.
I suggest to create a separate sub folder first, instead of using the root of cacti's folder in your case (/var/www/cacti//). For this folder the apache needs right access.


Best regards

-Andreas-
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
gg234
Cacti User
Posts: 63
Joined: Fri Oct 07, 2005 11:14 am
Contact:

Post by gg234 »

Thanks for your help

Now i have created a new subfolder for reports with my web server users as owner and now i am having the problem of downloading the cvs file

When i click on .csv file i am seeing the following URL

http://192.169.1.41w/cacti/reports/cacti_report4.csv

I am not sure why it is showing wrong url correct url is as follows

http://192.169.1.41/cacti/reports/cacti_report4.csv

difference is after ip address it is showing extra w

Thanks for your help
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests