Comments (2)
Hi Guys,
I've pached my import_logs.py as followed.
My Nginx log format :
log_format vhosts '$host $http_x_forwarded_for - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
My Common log format
_COMMON_LOG_FORMAT = (
'(?P<ip>[0-9]*.?[0-9]*.?[0-9]*.?[0-9]*)[\,\s?\S+]*\s+\S+\s+(?P<userid>\S+)\s+\[(?P<date>.*?)\s+(?P<timezone>.*?)\]\s+'
'"\S+\s+(?P<path>.*?)\s+\S+"\s+(?P<status>\S+)\s+(?P<length>\S+)'
[0-9]*.?[0-9]*.?[0-9]*.?[0-9]*
allows me to prevent the "," to be part of the <ip> regex group and avoid the strict ipv4 regex filter
[\,\s?\S+]*
allows me to have none OR multiple IPs and to keep the first one to be mached in piwik.
Hope it can be usefull, don't hesitate to tel me if my workaround is not a proper one
from matomo-log-analytics.
@AlroneRhyn Would you mind creating a pull request wih your change, and ideally updating our tests to show what you've improved? Thanks!
from matomo-log-analytics.
Related Issues (20)
- log-format-regex does not work even if regex is working fine in python console HOT 1
- Matomo Log Analytics : config.ini.php could not be read. HOT 9
- Problem importing logs to cPanel install HOT 1
- Don't get any records on Apache HOT 1
- Automate --skip= in the command
- Tracking TLS protocols in IIS logs HOT 2
- import failes with wrong error : file HOT 2
- password with && crashed script HOT 3
- if hostname has no http in it importer together with docker-matomo fails to file ip- adresses clients correctly HOT 8
- Fatal error: the configuration file/config/config.ini.php could not be read. HOT 2
- Incorrect SharePoint Online location HOT 3
- Have anyone try to log import from SHOUTcastv2 or Wowza Media server
- import_logs.py: Silent failure if log file cannot be accessed
- Country guessing from browser language not working properly. HOT 1
- no bot tracked in logs HOT 6
- Subdomain listed as "Page url not defined" in Visits Log HOT 4
- import_logs.py does not work with secure auth token in Matomo 5 HOT 3
- Broken documentation url in script header HOT 3
- Rsyslog confirmMessages support
- Error when connecting to Matomo: 'utf-8' codec can't decode byte 0x80 in position 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matomo-log-analytics.