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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

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

Post by browniebraun »

disorganizer wrote:2 nice features would be:
1) run report even if no data items are assigned to auto-add filtered new data items
when all data items are deleted, at the moment the report stops before adding new data items with an error. instead it should add the new data items even if the report is not generated
To be honest: That is not a feature - it's a bug. :roll:

2) allow auto-creation of data items for non-scheduled reports
at the moment the option to auto create data items is only available for scheduled reports. imho it would make sense to allow this also for manually run reports
Yep, I agree. Good catch!
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
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

albundy118 wrote:Additional 2 qeustions regarding exporting reports... :oops:
Filename Format in settings , what should be the name of the variable to use the Report Description? i.e. <report_desc> ? And can I also use the date?
Next feature request ... ;-)
And when using Auto-Export (I havn't tested yet) what export format will be used and can it be changed ?
You can choose on of three export formats: CSV, XML or Excel2003(SML).

BR
Albundy

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
brylant
Posts: 36
Joined: Mon Aug 17, 2009 9:05 am

report export [solved]

Post by brylant »

stupid me... did not set-up export format... ;-)
solved. can be removed...

Hi,

I'm trying to enable Auto Exporting (I have scheduled reporting enabled which works fine - reports are generated) but I can't get it working (I think).
The path is writeable by cacti (user that runs runtime.php)
Does exporting need Auto Archiving to be set (I don't have that set)...
Any other idea why it's not working?

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

Re: report export [solved]

Post by browniebraun »

brylant wrote:stupid me... did not set-up export format... ;-)
solved. can be removed...

Hi,

