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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
tephra
Posts: 26
Joined: Sun Dec 09, 2007 8:11 pm

Post by tephra »

thanks!!!

much appreciated!
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

It could be that this issue has been caused by sending the email, but generally ReportIt logs error messages returned by the Settings plugin.
Well, it happened again today. I checked the logs, and there are a bunch of these in the cacti log:
05/06/2008 05:01:10 AM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select * from host where id="
About 170 of them (out of about 280 devices). So there is some field that is commonly being not set correctly (or something). The above message is the last in the series, so the report continued to run another 10 seconds after this message (so it's not what is causing the hang).

Also, even though I'm fairly certain that I have the email settings correct, no email shows up. So I suspect that the email is the problem. Unfortunately, there is no message in the logs regarding an email problem.

It might also be the export function that is causing this problem, as I noticed that the export takes about 30 minutes to complete. I've turned off the export to see if that makes any difference.

Any suggestions on how I might debug this?
---------
The Glue Guy
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

GlueGuy wrote:
It could be that this issue has been caused by sending the email, but generally ReportIt logs error messages returned by the Settings plugin.
Well, it happened again today. I checked the logs, and there are a bunch of these in the cacti log:
05/06/2008 05:01:10 AM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select * from host where id="
About 170 of them (out of about 280 devices). So there is some field that is commonly being not set correctly (or something). The above message is the last in the series, so the report continued to run another 10 seconds after this message (so it's not what is causing the hang).

Also, even though I'm fairly certain that I have the email settings correct, no email shows up. So I suspect that the email is the problem. Unfortunately, there is no message in the logs regarding an email problem.

It might also be the export function that is causing this problem, as I noticed that the export takes about 30 minutes to complete. I've turned off the export to see if that makes any difference.

Any suggestions on how I might debug this?
Hi GlueGuy!
At first you should test if you could send a test email via the settings plugin (Settings->Mail/DNS-> link "Send a test mail" in the right upper corner).
So we can ensure that your configuration is faultless.
Generally the generation of an export only takes a second. 30 minutes to complete an export (successfully!) sounds more like a lack of memory. The great different between the export functionality of current and lower versions is that v0.6.0 does everything in memory without temporary files.
So please check your memory_limit for PHP under "System Utilities->Technical Support". It should be 64M 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
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

At first you should test if you could send a test email via the settings plugin (Settings->Mail/DNS-> link "Send a test mail" in the right upper corner).
So we can ensure that your configuration is faultless.
Yes, I had done that when I set email in the first place. The email test works, so I had thought that this was OK.
Generally the generation of an export only takes a second. 30 minutes to complete an export (successfully!) sounds more like a lack of memory.
Hi Andreas!

Well, it was either the export or the memory issue. I turned off the export, and upped the memory to 64M (was at 48M). This morning, it seems to have completed the report withour the hang.

As a bonus, the emailed report was in my inbox! Whooo hooo!

I have another question. I have three bandwidth reports that are set to run on schedule; daily, weekly, and monthly.

The daily one runs every day (obviously), but the weekly and monthly never seem to run, except when I kick them off manually. Here is a screen shot of the weekly setup. When should I expect this to run? My thought was that it should show up in my Monday morning email...
Attachments
Reportit_weekly_setup.gif
Reportit_weekly_setup.gif (40.93 KiB) Viewed 6127 times
---------
The Glue Guy
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

Hi GlueGuy!

What do you mean with "turned of the export"? The automatical generation of archives?

Depending on your setup you'll have to set the "frequency" under "General" or "Administration" to "weekly" for your weekly reports.
Then configure a cronjob or a scheduled task (under Windows) for every frequency. So, you'll have one cron running for the calculation of all daily reports, one for the weekly ones and so on.
It is on you to decide on which day all the weekly reports should be done.
(Certainly you can start these calculations by hand to check if your reports are running. e.g. "php runtime -w -v". I've the feeling you're always waiting till the next morning :wink:)

Best regards
-Andreas-

Code: Select all

#Daily:
0 0 * * * php /thishost/unix/cen/cacti/plugins/reportit/runtime.php -d > /dev/null 2>&1
#Weekly: 
10 0 * * 0 php /thishost/unix/cen/cacti/plugins/reportit/runtime.php -w > /dev/null 2>&1
#Monthly:
20 0 1 * * php /thishost/unix/cen/cacti/plugins/reportit/runtime.php -m > /dev/null 2>&1
#Quarterly:
30 0 1 1,4,7,10 php /thishost/unix/cen/cacti/plugins/reportit/runtime.php -q > /dev/null 2>&1
#Yearly:
 40 0 1 1 * php /thishost/unix/cen/cacti/plugins/reportit/runtime.php -y > /dev/null 2>&1
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
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

Hi again Andreas!
What do you mean with "turned off the export"? The automatical generation of archives?
Probably a poor choice of words. I saw this setting for auto-archiving in the settings panel (see pic below), so I turned it "off" (unset the check box)
Depending on your setup you'll have to set the "frequency" under "General" or "Administration" to "weekly" for your weekly reports.
Yah. I figured that part out, and I thought because I was running the cron job every day, it would figure out which were daily, weekly, monthly, etc.
Then configure a cronjob or a scheduled task (under Windows) for every frequency. So, you'll have one cron running for the calculation of all daily reports, one for the weekly ones and so on.
It is on you to decide on which day all the weekly reports should be done.
(Certainly you can start these calculations by hand to check if your reports are running. e.g. "php runtime -w -v".
Now that part I had never figured out. See, I've never been able to "see" the powerpoint presentation (doesn't work with my version of powerpoint), so I have been doing this all "seat of the pants".

Somewhere I had seen about how to set up the cron job for daily, and had never "connected the dots" (so to speak) that there were other switches for weekly, monthly, etc. So all this time, I've thought that the one cron job should have been doing it for me. Duh!

I also hadn't put two and two together that I could run the task from the CLI. Double Duh!

Anyway, thank you for all your patient support!

Regards,

bp
Attachments
Reportit_autoArchive.gif
Reportit_autoArchive.gif (12.57 KiB) Viewed 6078 times
---------
The Glue Guy
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

I think I have a new one.

As mentioned previously, I run a daily bandwidth report. It seems that every time the daily report runs, the "selected data items" gets ignored, and instead, I get a report of ALL data items.

I go into the report configurations, and sure enough, all the data items that I had previously de-selected, are now selected again.

The first time this happened, I thought that maybe I had just made a slip-up, and done the selection on one of the other reports.

But no, I re-made all the selections yesterday, and today, it did it again.

So I ran the daily report from the CLI, and sure enough, when the report runs, all the de-selected data items show up in the report, and they are again selected in the configuration.

What could cause this?
Last edited by GlueGuy on Sat May 10, 2008 10:24 pm, edited 1 time in total.
---------
The Glue Guy
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

GlueGuy wrote:I think I have a new one.

As mentioned previously, I run a daily bandwidth report. It seems that every time the daily report runs, the "selected data items" gets ignored, and instead, I get a report of ALL data items.

I go into the report configurations, and sure enough, all the data items that I had previously de-selected, are now selected again.

The first time this happened, I thought that maybe I had just made a slip-up, and done done the selection on one of the other reports.

But no, I re-made all the selections yesterday, and today, it did it again.

So I ran the daily report from the CLI, and sure enough, when the report runs, all the de-selected data items show up in the report, and they are again selected in the configuration.

What could cause this?
Ensure that "Auto Generated Data Items" is disabled.

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
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

Ensure that "Auto Generated Data Items" is disabled.
Hi Andreas!

Yup. That was it. Guess I didn't understand what that meant.

Perhaps it should be called "Ignore Selected Data Items"... :wink:

bp
---------
The Glue Guy
tobioli
Posts: 2
Joined: Mon May 12, 2008 4:40 am
Contact:

Problem to create reports, add button missed

Post by tobioli »

Hi folks,

i use reportit 0.6.0 with Cacti 0.8.7a and a standard Debian 4 installtion with the actual apache2 and php5 packets. The only exception is the use of libgd2-xpm 2.0.35.dfsg-1 for the weathermap plugin.

The problem is, i can't create reports, its works one time an then never again. I test these with two debian installations, an both the same react.

In the apache.err i found following logentry:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 21 bytes) in
/usr/share/cacti/site/plugins/reportit/lib_int/funct_html.php on line 287
Any tips or hints for me?

Thank you,

best regards
Oliver
Attachments
create button missed
create button missed
reportit-button-fehlt.png (117.05 KiB) Viewed 5906 times
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Problem to create reports, add button missed

Post by browniebraun »

tobioli wrote:Hi folks,

i use reportit 0.6.0 with Cacti 0.8.7a and a standard Debian 4 installtion with the actual apache2 and php5 packets. The only exception is the use of libgd2-xpm 2.0.35.dfsg-1 for the weathermap plugin.

The problem is, i can't create reports, its works one time an then never again. I test these with two debian installations, an both the same react.

In the apache.err i found following logentry:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 21 bytes) in
/usr/share/cacti/site/plugins/reportit/lib_int/funct_html.php on line 287
Any tips or hints for me?

