modoboa / modoboa-stats

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

Problem displaying stats #47

Closed BioSs54 closed 6 years ago

BioSs54 commented 6 years ago

Hello, stats graphics are not displayed. The logs of the mail.log file are present, the RRD files are also generated. Do you have an idea of the problem ?

Here the json content from query, curves is empty : {"period_name": "day", "end": 1531389418, "start": "-1day", "period": "day", "graphs": {"averagetraffic": {"curves": [], "title": "Trafic moyen (msgs/min)"}, "averagetrafficsize": {"curves": [], "title": "Taille moyenne du trafic normal (octets/min)"}}, "fname": "global", "domain_selector": true}

tonioo commented 6 years ago

@BioSs54 Is there any mail traffic on your server?

BioSs54 commented 6 years ago

@tonioo Yes. ~ 50 mails / days

My last 100 logs.

I didnt seen problem in this log.

tail -n 100 /var/log/mail.log Jul 12 12:19:39 ns3028925 postfix/pickup[16973]: C593344AD3: uid=1000 from=<myUser> Jul 12 12:19:39 ns3028925 postfix/cleanup[28577]: C593344AD3: message-id=<63ea520665ea33c38a5bdd04686c13be@www.domain.com> Jul 12 12:19:39 ns3028925 opendkim[22310]: C593344AD3: no signing table match for 'test@domain.com' Jul 12 12:19:39 ns3028925 opendkim[22310]: C593344AD3: no signature data Jul 12 12:19:39 ns3028925 postfix/qmgr[9076]: C593344AD3: from=<mail@domain.com>, size=21389, nrcpt=1 (queue active) Jul 12 12:19:40 ns3028925 postfix/smtp[28588]: 8C42844AD2: to=<mail@domain.com>, relay=mail.domain.com[XXX.XXX.XXX.XXX]:25, delay=0.58, delays=0.2/0.05/0.03/0.3, dsn=2.0.0, status=sent (250 OK id=1fdYiU-0006pP-Fe) Jul 12 12:19:40 ns3028925 postfix/qmgr[9076]: 8C42844AD2: removed Jul 12 12:19:40 ns3028925 postfix/smtp[28590]: Trusted TLS connection established to eur.olc.protection.outlook.com[104.47.9.33]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits) Jul 12 12:19:41 ns3028925 postfix/smtp[28590]: C593344AD3: to=<mail@domain.com>, relay=eur.olc.protection.outlook.com[104.47.9.33]:25, delay=1.3, delays=0.08/0.01/0.83/0.42, dsn=2.6.0, status=sent (250 2.6.0 <63ea520665ea33c38a5bdd04686c13be@www.domain.com> [InternalId=18103287182069, Hostname=VE1EUR03HT034.eop-EUR03.prod.protection.outlook.com] 27091 bytes in 0.232, 113.659 KB/sec Queued mail for delivery -> 250 2.1.5) Jul 12 12:19:41 ns3028925 postfix/qmgr[9076]: C593344AD3: removed Jul 12 13:00:05 ns3028925 postfix/pickup[16973]: 67C1344ACD: uid=0 from=<mail@domain.com> Jul 12 13:00:05 ns3028925 postfix/cleanup[3093]: 67C1344ACD: message-id=<1531393205.2979.1@MyDomain> Jul 12 13:00:05 ns3028925 opendkim[22310]: 67C1344ACD: no signing table match for 'test@domain.com' Jul 12 13:00:05 ns3028925 opendkim[22310]: 67C1344ACD: no signature data Jul 12 13:00:05 ns3028925 postfix/qmgr[9076]: 67C1344ACD: from=<mail@domain.com>, size=506, nrcpt=1 (queue active) Jul 12 13:00:05 ns3028925 postfix/smtp[3103]: Trusted TLS connection established to aspmx.l.google.com[108.177.15.27]:25: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits) Jul 12 13:00:05 ns3028925 postfix/smtp[3103]: 67C1344ACD: to=<mail@domain.com>, relay=aspmx.l.google.com[108.177.15.27]:25, delay=0.58, delays=0.12/0.06/0.29/0.11, dsn=2.0.0, status=sent (250 2.0.0 OK 1531393205 y6-v6si9214057wrm.282 - gsmtp) Jul 12 13:00:05 ns3028925 postfix/qmgr[9076]: 67C1344ACD: removed Jul 12 13:03:33 ns3028925 postfix/submission/smtpd[3666]: connect from MyDomain[XXX.XXX.XXX.XXX] Jul 12 13:03:33 ns3028925 postfix/submission/smtpd[3666]: disconnect from MyDomain[XXX.XXX.XXX.XXX] ehlo=1 auth=0/1 quit=1 commands=2/3 Jul 12 13:06:53 ns3028925 postfix/anvil[3668]: statistics: max connection rate 1/60s for (submission:XXX.XXX.XXX.XXX) at Jul 12 13:03:33 Jul 12 13:06:53 ns3028925 postfix/anvil[3668]: statistics: max connection count 1 for (submission:XXX.XXX.XXX.XXX) at Jul 12 13:03:33 Jul 12 13:06:53 ns3028925 postfix/anvil[3668]: statistics: max cache size 1 at Jul 12 13:03:33 Jul 12 13:08:19 ns3028925 postfix/pickup[3150]: 8B16544ACE: uid=1000 from=<myUser> Jul 12 13:08:19 ns3028925 postfix/cleanup[4402]: 8B16544ACE: message-id=<0db50e0e0903d17e438de203fc9541a0@www.domain.com> Jul 12 13:08:19 ns3028925 opendkim[22310]: 8B16544ACE: no signing table match for 'test@domain.com' Jul 12 13:08:19 ns3028925 opendkim[22310]: 8B16544ACE: no signature data Jul 12 13:08:19 ns3028925 postfix/qmgr[9076]: 8B16544ACE: from=<mail@domain.com>, size=11013, nrcpt=1 (queue active) Jul 12 13:13:19 ns3028925 postfix/smtp[4412]: 8B16544ACE: conversation with eur.olc.protection.outlook.com[104.47.2.33] timed out while receiving the initial server greeting Jul 12 13:13:20 ns3028925 postfix/smtp[4412]: Trusted TLS connection established to eur.olc.protection.outlook.com[104.47.0.33]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits) Jul 12 13:13:20 ns3028925 postfix/smtp[4412]: 8B16544ACE: to=<mail@domain.com>, relay=eur.olc.protection.outlook.com[104.47.0.33]:25, delay=301, delays=0.23/0.04/301/0.66, dsn=2.6.0, status=sent (250 2.6.0 <0db50e0e0903d17e438de203fc9541a0@www.domain.com> [InternalId=13447542626928, Hostname=HE1EUR01HT162.eop-EUR01.prod.protection.outlook.com] 16789 bytes in 0.394, 41.566 KB/sec Queued mail for delivery -> 250 2.1.5) Jul 12 13:13:20 ns3028925 postfix/qmgr[9076]: 8B16544ACE: removed Jul 12 13:13:52 ns3028925 postfix/pickup[3150]: 46C5D40C74: uid=1000 from=<myUser> Jul 12 13:13:52 ns3028925 postfix/cleanup[5293]: 46C5D40C74: message-id=<b8ad6af81936021b8a2871158fb77484@www.domain.com> Jul 12 13:13:52 ns3028925 opendkim[22310]: 46C5D40C74: no signing table match for 'wordpress@domain.com' Jul 12 13:13:52 ns3028925 opendkim[22310]: 46C5D40C74: no signature data Jul 12 13:13:52 ns3028925 postfix/qmgr[9076]: 46C5D40C74: from=<mail@domain.com>, size=618, nrcpt=1 (queue active) Jul 12 13:13:52 ns3028925 postfix/smtp[4412]: Untrusted TLS connection established to mail.domain.com[XXX.XXX.XXX.XXX]:25: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits) Jul 12 13:13:52 ns3028925 postfix/smtp[4412]: 46C5D40C74: to=<mail@domain.com>, relay=mail.domain.com[XXX.XXX.XXX.XXX]:25, delay=0.37, delays=0.11/0.03/0.03/0.19, dsn=2.0.0, status=sent (250 OK id=1fdZYx-0000Mc-50) Jul 12 13:13:52 ns3028925 postfix/qmgr[9076]: 46C5D40C74: removed Jul 12 13:18:58 ns3028925 postfix/pickup[3150]: 3C5C640D0B: uid=1000 from=<myUser> Jul 12 13:18:58 ns3028925 postfix/cleanup[6073]: 3C5C640D0B: message-id=<4bde275131fdf93954a932720bb8900b@www.domain.com> Jul 12 13:18:58 ns3028925 opendkim[22310]: 3C5C640D0B: no signing table match for 'test@domain.com' Jul 12 13:18:58 ns3028925 opendkim[22310]: 3C5C640D0B: no signature data Jul 12 13:18:58 ns3028925 postfix/qmgr[9076]: 3C5C640D0B: from=<mail@domain.com>, size=82640, nrcpt=1 (queue active) Jul 12 13:18:58 ns3028925 postfix/pickup[3150]: 648183FDB3: uid=1000 from=<myUser> Jul 12 13:18:58 ns3028925 postfix/cleanup[6073]: 648183FDB3: message-id=<a137d9af2082d9b5a9a4a4f39b92ad60@www.domain.com> Jul 12 13:18:58 ns3028925 opendkim[22310]: 648183FDB3: no signing table match for 'test@domain.com' Jul 12 13:18:58 ns3028925 opendkim[22310]: 648183FDB3: no signature data Jul 12 13:18:58 ns3028925 postfix/smtp[6085]: Untrusted TLS connection established to mail.domain.com[XXX.XXX.XXX.XXX]:25: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits) Jul 12 13:18:58 ns3028925 postfix/qmgr[9076]: 648183FDB3: from=<mail@domain.com>, size=17254, nrcpt=1 (queue active) Jul 12 13:18:58 ns3028925 postfix/smtp[6085]: 3C5C640D0B: to=<mail@domain.com>, relay=mail.domain.com[XXX.XXX.XXX.XXX]:25, delay=0.76, delays=0.23/0.06/0.03/0.43, dsn=2.0.0, status=sent (250 OK id=1fdZdt-0000WK-7N) Jul 12 13:18:58 ns3028925 postfix/qmgr[9076]: 3C5C640D0B: removed Jul 12 13:18:58 ns3028925 postfix/smtp[6086]: Trusted TLS connection established to eur.olc.protection.outlook.com[104.47.6.33]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits) Jul 12 13:18:59 ns3028925 postfix/smtp[6086]: 648183FDB3: to=<mail@domain.com>, relay=eur.olc.protection.outlook.com[104.47.6.33]:25, delay=1.2, delays=0.15/0.02/0.48/0.55, dsn=2.6.0, status=sent (250 2.6.0 <a137d9af2082d9b5a9a4a4f39b92ad60@www.domain.com> [InternalId=13610751391253, Hostname=VE1EUR02HT175.eop-EUR02.prod.protection.outlook.com] 22972 bytes in 0.352, 63.615 KB/sec Queued mail for delivery -> 250 2.1.5) Jul 12 13:18:59 ns3028925 postfix/qmgr[9076]: 648183FDB3: removed Jul 12 13:22:05 ns3028925 postfix/submission/smtpd[6670]: connect from MyDomain[XXX.XXX.XXX.XXX] Jul 12 13:22:05 ns3028925 postfix/submission/smtpd[6670]: disconnect from MyDomain[XXX.XXX.XXX.XXX] ehlo=1 auth=0/1 quit=1 commands=2/3 Jul 12 13:25:25 ns3028925 postfix/anvil[6671]: statistics: max connection rate 1/60s for (submission:XXX.XXX.XXX.XXX) at Jul 12 13:22:05 Jul 12 13:25:25 ns3028925 postfix/anvil[6671]: statistics: max connection count 1 for (submission:XXX.XXX.XXX.XXX) at Jul 12 13:22:05 Jul 12 13:25:25 ns3028925 postfix/anvil[6671]: statistics: max cache size 1 at Jul 12 13:22:05 Jul 12 14:00:06 ns3028925 postfix/pickup[3150]: 04B9E44ACE: uid=0 from=<mail@domain.com> Jul 12 14:00:06 ns3028925 postfix/cleanup[12550]: 04B9E44ACE: message-id=<1531396805.12435.1@MyDomain> Jul 12 14:00:06 ns3028925 opendkim[22310]: 04B9E44ACE: no signing table match for 'test@domain.com' Jul 12 14:00:06 ns3028925 opendkim[22310]: 04B9E44ACE: no signature data Jul 12 14:00:06 ns3028925 postfix/qmgr[9076]: 04B9E44ACE: from=<mail@domain.com>, size=507, nrcpt=1 (queue active) Jul 12 14:00:06 ns3028925 postfix/smtp[12560]: Trusted TLS connection established to aspmx.l.google.com[XXX.XXX.XXX.XXX]:25: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits) Jul 12 14:00:06 ns3028925 postfix/smtp[12560]: 04B9E44ACE: to=<mail@domain.com>, relay=aspmx.l.google.com[XXX.XXX.XXX.XXX]:25, delay=0.96, delays=0.19/0.06/0.54/0.18, dsn=2.0.0, status=sent (250 2.0.0 OK 1531396806 h10-v6si2938158wme.215 - gsmtp) Jul 12 14:00:06 ns3028925 postfix/qmgr[9076]: 04B9E44ACE: removed Jul 12 14:02:42 ns3028925 postfix/pickup[3150]: 2B83C40C74: uid=1000 from=<myUser> Jul 12 14:02:42 ns3028925 postfix/cleanup[12950]: 2B83C40C74: message-id=<3578d3864a8b7176b0d6cab90925bcb2@www.domain.fr> Jul 12 14:02:42 ns3028925 opendkim[22310]: 2B83C40C74: no signing table match for 'contact@domain.fr' Jul 12 14:02:42 ns3028925 opendkim[22310]: 2B83C40C74: no signature data Jul 12 14:02:42 ns3028925 postfix/qmgr[9076]: 2B83C40C74: from=<mail@domain.com>, size=2254, nrcpt=1 (queue active) Jul 12 14:02:42 ns3028925 postfix/smtp[12960]: Trusted TLS connection established to idmx04.idline.fr[109.239.123.246]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits) Jul 12 14:02:48 ns3028925 postfix/smtp[12960]: 2B83C40C74: to=<mail@domain.com>, relay=idmx04.idline.fr[109.239.123.246]:25, delay=5.9, delays=0.16/0.06/0.24/5.5, dsn=2.0.0, status=sent (250 Ok: queued as B47D214C0096) Jul 12 14:02:48 ns3028925 postfix/qmgr[9076]: 2B83C40C74: removed Jul 12 14:09:14 ns3028925 postfix/submission/smtpd[13999]: connect from ec2-54-153-121-4.us-west-1.compute.amazonaws.com[XXX.XXX.XXX.XXX] Jul 12 14:09:15 ns3028925 postfix/submission/smtpd[13999]: Anonymous TLS connection established from ec2-54-153-121-4.us-west-1.compute.amazonaws.com[XXX.XXX.XXX.XXX]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits) Jul 12 14:09:25 ns3028925 postfix/submission/smtpd[13999]: lost connection after EHLO from ec2-54-153-121-4.us-west-1.compute.amazonaws.com[XXX.XXX.XXX.XXX] Jul 12 14:09:25 ns3028925 postfix/submission/smtpd[13999]: disconnect from ec2-54-153-121-4.us-west-1.compute.amazonaws.com[XXX.XXX.XXX.XXX] ehlo=2 starttls=1 commands=3 Jul 12 14:12:46 ns3028925 postfix/anvil[14003]: statistics: max connection rate 1/60s for (submission:XXX.XXX.XXX.XXX) at Jul 12 14:09:14 Jul 12 14:12:46 ns3028925 postfix/anvil[14003]: statistics: max connection count 1 for (submission:XXX.XXX.XXX.XXX) at Jul 12 14:09:14 Jul 12 14:12:46 ns3028925 postfix/anvil[14003]: statistics: max cache size 1 at Jul 12 14:09:14 Jul 12 14:16:03 ns3028925 postfix/postscreen[15028]: CONNECT from [XXX.XXX.XXX.XXX]:58126 to [XXX.XXX.XXX.XXX]:25 Jul 12 14:16:03 ns3028925 postfix/postscreen[15028]: PREGREET 11 after 0.01 from [XXX.XXX.XXX.XXX]:58126: EHLO USER\r\n Jul 12 14:16:04 ns3028925 postfix/dnsblog[15031]: addr XXX.XXX.XXX.XXX listed by domain zen.spamhaus.org as 127.0.0.11 Jul 12 14:16:04 ns3028925 postfix/dnsblog[15031]: addr XXX.XXX.XXX.XXX listed by domain zen.spamhaus.org as 127.0.0.4 Jul 12 14:16:04 ns3028925 postfix/postscreen[15028]: DNSBL rank 3 for [XXX.XXX.XXX.XXX]:58126 Jul 12 14:16:04 ns3028925 postfix/postscreen[15028]: HANGUP after 0.01 from [XXX.XXX.XXX.XXX]:58126 in tests after SMTP handshake Jul 12 14:16:04 ns3028925 postfix/postscreen[15028]: DISCONNECT [XXX.XXX.XXX.XXX]:58126 Jul 12 14:21:57 ns3028925 postfix/postscreen[15920]: CONNECT from [XXX.XXX.XXX.XXX]:44785 to [XXX.XXX.XXX.XXX]:25 Jul 12 14:21:57 ns3028925 postfix/postscreen[15920]: PREGREET 11 after 0.01 from [XXX.XXX.XXX.XXX]:44785: EHLO User\r\n Jul 12 14:21:57 ns3028925 postfix/dnsblog[15923]: addr XXX.XXX.XXX.XXX listed by domain zen.spamhaus.org as 127.0.0.4 Jul 12 14:21:57 ns3028925 postfix/dnsblog[15923]: addr XXX.XXX.XXX.XXX listed by domain zen.spamhaus.org as 127.0.0.2 Jul 12 14:21:58 ns3028925 postfix/postscreen[15920]: DNSBL rank 3 for [XXX.XXX.XXX.XXX]:44785 Jul 12 14:21:58 ns3028925 postfix/postscreen[15920]: HANGUP after 0.01 from [XXX.XXX.XXX.XXX]:44785 in tests after SMTP handshake Jul 12 14:21:58 ns3028925 postfix/postscreen[15920]: DISCONNECT [XXX.XXX.XXX.XXX]:44785 Jul 12 14:32:46 ns3028925 postfix/submission/smtpd[17387]: connect from MyDomain[XXX.XXX.XXX.XXX] Jul 12 14:32:46 ns3028925 postfix/submission/smtpd[17387]: disconnect from MyDomain[XXX.XXX.XXX.XXX] ehlo=1 auth=0/1 quit=1 commands=2/3

