• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[Gelöst] AWSTATS Statistik nachholen?

revealed

Guru
Hallo!

Und zwar folgendes. Ich habe mir awstats konfiguriert und ich möchte mir, weil mein Rechner seit 2007 läuft. Statistik auch aus 2007 und dem was davor war anzeigen lassen.

Bis jetzt logt awstats seit ein paar Tagen, das was seit dem Installationstag von awstats passiert ist.
Soweit so gut. Es funktioniert immerhin.

Ich habe mir aber gedacht eben die alten Logs auch einlesen zu lassen. Nur weiss ich nicht wie.

Problem 1:
Alle Logdateien der vorigen Monate liegen im ".bz2" Format vor.

Problem 2:
LogFile="/var/log/apache2/access_log"
Was passiert wenn es einen Logrotate gibt? Bleibt die Statistik vom Vormonat erhalten?

Problem 3:
In der Configdate steht:
# You can also use a pipe if log file come from a pipe :
# Example: "gzip -d </var/log/apache/access.log.gz |"
# If there are several log files from load balancing servers :
# Example: "/pathtotools/logresolvemerge.pl *.log |"
#
Damit habe ich herumprobiert, jedoch ohne erfolg!

Namen der Logdateien wie folgt:
Code:
access_log
access_log-20071228.bz2
...

Kann mir bitte jemand helfen, dass ich alle statistik da reinbekomme?

Edit:
Was ich versucht habe:
Code:
LogFile="/usr/share/doc/packages/awstats/tools/logresolvemerge.pl /var/log/apache2/* |"
Und wenn ich dann Ausführe:
Code:
/usr/share/doc/packages/awstats/tools/awstats_updateall.pl now -awstatsprog=/srv/www/cgi-bin/awstats.pl
Dann sagt er:
Code:
Running '"/srv/www/cgi-bin/awstats.pl" -update -config=localhost -configdir="/etc/awstats"' to update configocalhost
Create/Update database for config "/etc/awstats/awstats.localhost.conf" by AWStats version 6.7 (build 1.892)
From data in log file "/usr/share/doc/packages/awstats/tools/logresolvemerge.pl /var/log/apache2/* |"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record has fallen on another record.
So searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 1048139
 Found 4 dropped records,
 Found 48121 corrupted records,
 Found 999480 old records,
 Found 534 new qualified records.
Warum nimmt er die alten Records nicht rein?


Vielen Dank!

Gruß,

R
 
OP
revealed

revealed

Guru
Habs gefunden...

Erstmal musste ich das Configfile anpassen wie oben beschrieben (also):
Code:
LogFile="/usr/share/doc/packages/awstats/tools/logresolvemerge.pl /var/log/apache2/* |"
--> logresolvemerge.pl kann mit bz2 dateien umgehen!

Dann musste ich den Cache säubern, weil die Statistik einfach verbockt war durch das Update ohne die richtige Syntax:
Code:
cd /var/cache
mv awstats back_of_awstats_cache
mkdir awstats

Dann eben ein sauberes Update mit der richtigen Einstellung:
Code:
/usr/share/doc/packages/awstats/tools/awstats_updateall.pl now -awstatsprog=/srv/www/cgi-bin/awstats.pl

Und ich kann bis 2007 Statistik einsehen.

Jetzt habe ich noch ein Mysterium:
Code:
Parsed lines in file: 1048281
 Found 4 dropped records,
 Found 51144 corrupted records,
 Found 0 old records,
 Found 997133 new qualified records.
Was heisst corrupted?


Gruß

R
 
Oben