|
|
| Author |
Message |
browniebraun Cacti User
Joined: 13 Jun 2006 Posts: 329 Location: Cologne, Germany
|
Posted: Sat Dec 23, 2006 6:49 pm Post subject: Report plugin ''ReportIt" - v0.6.1 (released 05/29/08) |
|
|
Current version of ReportIt is available under Sourceforge!
Hi Cacti community!
Here is my new report plugin "reportit" for all linux users (till now).
I've written the first release during my degree dissertation and now i've added some functions. So, it's time to make it public.
You can calculate the traffic, utilization or exception reportings of data items by using sliding time frames
or static ones on demand. It's possible to define working days, working time and a seperate timezone
for every data item. Your results can be exported to a CSV-file.
Now i'm just writing the scheduling functionality that will be included in the next release.
Unfortunately cacti's rrdfetch is too slow for this calculation, so i've to choose the way with the php-binding (for rrdtool) for the first time.
You will have to install it additionally. To install this plugin use the traditional way (config.pph: add plugins[] = "reportit") and go to "realm permissions".
Without the php-binding you can test its handling (Linux and Windows), but the calculation will not run. UPDATE: v0.3 supports Linux and Windows.
To get an overview take a look at the little powerpoint presentation i've added.
- Marry Christmas & Happy New Year -
Best regards
Andreas
(alias Browniebraun)
| Description: |
|
| Filesize: |
74.78 KB |
| Viewed: |
41610 Time(s) |

|
| Description: |
|
| Filesize: |
36.99 KB |
| Viewed: |
41611 Time(s) |

|
Last edited by browniebraun on Thu May 29, 2008 1:21 pm; edited 21 times in total |
|
| Back to top |
|
 |
raddy
Joined: 27 Oct 2005 Posts: 25 Location: Sydney, Australia
|
Posted: Sun Dec 24, 2006 5:14 am Post subject: |
|
|
| Nice work and Merry Xmas
|
|
| Back to top |
|
 |
jgisler Cacti User
Joined: 28 Sep 2005 Posts: 63
|
Posted: Tue Dec 26, 2006 10:16 pm Post subject: |
|
|
Thanks for the plugin, looks nice.
After installation, I am getting the following errors:
12/26/2006 07:07:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT a.*, b.user_id, b.description AS template_description FROM reportit_reports AS a LEFT JOIN reportit_templates AS b ON b.id = a.template_id ORDER BY b.user_id, a.description"
12/26/2006 07:07:33 PM - 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 '23:55:00', timezone VARCHAR(255) NOT NULL DEFAULT 'GMT' )TYPE=MyISAM"
12/26/2006 07:07:20 PM - 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 '23:55:00', timezone VARCHAR(255) NOT NULL DEFAULT 'GMT' )TYPE=MyISAM"
12/26/2006 07:06:35 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT a.*, b.user_id, b.description AS template_description FROM reportit_reports AS a LEFT JOIN reportit_templates AS b ON b.id = a.template_id ORDER BY b.user_id, a.description"
12/26/2006 07:06:32 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT a.id, a.description, a.start_date, a.end_date, a.last_run, b.user_id, b.description AS template_description, c.type FROM reportit_reports AS a JOIN reportit_templates AS b ON b.id = a.template_id JOIN reportit_types AS c ON c.id = b.type_id WHERE a.public = 'on' AND a.last_run != 0"
12/26/2006 07:06:12 PM - 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 '23:55:00', timezone VARCHAR(255) NOT NULL DEFAULT 'GMT' )TYPE=MyISAM"
12/26/2006 07:04:13 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT b.id FROM reportit_templates AS a LEFT JOIN reportit_reports AS b ON b.template_id = a.id WHERE a.id = 1"
12/26/2006 07:03:30 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT b.id FROM reportit_templates AS a LEFT JOIN reportit_reports AS b ON b.template_id = a.id WHERE a.id = 1"
12/26/2006 07:03:17 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT b.id FROM reportit_templates AS a LEFT JOIN reportit_reports AS b ON b.template_id = a.id WHERE a.id = 1"
I am running:
mysql-5.0.22
httpd-2.2.3
php-5.2.0
installed the php_binding, it's loads no problems reported. I see the module loaded.
Any ideas? I will continue to debug.
|
|
| Back to top |
|
 |