I'm trying to enable Auto Exporting (I have scheduled reporting enabled which works fine - reports are generated) but I can't get it working (I think).
The path is writeable by cacti (user that runs runtime.php)
Does exporting need Auto Archiving to be set (I don't have that set)...
Any other idea why it's not working?

Thanks,
No, "Auto-archiving" can be disabled, so let's have a quick check-up for the default settings:

Go to "Console"->"Configurations"->"Settings"->Tab: Reports-> Section: Auto Exporting. Tick checkbox "enabled" and leave export path blank.
Edit your report template and ensure that "Export Path" is empty. Then switch to your report config and check whether "Scheduled Reporting" is enabled.
Choose the file format you want to have under "Auto Generated Exports" and keep your report ID in mind (see URL ...action=report_edit&id=1...).

Using the CLI rerun the report with: "php runtime.php <report_id> -v".
e.g.

Code: Select all

../../../php/bin/php runtime.php 1 -v
The output messages displayed at the end of the calculation process should look similar to these ones:

Code: Select all

02/04/2010 09:40:30 AM - REPORTIT NOTICE: Export folder '/proj/netops/cacti/cacti-0.8.7e/plugins/reportit/exports/1/' does not exist.
02/04/2010 09:40:30 AM - REPORTIT NOTICE: New export folder '/proj/netops/cacti/cacti-0.8.7e/plugins/reportit/exports/1/' created.
02/04/2010 09:40:30 AM - REPORTIT NOTICE: Export folder '/proj/netops/cacti/cacti-0.8.7e/plugins/reportit/exports/1/1/' does not exist.
02/04/2010 09:40:30 AM - REPORTIT NOTICE: New export folder '/proj/netops/cacti/cacti-0.8.7e/plugins/reportit/exports/1/1/' created.
02/04/2010 09:40:30 AM - PLUGIN: Poller[0] REPORTIT STATS: ID:1 Time:1.1 Reports:1  Emails:0  Exports:1
So the report has been exported to /reportit/exports/1/1/ (/reportit/exports/<template_id>/<report_id>/).

Code: Select all

-rw-rw---- 1 cacti cacti 32826 Feb  4 09:40 2010-02-03_2010-02-03.xml
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
andy.hester
Posts: 2
Joined: Tue Feb 02, 2010 10:21 am

CSV report

Post by andy.hester »

I tried several things and just couldn't seem to get the CSV report to omit the time range items that show up between the data source and the values.

I edited /lib-int/funct_export.php like so:

at line 144, I removed 'for($i = 1; $i < 8; $i++)'

and I commented lines 168-173.

Now my report for interface bandwidth utilization lists the interface and then the values. There is still a time range in the report header section.

-Andy
brylant
Posts: 36
Joined: Mon Aug 17, 2009 9:05 am

may be useful

Post by brylant »

Small patch that will set maxValue to "maximum Value" defined for each data source if snmp retrieved ifSpeed == 0. I have lots of logical interfaces that return 0 ifSpeed - that makes my reports unreadable. I wanted to set "maximum Value" for data source maunally but that was not working with reportit (as snmp ifSpeed was always reported as 0). The patch will look at "maximum Value" for each data source if snmp ifSpeed = 0.

In lib_int/funct_runtime.php update code at line 45

Code: Select all

        $sql = "SELECT d.rrd_maximum as maxRRD, c.field_value as maxValue, a.*
                        FROM reportit_data_items as a
                        LEFT JOIN data_local as b
                        ON (b.id=a.id)
                        LEFT JOIN host_snmp_cache as c
                        on (c.host_id=b.host_id AND
                        c.snmp_index=b.snmp_index AND
                        c.snmp_query_id=b.snmp_query_id AND
                        c.field_name='ifSpeed')
                        LEFT JOIN data_template_rrd as d
                        on (d.local_data_id=a.id AND
                        d.data_source_name LIKE 'traffic_in')
                        WHERE a.report_id = $report_id
                        ORDER BY a.id";
and in runtime.php add this at line 437

Code: Select all

               $maxRRDValue            = $report_definitions['data_items'][$i]['maxRRD'];
and update this in line 627

Code: Select all

        //----- Update variables and create calculating parameters -----^M
        if($maxValue !== NULL) {^M
            if($maxValue > 0 & $maxValue < 4294967295)
                $variables['maxValue'] = $maxValue;
            elseif($maxValue == 4294967295 & $maxHighValue !== Null)
                $variables['maxValue'] = $maxHighValue*1000000;
            elseif($maxValue == 0 & $maxRRDValue != 0)
                $variables['maxValue'] = $maxRRDValue;
            else^M
                $variables['maxValue'] = $maxValue;^M
        }else{^M
            $variables['maxValue'] = $maximum;^M
        }^M
Works for me...
drh
Posts: 17
Joined: Mon Jan 26, 2009 10:34 am

Disabling/Enabling Scheduled Reporting clears settings

Post by drh »

When (temporarily) disabling the 'Scheduled Reporting' in the 'Admistration' section of a report, the fields below it are cleared and set to the defaults.
Enabling it back does not bring the previous settings back.
Is this a bug/feature?

I'd prefer to see my previous settings remembered.

PS. This plugin realy needs its own forum.
I went thru the whole thread (duh! :roll: ) which took me some serious time.

PPS. Great plugin BTW. I do want to see some serious number rounding feature apart from those scientific ones. Why is the report export able to round on two digits after the decimal, but the report itself not?
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Disabling/Enabling Scheduled Reporting clears settings

Post by browniebraun »

drh wrote:When (temporarily) disabling the 'Scheduled Reporting' in the 'Admistration' section of a report, the fields below it are cleared and set to the defaults.
Enabling it back does not bring the previous settings back.
Is this a bug/feature?

I'd prefer to see my previous settings remembered.

PS. This plugin realy needs its own forum.
I went thru the whole thread (duh! :roll: ) which took me some serious time.

PPS. Great plugin BTW. I do want to see some serious number rounding feature apart from those scientific ones. Why is the report export able to round on two digits after the decimal, but the report itself not?
No, it is not a bug. I never thought about that. :roll: No problem, I can change it. At the moment I'm still working on the new layout of 0.8.0

PS: You're absolutely right. More than 650 replies in one single topic. :(
That is too large.

PPS: I will see what I can do to make it more user friendly.


Best regards
-Andreas-
Attachments
preview_2.png
preview_2.png (20.08 KiB) Viewed 6584 times
preview_1.png
preview_1.png (235.51 KiB) Viewed 6584 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
jumbo
Posts: 6
Joined: Mon Mar 15, 2010 7:23 am

Post by jumbo »

Hello,
Big thanks for the plugin works great for me (although spend like 10 hours reinstaling whole Cacti on debian with Plugin Architecture etc.) and another 10 hours reading this thread. I have couple questions:


Can somebody tell me how can I add more then 25 data items in a row into the report (using the "Add" button). For some reason the setting for changing "number of rows in ReportIT data items" is nowhere to be found.

Its kind of manual intensive to add 5000 data items into one report.....

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

Post by browniebraun »

Hi Jumbo!

Click on tab "graphs" and then on tab "settings" in the right upper corner.
Scroll down to the section "REPORTIT General Settings" and increase the value for "Rows Per Page".

That's all.


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
White Horse
Cacti User
Posts: 54
Joined: Tue Dec 22, 2009 1:54 am

Re: may be useful

Post by White Horse »

Tx a lot brylant :) you sloved my problems. In my case i need that reportit takes maxRRDvalue always and not just when "ifspeed =0" so for this i just paste-ed yours modification and and updated code on line 627.