tonioo commented 6 years ago

@BioSs54 Might a cron issue... Can you try to restart your cron daemon and to run the logparser command manually?

BioSs54 commented 6 years ago

Cmd: service cron restart

cron.service - Regular background program processing daemon Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled) Active: active (running) since jeu. 2018-07-12 14:45:35 CEST; 4s ago

/srv/modoboa# env/bin/python instance/manage.py logparser

/etc/init.d/uwsgi restart

Still no curves in json response. :-/ I really dont understand. My rrd are generated, my mail log is not empty and readable

tonioo commented 6 years ago

@BioSs54 Can you check that the rrdtool package is installed on your system?

BioSs54 commented 6 years ago

@tonioo /srv/modoboa# rrdtool -v RRDtool 1.5.5 Copyright by Tobias Oetiker <tobi@oetiker.ch> Compiled 2016-03-23 10:46:12

Have librrd-dev also of course.

tonioo commented 6 years ago

Have you made any change to the online config? (Modoboa > Parameters > Graphical stats)

BioSs54 commented 6 years ago

@tonioo

Nope 😢

Chemin d'accès vers le journal ? /var/log/mail.log Répertoire où stocker les fichiers RRD ? /srv/modoboa/rrdfiles

:/srv/modoboa# ll /srv/modoboa/rrdfiles
total 444
drwxrwx--- 2 modoboa modoboa   4096 mai   28 10:35 ./
drwxr-xr-x 8 modoboa modoboa   4096 juil.  3 10:11 ../
-rw-r--r-- 1 root    root    109520 juil. 12 14:05 global.rrd
-rw-r--r-- 1 root    root    109520 juil. 12 14:05 mail.xxxxxx.com.rrd
-rw-r--r-- 1 root    root      2448 juil. 12 15:00 new_accounts.rrd
-rw-r--r-- 1 root    root    109520 juil. 12 14:05 xxxxxx.ga.rrd
-rw-r--r-- 1 root    root    109520 juil. 11 14:30 xxxxx.xxxx.rrd
:/srv/modoboa# ll /var/log/mail.log
-rw-r----- 1 syslog adm 690844 juil. 12 15:00 /var/log/mail.log
tonioo commented 6 years ago

