How to import a custom log?


I have created a custom log format which I will be using and I need to import the logs to Matomo. However, Matomo does not recognize the formats and fails to import them.

I have taken a look at the script, but my python and regex knowledge is a bit limited. Could you provide me with some basic guidance for the creation of the new log format?

The LogFormat is this:

LogFormat “[%D] [server %V] %{X-Forwarded-For}i %h %l %u %t “%r” %>s %b “%{Referer}i” “%{User-Agent}i” %p %D” combined

But some general documentation would help in case the format changes.

(Fabian Dellwing) #2


Okay, I was able to import my access log formats this way.

However, I still can’t import apache default error logs. The apache error logs do not contain some groups that are necessary and I am not sure how to overcome this.

(Fabian Dellwing) #4

Why should you import an error log?


Hmm, good question. I am not really sure we need this so I just asked. Are there no use cases for this?

(Fabian Dellwing) #6

There usually no data in the error log that matomo can work with.