jgisler Cacti User
Joined: 28 Sep 2005 Posts: 63
|
Posted: Tue Dec 26, 2006 10:40 pm Post subject: |
|
|
has to do with this table creation
CREATE TABLE reportit_reports (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
description VARCHAR(255) NOT NULL,
template_id INT NOT NULL,
preset_timespan VARCHAR(255) NOT NULL,
last_run DATETIME NOT NULL,
runtime INT NOT NULL,
public VARCHAR(3) NOT NULL,
start_date DATE NOT NULL,
end_date DATE NOT NULL,
ds_description VARCHAR(255) NOT NULL,
result_description VARCHAR(255) NOT NULL,
dynamic BOOL NOT NULL DEFAULT 'FALSE',
present BOOL NOT NULL DEFAULT 'FALSE',
scheduled BOOL NOT NULL DEFAULT 'FALSE',
frequency VARCHAR(225) NOT NULL
)TYPE=MyISAM;";
All of the BOOL portions of the statement trigger the following error.
Invalid default value for 'dynamic'
|
|
| Back to top |
|
 |
browniebraun Cacti User
Joined: 13 Jun 2006 Posts: 329 Location: Cologne, Germany
|
Posted: Wed Dec 27, 2006 2:12 am Post subject: |
|
|
Good morning!
Ok, my server has no problem with this sql syntax (mysql 4.0.24), but you are right.
The word "DYNAMIC" is reserved, so we should put it into backticks.
Change the following line in setup.php:
old: dynamic BOOL NOT NULL DEFAULT 'FALSE',
new: `dynamic` BOOL NOT NULL DEFAULT 'FALSE',
Drop the invalid tables (all tables with zero at the end) or delete them all (reportit_*). Then start again.
I hope that there are not to many subsequent errors.
Best regards
Andreas
|
|
| Back to top |
|
 |
jgisler Cacti User
Joined: 28 Sep 2005 Posts: 63
|
Posted: Wed Dec 27, 2006 4:32 am Post subject: |
|
|
I changed
dynamic BOOL NOT NULL DEFAULT 'FALSE',
present BOOL NOT NULL DEFAULT 'FALSE',
scheduled BOOL NOT NULL DEFAULT 'FALSE',
to
dynamic BOOL NOT NULL DEFAULT '0',
present BOOL NOT NULL DEFAULT '0',
scheduled BOOL NOT NULL DEFAULT '0',
which then resolved the issue.
Thanks for the prompt reply.
|
|
| Back to top |
|
 |
dagonet Cacti User
Joined: 29 Oct 2005 Posts: 76 Location: Wuerzburg
|
Posted: Wed Jan 03, 2007 6:34 am Post subject: |
|
|
Hi,
very nice plugin!
One issue I have: Is it possible to additional datasources? I think of disk space and so on.
regards
Dagonet
|
|
| Back to top |
|
 |
browniebraun Cacti User
Joined: 13 Jun 2006 Posts: 329 Location: Cologne, Germany
|
Posted: Wed Jan 03, 2007 2:21 pm Post subject: |
|
|
Hi dagonet,
thank you for the laurels.
Sorry, but at this moment it isn't easily to add data sources.
Its a question whether you want to specify new measurement categories to calculate your "hard disk" report or to use the standard calculation functions instead. At this moment the standard functions are not flexible enough. So, I'll have to improve them as soon as possible.
But the existing functions (calc_min / max / average and threshold) have all the same interfaces. I've made this because its easier to add new functions.
For an special solution you'll have to add your function to calculations.php and integrate it by updating the tables 'reportit_functions' and 'reportit_types'. I think the "data source" you meant is the data source type of the template configuration that will filter the list of possible data items.
I propose that you write me an email with your ideas and I'll put it on the wish list.
Last week I've written some bug fixes and today the scheduling functionality has been finished. So, I'll post a beta release of "reportit V0.3" in a few days.
Best regards
Andreas
CU @ 1.CCC.eu
|
|
| Back to top |
|
 |
