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

Piwik Log Importer Cannot Parse Docker Logs

$
0
0

@sgpbyrne wrote:

Hi all,

I am having an issue using the piwik log importer.

I am trying to send the logs from NGINX reverse proxy which is running in a docker container. This means that I am trying to parse the docker logs.

The command I’m running is here -

python import_logs.py --url=http://<internal_piwik_url>.com/index.php --token-auth=<my_token> --log-format-name=nginx_json $(docker inspect --format='{{.LogPath}}' bdb5e0b85671)

This is failing with the following output -

0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
Parsing log /docker/containers/bdb5e0b856710c74e0e70e674f0f4b5b9c40224cb31e784a9417e8218215307c/bdb5e0b856710c74e0e70e674f0f4b5b9c40224cb31e784a9417e8218215307c-json.log...
Traceback (most recent call last):
  File "import_logs.py", line 2416, in <module>
    main()
  File "import_logs.py", line 2387, in main
    parser.parse(filename)
  File "import_logs.py", line 2203, in parse
    status=format.get('status'),
  File "import_logs.py", line 175, in get
    raise BaseFormatException()
__main__.BaseFormatException

Has any one seen this issue before?

Any help would be much appreciated.

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles