matomo-org / matomo-org/docker

import script doesnt seem to work properly

Open
#317 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
1k
Forks
384
PR merge metrics
No merged PRs in 30d

Description

hi,

the importscript doesnt seem to work properly.

see also ticket https://github.com/matomo-org/matomo-log-analytics/issues/352

I am using tjhe docker version and in contrary what your github page sais the import script uses python3 now.
However it does not work in my case.
Can you please check if the docker image has the latest version?

I am using the script like so:
```
/usr/bin/python3 /var/lib/docker/volumes/matmoto_matomo/_data/misc/log-analytics/import_logs.py --url=http://192.168.0.61:8080 --user=hanscees@hanscees.con --password=seclet --idsite=1 --recorders=4 --debug --dryrun /root/bomengidsstats/access.log-20230515
```

The error is:
```
usage: import_logs.py [-h] [--auth-user AUTH_USER] [--auth-password AUTH_PASSWORD] [--debug] [--debug-tracker]
[--debug-request-limit DEBUG_REQUEST_LIMIT] --url MATOMO_URL [--api-url MATOMO_API_URL]
[--tracker-endpoint-path MATOMO_TRACKER_ENDPOINT_PATH] [--dry-run] [--show-progress]
[--show-progress-delay SHOW_PROGRESS_DELAY] [--add-sites-new-hosts] [--idsite SITE_ID]
[--idsite-fallback SITE_ID_FALLBACK] [--config CONFIG_FILE] [--login LOGIN] [--password PASSWORD]
[--token-auth MATOMO_TOKEN_AUTH] [--hostname HOSTNAMES] [--exclude-path EXCLUDED_PATHS]
[--exclude-path-from EXCLUDE_PATH_FROM] [--include-path INCLUDED_PATHS] [--include-path-from INCLUDE_PATH_FROM]
[--useragent-exclude EXCLUDED_USERAGENTS] [--enable-static] [--enable-bots] [--enable-http-errors]
[--enable-http-redirects] [--enable-reverse-dns] [--strip-query-string]
[--query-string-delimiter QUERY_STRING_DELIMITER] [--log-format-name LOG_FORMAT_NAME]
[--log-format-regex LOG_FORMAT_REGEX] [--log-date-format LOG_DATE_FORMAT] [--log-hostname LOG_HOSTNAME]
[--skip SKIP] [--recorders RECORDERS] [--recorder-max-payload-size RECORDER_MAX_PAYLOAD_SIZE] [--replay-tracking]
[--replay-tracking-expected-tracker-file REPLAY_TRACKING_EXPECTED_TRACKER_FILE] [--output OUTPUT]
[--encoding ENCODING] [--disable-bulk-tracking] [--debug-force-one-hit-every-Ns FORCE_ONE_ACTION_INTERVAL]
[--force-lowercase-path] [--enable-testmode] [--download-extensions DOWNLOAD_EXTENSIONS]
[--add-download-extensions EXTRA_DOWNLOAD_EXTENSIONS] [--w3c-map-field KEY=VAL] [--w3c-time-taken-millisecs]
[--w3c-fields W3C_FIELDS] [--w3c-field-regex KEY=VAL] [--title-category-delimiter TITLE_CATEGORY_DELIMITER]
[--dump-log-regex] [--ignore-groups REGEX_GROUPS_TO_IGNORE] [--regex-group-to-visit-cvar KEY=VAL]
[--regex-group-to-page-cvar KEY=VAL] [--track-http-method TRACK_HTTP_METHOD] [--retry-max-attempts MAX_ATTEMPTS]
[--retry-delay DELAY_AFTER_FAILURE] [--request-timeout REQUEST_TIMEOUT] [--include-host INCLUDE_HOST]
[--exclude-host EXCLUDE_HOST] [--exclude-older-than EXCLUDE_OLDER_THAN] [--exclude-newer-than EXCLUDE_NEWER_THAN]
[--add-to-date SECONDS_TO_ADD_TO_DATE] [--request-suffix REQUEST_SUFFIX] [--accept-invalid-ssl-certificate]
[--php-binary PHP_BINARY]
file [file ...]
import_logs.py: error: the following arguments are required: file

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the exact Docker-based command and reviewing the bundled /var/lib/docker/volumes/matmoto_matomo/_data/misc/log-analytics/import_logs.py help output. Compare the documented options with the command shown, including the file argument, and check whether the image contains the expected script version. Done means the cause is identified and the Docker image or usage is corrected and verified with the supplied log file.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.