Thank you,

best regards
Oliver
Hi Oliver,

Regarding the error message you've posted and the missed "Save" button, I would imagine this issue will be caused by the definition of your variable(s). Could it be that you meant well for the number of steps? :wink:
Please be careful with the stepping of the defined range. A drop down field with more then e.g. 5000 options won't normally be a problem for your server, but your client has to interpret the resulting HTML code. And that brings your client to have a CPU load of 100% with a visible lag of time!
In your case I assume that your stepping is so small that the calculation of this drop down looks more like a loop and the server will be out of memory before everything has been done. So check your settings! x = (Max-Min) / step should not be higher than 5000.

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
tobioli
Posts: 2
Joined: Mon May 12, 2008 4:40 am
Contact:

Post subject: Re: Problem to create reports, add button miss

Post by tobioli »

Hi Andreas,

so i test it, it works fine with the Type Input Field. The stepping is 300 (5 min values). In the moment i work with a stepping of 1 but the Type "Dropdown Field" do not work. But thank you for helping.

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

Re: Post subject: Re: Problem to create reports, add button

Post by browniebraun »

tobioli wrote:Hi Andreas,

so i test it, it works fine with the Type Input Field. The stepping is 300 (5 min values). In the moment i work with a stepping of 1 but the Type "Dropdown Field" do not work. But thank you for helping.

Best regards
Oliver
Oliver,
Check your PMs.

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
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Is this a bug or am I being dense again?

Post by GlueGuy »

Hi Andreas,

We have several reports being generated, and have the user defaults for all users set to use TAB as the field delimiter, and a decimal as the delimiter between whole and fractions.

The CSV reports that appear under the Reports tab have the correct delimiters, but the reports that get emailed have semi-colons and commas as delimiters.

Is this a bug, or is there another place to set the preferences other than user settings?
---------
The Glue Guy
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Is this a bug or am I being dense again?

Post by browniebraun »

GlueGuy wrote:Hi Andreas,

We have several reports being generated, and have the user defaults for all users set to use TAB as the field delimiter, and a decimal as the delimiter between whole and fractions.

The CSV reports that appear under the Reports tab have the correct delimiters, but the reports that get emailed have semi-colons and commas as delimiters.

Is this a bug, or is there another place to set the preferences other than user settings?
Yep, it's a bug. Please open a ticket under https://sourceforge.net/tracker/?func=add&group_id=201406&atid=977435.
I'll fix it in v0.6.1, which will be released during the next week and which contains a handful of bug fixes.
Btw it supports to debug the calculation process.

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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest