Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5981

Apache piped logging doesn't work

$
0
0

Hi guys!

I struggle now for days with the problem that the Apache piped logging doesn’t work (properly). I tried really a lot of option-, LogFormat- and Apache config combinations but can’t get it to work. When I hit the log-import manually over bash shell it works fine but not as Apache piped logging. I also checked the Apache mods if I maybe miss something. But also don’t get any errors in my logs. It’s like Apache or the Python script don’t give a fluff about the visitor.

This is my latest CustomLog-Config:

#
# "Normal" logging
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" matomoLogFormat
ErrorLog ${APACHE_LOG_DIR}/whoogle-error.log
CustomLog ${APACHE_LOG_DIR}/whoogle-access.log matomoLogFormat
#
# Apache piped logging to Matomo
#
CustomLog "|/var/www/analytics.[CENSORED].de/misc/log-analytics/import_logs.py --idsite=[CENSORED] --token-auth=[CENSORED] --hostname=whoogle.[CENSORED].de --enable-http-errors --enable-http-redirects --enable-bots --url=https://analytics.[CENSORED].de --recorders=2 --log-format-name=common_complete --debug --output=${APACHE_LOG_DIR}/matomo-debug.log -" matomoLogFormat

I have to mention that I use a reverse proxy for this service but I don’t know if this is an issue?

SSLProxyEngine Off
ProxyPreserveHost On
ProxyRequests Off
ProxyAddHeaders On
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 127.0.0.1
ProxyPass "/" "http://127.0.0.1:5000/"
ProxyPassReverse "/" "http://127.0.0.1:5000/"

After restart or reload of Apache I only get this in the matomo-debug.log:

808 2023-04-16 17:14:38,417: [DEBUG] Accepted hostnames: piped.[CENSORED].de,pipedapi.[CENSORED].de
809 2023-04-16 17:14:38,417: [DEBUG] Matomo Tracker API URL is: https://analytics.[CENSORED].de
810 2023-04-16 17:14:38,417: [DEBUG] Matomo Analytics API URL is: https://analytics.[CENSORED].de
811 2023-04-16 17:14:38,417: [DEBUG] Accepted hostnames: whoogle.[CENSORED].de
812 2023-04-16 17:14:38,417: [DEBUG] Authentication token token_auth is: [CENSORED]
813 2023-04-16 17:14:38,417: [DEBUG] Matomo Tracker API URL is: https://analytics.[CENSORED].de
814 2023-04-16 17:14:38,417: [DEBUG] Resolver: static
815 2023-04-16 17:14:38,417: [DEBUG] Matomo Analytics API URL is: https://analytics.[CENSORED].de
816 2023-04-16 17:14:38,417: [DEBUG] Authentication token token_auth is: [CENSORED]
817 2023-04-16 17:14:38,417: [DEBUG] Resolver: static
818 2023-04-16 17:14:38,585: [DEBUG] Launched recorder
819 2023-04-16 17:14:38,585: [DEBUG] Launched recorder
820 2023-04-16 17:14:38,585: [DEBUG] Launched recorder
821 2023-04-16 17:14:38,585: [DEBUG] Launched recorder

Then after nothing anymore. I tried to simulate visitors via Brave’s Tor service and different online proxy but no records. I had also set %v at start of LogFormat and removed it. After the restart the was a pending record. But I don’t know if it was made by myself or by a foreign visitor.

=== Matomo System Check ===

Click to view System Check (click for more details)

=== System Info ===

  • OS: Debian 11.6 (5.10.0-21-amd64)
  • Apache: 2.4.56
  • Python: 3.9.2

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5981

Trending Articles