{"id":44650029,"url":"https://github.com/yandexmobile/appmetrica-logsapi-loader","last_synced_at":"2026-02-14T20:41:21.490Z","repository":{"id":24849111,"uuid":"102589715","full_name":"yandexmobile/appmetrica-logsapi-loader","owner":"yandexmobile","description":"A tool for automatic data loading from AppMetrica LogsAPI into (local) ClickHouse","archived":false,"fork":false,"pushed_at":"2022-12-08T00:43:39.000Z","size":93,"stargazers_count":23,"open_issues_count":7,"forks_count":11,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-03-26T08:11:53.441Z","etag":null,"topics":["appmetrica","automation","clickhouse","docker-compose","docker-image","logs-api","python","yandex","yandex-appmetrica"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/yandex/appmetrica-logsapi-loader/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yandexmobile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-06T09:26:15.000Z","updated_at":"2024-02-22T13:56:48.000Z","dependencies_parsed_at":"2022-07-25T04:02:04.445Z","dependency_job_id":null,"html_url":"https://github.com/yandexmobile/appmetrica-logsapi-loader","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yandexmobile/appmetrica-logsapi-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandexmobile%2Fappmetrica-logsapi-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandexmobile%2Fappmetrica-logsapi-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandexmobile%2Fappmetrica-logsapi-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandexmobile%2Fappmetrica-logsapi-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yandexmobile","download_url":"https://codeload.github.com/yandexmobile/appmetrica-logsapi-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandexmobile%2Fappmetrica-logsapi-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29455362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appmetrica","automation","clickhouse","docker-compose","docker-image","logs-api","python","yandex","yandex-appmetrica"],"created_at":"2026-02-14T20:41:20.881Z","updated_at":"2026-02-14T20:41:21.484Z","avatar_url":"https://github.com/yandexmobile.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AppMetrica LogsAPI Loader\n\nPython-script for automatic loading from AppMetrica LogsAPI into local ClickHouse DB. And yes, there is a Docker container too.\n\n## How to use this image\n\nTo use this image you should generate [OAuth token][OAUTH-DOCS] for [AppMetrica Logs API][LOGSAPI-DOCS]. This token should be provided via environment variable `TOKEN`.\n\nAlso you should copy app's numeric IDs. You could find them in General Settings of your app (\"Application ID\"). All IDs should be provided as JSON-array via environment variable `APP_IDS`.\n\n### Start manualy\n```bash\ndocker run -d \\\n    --name clickhouse \\\n    yandex/clickhouse-server\ndocker run -d \\\n    --name appmetrica-logsapi-loader \\\n    --link clickhouse \\\n    --env 'CH_HOST=http://clickhouse:8123' \\\n    --env 'TOKEN=YOUR_OAUTH_TOKEN' \\\n    --env 'APP_IDS=[\"YOUR_APP_ID\"]' \\\n    yandex/appmetrica-logsapi-loader\n```\n\nMore information about [ClickHouse server image][CLICKHOUSE-SERVER].\n\n### Start with Docker Compose\nDownload this repository *(or just `docker-compose.yml` file)* and run:\n```bash\nTOKEN=YOUR_OAUTH_TOKEN \\\nAPP_IDS='[\"YOUR_APP_ID\"]' \\\ndocker-compose up -d\n``` \n\n## Configuration\n\nAll configuration properties can be passed through environment variables.\n \n#### Main variables\n* `TOKEN` - *(required)* Logs API OAuth token.\n* `APP_IDS` - *(required)* JSON-array of numeric AppMetrica app identifiers.\n* `SOURCES` - Logs API endpoints to download from. See [available endpoints][LOGSAPI-ENDPOINTS].\n\n#### ClickHouse related\n* `CH_HOST` - Host of ClickHouse DB to store events. (default: `http://localhost:8123`)\n* `CH_USER` - Login of ClickHouse DB. (default: empty)\n* `CH_PASSWORD` - Password of ClickHouse DB. (default: empty)\n* `CH_DATABASE` - Database in ClickHouse to create tables in. (default: `mobile`)\n\n#### LogsAPI related\n* `LOGS_API_HOST` - Base host of LogsAPI endpoints. (default: `https://api.appmetrica.yandex.ru`)\n* `REQUEST_CHUNK_ROWS` - Size of chunks to process at once. (default: `25000`)\n* `ALLOW_CACHED` - Flag that allows cached LogsAPI data. Possible values: `0`, `1`. (default: `0`)\n\n#### Scheduling configuration\n* `UPDATE_LIMIT` - Count of days for the first events fetch. (default: `30`)\n* `FRESH_LIMIT` - Count of days which still can have new events. (default: `7`)\n* `UPDATE_INTERVAL` - Interval of time in hours between events fetches from Logs API. (default: `12`)\n\n#### Other variables\n* `DEBUG` - Enables extended logging. Possible values: `0`, `1`. (default: `0`)\n* `STATE_FILE_PATH` - Path to file with script state. (default: `data/state.json`)\n\n## License\nLicense agreement on use of Yandex AppMetrica is available at [EULA site][LICENSE]\n\n\n[LOGSAPI-DOCS]: https://tech.yandex.com/appmetrica/doc/mobile-api/logs/about-docpage/ \"AppMetrica LogsAPI documentation\"\n[OAUTH-DOCS]: https://tech.yandex.com/appmetrica/doc/mobile-api/intro/authorization-docpage/ \"Yandex OAuth documentation\"\n[CLICKHOUSE-SERVER]: https://hub.docker.com/r/yandex/clickhouse-server/ \"ClickHouse Server Docker image page\"\n[LOGSAPI-ENDPOINTS]: https://tech.yandex.com/appmetrica/doc/mobile-api/logs/endpoints-docpage/ \"AppMetrica LogsAPI Endpoints documentation\"\n[LICENSE]: https://yandex.com/legal/metrica_termsofuse/ \"Yandex AppMetrica agreement\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandexmobile%2Fappmetrica-logsapi-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyandexmobile%2Fappmetrica-logsapi-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandexmobile%2Fappmetrica-logsapi-loader/lists"}