browniebraun Cacti User
Joined: 13 Jun 2006 Posts: 329 Location: Cologne, Germany
|
Posted: Fri Jan 05, 2007 11:01 am Post subject: |
|
|
Hi CACTI community!
Here is the beta release of "reportit V0.3" i've promised to you.
I've made some bug fixes and add-ons and so it's possible to use the schedule function by using crontab.
for example:
#Daily
0 0 * * * /thishost/unix/cen/php/bin/php /thishost/unix/cen/cacti/plugins/reportit/runtime.php -d > /dev/null 2>&1
(#Weekly: 10 0 * * 0 #Monthly 20 0 1 * * #Quarterly 30 0 1 1,4,7,10 #Yearly 40 0 1 1 *)
Warnings and errors during the scheduled reporting will be written into Cacti log File, also an status information.
Give me your feedback.
Best regards
Andreas
CU @ 1.CCC.eu
| Description: |
|
| Filesize: |
18.64 KB |
| Viewed: |
40961 Time(s) |

|
| Description: |
|
| Filesize: |
5.91 KB |
| Viewed: |
40961 Time(s) |

|
| Description: |
| Plugin 'reportit' v0.3.2 (03/03/07) |
|
 Download |
| Filename: |
reportit_v0.3.2.tar |
| Filesize: |
200 KB |
| Downloaded: |
1287 Time(s) |
| Description: |
|
 Download |
| Filename: |
php_bindings.tar |
| Filesize: |
50 KB |
| Downloaded: |
2500 Time(s) |
Last edited by browniebraun on Thu Mar 15, 2007 11:53 pm; edited 7 times in total |
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Fri Jan 05, 2007 11:51 am Post subject: |
|
|
Hmmm... after creating a report template and then a report.
and adding a data item
I get the following output when trying to run a report
| Code: | | REPORTIT ERROR: PHP modul for RRDtool is not available. |
and nothing in cacti.log
|
|
| Back to top |
|
 |
browniebraun Cacti User
Joined: 13 Jun 2006 Posts: 329 Location: Cologne, Germany
|
Posted: Fri Jan 05, 2007 12:17 pm Post subject: |
|
|
Please notice: You 'll have to install the php-bindings for RRDtool. (only available for Linux!).
The logging is only for scheduled reporting!
Best regards
Andreas
|
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Fri Jan 05, 2007 12:47 pm Post subject: |
|
|
hmmm.... can't seem to find an rpm for rrdtool-php for either CentOs 4.x or RHEL 4.x.. & a manual config requires altering php confs..
I prefer rpms for ease of package maintenance, but if need be, I will compile it by hand.
I may forgo this plugin for the time being....
|
|
| Back to top |
|
 |
tbaror
Joined: 05 Jun 2006 Posts: 49
|
Posted: Sun Jan 07, 2007 8:01 am Post subject: Report It |
|
|
HI,
First let me write that this plug-in is a must have.
Since I choose to cacti run on windows because the need for ease WMI monitoring i can
|
|
| Back to top |
|
 |
tbaror
Joined: 05 Jun 2006 Posts: 49
|
Posted: Sun Jan 07, 2007 8:08 am Post subject: Report It for windows |
|
|
Hi,
I choose run cacti under windows because the need for ease WMI monitoring.
I can't have Reportit Plug-in runing under windows is there a way or planing to make it run under windows (xp,2k3).
Thanks in advanced
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9691 Location: MI, USA
|
Posted: Sun Jan 07, 2007 11:16 am Post subject: |
|
|
If someone can e-mail Phillip Simonet, he might be willing to compile the module for Windows.
TheWitness
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|