Code: Select all

 //----- Update variables and create calculating parameters ----- 
        //if($maxValue !== NULL) { 
           // if($maxValue > 0 & $maxValue < 4294967295) 
                //$variables['maxValue'] = $maxValue; 
            //elseif($maxValue == 4294967295 & $maxHighValue !== Null) 
               // $variables['maxValue'] = $maxHighValue*1000000; 
            //elseif($maxValue == 0 & $maxRRDValue != 0) 
                $variables['maxValue'] = $maxRRDValue; 
            //else 
                //$variables['maxValue'] = $maxValue; 
        //}else{ 
            //$variables['maxValue'] = $maximum; 
        //} 
Last edited by White Horse on Mon Apr 05, 2010 5:41 am, edited 1 time in total.
matej_v
Posts: 29
Joined: Thu Feb 12, 2009 3:02 pm
Location: Slovenia

Multiple time ranges in one report

Post by matej_v »

Hello

Is it currently possible to include multiple time ranges in one report?

I'd like to make a report that would show total data transferred over an interface for the previous six months, but grouped by month, something like:

Code: Select all

                 Oct  Nov  Dec  Jan  Feb  Mar
Data source 1    xGB  yGB  zGB  ...
Data source 2    ...
Some wizardry with measurands perhaps? :wink:
Roke22
Posts: 5
Joined: Mon Mar 29, 2010 4:57 pm

Variables in reportit_rvars table

Post by Roke22 »

When i create a variable with a static value i see that is create a registry in reportit_variables and reportit_rvars but when i edit this variable for change the value it only make changes in reportit_variables.

When i execute the report it takes the values from reportit_rvars and is not up to date so i have to delete the variable and create new one with the new value.

Is a bug? there is a way to force a update the reportit_rvars table?

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

Re: Variables in reportit_rvars table

Post by browniebraun »

Roke22 wrote:When i create a variable with a static value i see that is create a registry in reportit_variables and reportit_rvars but when i edit this variable for change the value it only make changes in reportit_variables.

When i execute the report it takes the values from reportit_rvars and is not up to date so i have to delete the variable and create new one with the new value.

Is a bug? there is a way to force a update the reportit_rvars table?

Best Regards.
Sounds like a bug. I will have to check that. Could you open a ticket under http://sourceforge.net/tracker/?func=add&group_id=201406&atid=977435, please? Looking to the number bugs and patches I will try to release a new minor release 0.7.2 at the end of this month. For all people waiting for the next major release: ReportIt 0.8.0 will published after the release of Cacti 0.8.8, because it is not compatible to 0.8.7x any longer. At the moment it is still in development. I'm really sorry for that, but my job is getting me down at the moment.

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
istein001
Cacti User
Posts: 54
Joined: Fri Feb 22, 2008 4:44 pm
Location: Houston

Re: Since Reportit 0.7.1 Upgrade Variable "maxValue&

Post by istein001 »

browniebraun wrote:
j-munroe wrote:Hi,

Has anyone else had their maxValue variable under measurands disappear? It was there before but since upgrading I've noticed it no longer is available?

Anyone else seen this...or more importantly know how to fix it? :-)
Did you change the maximum value of your data template?The variable "maxValue" will only be available if "maximum" is neither empty nor zero.
Are there error messages listed in the Cacti log?

Best regards
-Andreas-
Seeing this same issue... upgraded to 0.7.1, maxValue is no longer there. I've checked and unchecked Maximum for the data template, as well as tried it with a value and without. Anyone figure this one out?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests