Zum Inhalt springen

awstats - logformat

Erstellt am 27. Oktober 2004 · 9 Antworten · letzte Antwort am 19. November 2004

Tags: Frage

zero ·

Hallo,

nachdem ich jetzt 3 tage lang ohne Erfolg das Forum, Google, Typo3.org und die Colorcube-Seite durchsucht habe nach einer Lösung... bleibt mir jetzt wohl nurnoch die Möglichkeit mich an Euch zu wenden.

Unser Typo (Version 3.6.0) läuft auf einem SuSe Linux-System mit Apache und MySQL.

Ich versuche cc_awstats (bezogen von: http://typo3lab.colorcube.de/AWStats_logfi.70.0.html) zum laufen zu kriegen.

Das Logfile wird von Typo3 einwandfrei gefüllt.
Awstats findet das Logfile und kann darauf zugreifen.

Jetzt gibt es allerdings das Problem das es anscheinend das Log nicht richtig auslesen kann (testhalber habe ich die Berechtigungen des Logfiles auf 777 gesetzt)

Folgende Fehlermeldung:

AWStats did not found any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /usr/local/typo3/htdocs/temptypo3/fileadmin/rmcan.log must have a bad format or LogFormat parameter setup does not match this format.

Your LogFormat parameter is 1, this means each line in your log file need to have "combined log format" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"

And this is a sample of what AWStats found in your log (the record number 50 in your log):
10.10.5.41 - - [26/Oct/2004:08:08:44 +0000] "GET /CAN_Feldbus_Contr.../Home--2.html HTTP/1.1" 200 26372 "http://server.com/temptypo3/index.php?id=229" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"

Für mich sehen diese beiden Zeilen vom Format her allerdings ziemlich identisch aus. Einfach mal zum Testen habe ich die Sample-Zeile mal in das Log gesetzt:

Your LogFormat parameter is 1, this means each line in your log file need to have "combined log format" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"

And this is a sample of what AWStats found in your log (the record number 50 in your log):
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"

Allerdings ohne Erfolg... selber Fehler.

In meiner awstats.config habe ich folgendes eingestellt:
LogFormat = 1
URLWithQuery = 1

Hat vielleicht noch jemand hier eine Idee woran es liegen könnte oder wie ich die Extension zum laufen kriege?

MfG
Chris

jsabelle ·

Hallo

Im http.conf von dem Server muss bei der Log Konfiguration dies stehen:

CustomLog logs/acces.log combined

Gruss

Jsabelle

Junior ·

Falls du einen Root Server von 1&1 haben solltest, achte darauf, dass da die httpd.conf regelmässig vom System überschrieben wird.

Gruss Junior

zero ·

Danke für die Tips!

Hat leider (bis jetzt) keinen Erfolg gehabt...

In meiner http.conf stand zwar schon die Zeile:
CustomLog logs/access_log combined

Allerdings verwies sie nicht auf mein Logfile
Nachdem ich es auf mein Logfile umgeleitet hab (das alte Log natürlich vorher gelöscht habe) und das neue gefüllt wurde... habe ich leider immer noch die obige Fehlermeldung.

Der Webserver steht hier bei uns im Hause.

Gibt es vielleicht noch etwas was ich in der http.conf deaktivieren oder aktivieren muss?

Hier der Auszug aus meiner http.conf bezüglich des Logs

# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# You need to enable mod_logio.c to use %I and %O
#LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog fileadmin/rmcan.log combined

#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent

#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access_log combined

jsabelle ·

Hallo

Gib mal im Setup dies an:

#Awstats
config.stat = 1
config.stat_apache = 1
config.stat_apache_logfile =access.log

access.log ist der name des Logs muss angepasst werden.

Gruss

Jsabelle

zero ·

Den Teil hab ich schon im Setup stehen 🙁
bzw

page.config.stat = 1
page.config.stat_apache = 1
page.config.stat_apache_logfile = rmcan.log
page.config.stat_mysql = 0

Das Log füllt sich ja auch einwandfrei.
Es kann nur nicht ausgelesen werden obwohl die Log-Formate übereinstimmen...

Ich versteh das alles auch nicht mehr ...

as72 ·

Hallo Leute,

ich habe die awstats endlich ans Laufen gebracht, bekomme aber lediglich eine Auswertung für die index.php.

Ist das alles oder habe ich etwas falsch gemacht???
Ich möchte natürlich eine solche Statistik für jede einzelne Seite haben die in Typo3 angelegt ist.

zero ·

ich habe die awstats endlich ans Laufen gebracht, bekomme aber lediglich eine Auswertung für die index.php.

Hast du das normale awstats (http://awstats.sourceforge.net/) oder das Typo3-Modul awstats (http://typo3lab.colorcube.de/AWStats_logfi.70.0.html) benutzt?

Das normale awsats funktioniert bei mir einwandfrei - zeigt aber nur Zugriffe auf die index.php 🙁
Das ist hier jedoch 'normal'...

Das Typo3-awstats funktioniert bei mir leider (wie oben beschrieben) nicht.

zero ·

Also ich habe jetzt mein LogFile in das normale Awstats (von sourceforge) geladen und dort funktioniert es einwandfrei. cc_awstats weigert sich dennoch standhaft und pocht darauf das ich ein falsches LogFormat hätte...

Muss man wohl nicht verstehen...