modoboa / modoboa-stats

Graphical statistics for Modoboa
MIT License
9 stars 12 forks source link

Blank page in stats and js error in search #32

Closed ToniRos closed 6 years ago

ToniRos commented 7 years ago

Hello,

The stats page is always blank on a server with small (but some) traffic.

I verify the execution of "python manage.py logparser --verbose" without errors.

The rrd files are created in /tmp/modoboa and are accessible for apache server.

Server is CentOs 7 updated, with rrdtool installed

The js console in a browser shows this error when I search for a nonexisting domain. TypeError: e is undefined jquery.min.js:3:5099

The versions are: Statistics 1.2.2 Modoboa 1.9.1 Amavis frontend 1.1.3 Webmail 1.2.2

Some idea to look into?

Thanks.

tonioo commented 7 years ago

@ToniRos Can you check than rrdtool (the binary) is installed on your server?

ToniRos commented 7 years ago

rpm -qa|grep rrdtool

rrdtool-devel-1.4.8-9.el7.x86_64 uwsgi-plugin-rrdtool-2.0.15-1.el7.x86_64 rrdtool-1.4.8-9.el7.x86_64 rrdtool-python-1.4.8-9.el7.x86_64

rrdtool

RRDtool 1.4.8 Copyright 1997-2013 by Tobias Oetiker tobi@oetiker.ch Compiled Nov 20 2015 19:23:48

Usage: rrdtool [options] command command_options Valid commands: create, update, updatev, graph, graphv, dump, restore, last, lastupdate, first, info, fetch, tune, resize, xport, flushcached

RRDtool is distributed under the Terms of the GNU General Public License Version 2. (www.gnu.org/copyleft/gpl.html)

For more information read the RRD manpages

ToniRos commented 7 years ago

Executed on the server.

ToniRos commented 7 years ago

OK, the correction of javascript solves the TypeError: e is undefined.

Thanks.

ToniRos commented 7 years ago

@tonioo , finally I found mentions.... I'm new to git. Sorry. The result of executing "rpm -qa|grep rrdtool", and "rrdtool" are above.

tonioo commented 7 years ago

@ToniRos you should not store rrd files in /tmp since they will be deleted after each reboot. Have you declared domains in Modoboa and do they receive traffic on this server?

ToniRos commented 7 years ago

@tonioo Destination changed to other path, but the server only purges tmp files older than a week. The server receive traffic and I check one rrd of one domain with: rrdtool dump file.rrd. Check data: ...

0003
    <step>60</step> <!-- Seconds -->
    <lastupdate>1510936440</lastupdate> <!-- 2017-11-17 17:34:00 CET -->

...

0.0000000000e+002.0833333333e-030.0000000000e+000.0000000000e+000.0000000000e+000.0000000000e+000.00 00000000e+002.9064583333e+01 0.0000000000e+002.0833333333e-030.0000000000e+000.0000000000e+000.0000000000e+000.0000000000e+000.00 00000000e+005.4325000000e+01 ... Thanks.
ToniRos commented 7 years ago

@tonioo Finally the stats are shown. I forced the recompilation of modoboa_stats/graphics.py deleting the pyc, and they start to work like a charm.

Thanks.