Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Mar 25, 2017 1:00 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 973 posts ]  Go to page 1, 2, 3, 4, 5 ... 65  Next
Author Message
 Post subject: Report plugin ''ReportIt" - v0.7.5a (released 23/12/11)
PostPosted: Sat Dec 23, 2006 6:49 pm 
Offline
Developer
User avatar

Joined: Tue Jun 13, 2006 1:17 am
Posts: 786
Location: Cologne, Germany
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)


Attachments:
csv_excel.PNG
csv_excel.PNG [ 74.78 KiB | Viewed 130952 times ]
report_threshold.PNG
report_threshold.PNG [ 36.99 KiB | Viewed 130953 times ]

_________________
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


Last edited by browniebraun on Sun Nov 28, 2010 2:30 am, edited 25 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 24, 2006 5:14 am 
Offline

Joined: Thu Oct 27, 2005 8:47 pm
Posts: 24
Location: Sydney, Australia
Nice work and Merry Xmas


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 26, 2006 10:16 pm 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:12 pm
Posts: 63
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 26, 2006 10:40 pm 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:12 pm
Posts: 63
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'


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 27, 2006 2:12 am 
Offline
Developer
User avatar

Joined: Tue Jun 13, 2006 1:17 am
Posts: 786
Location: Cologne, Germany
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 27, 2006 4:32 am 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:12 pm
Posts: 63
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 6:34 am 
Offline
Cacti User

Joined: Sat Oct 29, 2005 4:05 pm
Posts: 90
Location: Wuerzburg
Hi,
very nice plugin!
One issue I have: Is it possible to additional datasources? I think of disk space and so on.

regards
Dagonet


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 2:21 pm 
Offline
Developer
User avatar

Joined: Tue Jun 13, 2006 1:17 am
Posts: 786
Location: Cologne, Germany
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 :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 11:01 am 
Offline
Developer
User avatar

Joined: Tue Jun 13, 2006 1:17 am
Posts: 786
Location: Cologne, Germany
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


Attachments:
scheduled2.png
scheduled2.png [ 18.64 KiB | Viewed 130317 times ]
File comment: Plugin 'reportit' v0.3.2 (03/03/07)
reportit_v0.3.2.tar [200 KiB]
Downloaded 2658 times
File comment: PHP bindings for RRDtool
php_bindings.tar [50 KiB]
Downloaded 4369 times
warn.PNG
warn.PNG [ 5.91 KiB | Viewed 130317 times ]

_________________
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


Last edited by browniebraun on Thu Mar 15, 2007 11:53 pm, edited 7 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 11:51 am 
Offline
Cacti Pro User
User avatar

Joined: Thu Nov 21, 2002 8:55 am
Posts: 703
Location: Austin, TX
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

_________________
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 12:17 pm 
Offline
Developer
User avatar

Joined: Tue Jun 13, 2006 1:17 am
Posts: 786
Location: Cologne, Germany
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 12:47 pm 
Offline
Cacti Pro User
User avatar

Joined: Thu Nov 21, 2002 8:55 am
Posts: 703
Location: Austin, TX
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....

_________________
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey


Top
 Profile  
 
 Post subject: Report It
PostPosted: Sun Jan 07, 2007 8:01 am 
Offline
Cacti User

Joined: Mon Jun 05, 2006 6:54 am
Posts: 56
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


Top
 Profile  
 
 Post subject: Report It for windows
PostPosted: Sun Jan 07, 2007 8:08 am 
Offline
Cacti User

Joined: Mon Jun 05, 2006 6:54 am
Posts: 56
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 11:16 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
If someone can e-mail Phillip Simonet, he might be willing to compile the module for Windows.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 973 posts ]  Go to page 1, 2, 3, 4, 5 ... 65  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group