What's your distribution? Do you think you could upgrade rrdtool version to something > 1.6?

BioSs54 commented 6 years ago

@tonioo my distri is Ubuntu 16.04.4 LTS. I cant upgrade to 1.6. Do you believe my version is outdated ?

tonioo commented 6 years ago

@BioSs54 I remember there was issues with rrdtool 1.5.x...

tonioo commented 6 years ago

@BioSs54 Could you run the following command on one of your rrd files:

rrdtool xport <your rrd file>

and paste a sample of the output here?

BioSs54 commented 6 years ago

@tonioo rrdtool xport mail.xxxxx.com.rrd ERROR: 'mail.xxxxx.com.rrd' is not a valid function name in mail.xxxxx.com.rrd

tonioo commented 6 years ago

my bad, the command to run is a bit more complex :p Do you think I could access your server? You can send me a mail directly if you want (contact@modoboa.org)

bugzy commented 6 years ago

any comment on what the issue was here and its solution?

lmfrazao commented 2 years ago

Having the same problem with latest modoboa 2.0 on ubuntu 20.04

new installation with the installer

all the rrd files are with 107K

tonioo commented 2 years ago

@lmfrazao Stats should work fine in the new UI

lmfrazao commented 2 years ago

yes it is working on new UI.

is there any general view for all domains ?

and are the numbers correct like this ?

Screenshot_1 Screenshot_2

fmp777 commented 2 years ago

i have same problem, new install on ubuntu 22.04. new UI doesn't have a stats button anywhere that i can find?