yandexmobile / appmetrica-logsapi-loader

A tool for automatic data loading from AppMetrica LogsAPI into (local) ClickHouse
https://hub.docker.com/r/yandex/appmetrica-logsapi-loader/
22 stars 11 forks source link
appmetrica automation clickhouse docker-compose docker-image logs-api python yandex yandex-appmetrica

AppMetrica LogsAPI Loader

Python-script for automatic loading from AppMetrica LogsAPI into local ClickHouse DB. And yes, there is a Docker container too.

How to use this image

To use this image you should generate OAuth token for AppMetrica Logs API. This token should be provided via environment variable TOKEN.

Also 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.

Start manualy

docker run -d \
    --name clickhouse \
    yandex/clickhouse-server
docker run -d \
    --name appmetrica-logsapi-loader \
    --link clickhouse \
    --env 'CH_HOST=http://clickhouse:8123' \
    --env 'TOKEN=YOUR_OAUTH_TOKEN' \
    --env 'APP_IDS=["YOUR_APP_ID"]' \
    yandex/appmetrica-logsapi-loader

More information about ClickHouse server image.

Start with Docker Compose

Download this repository (or just docker-compose.yml file) and run:

TOKEN=YOUR_OAUTH_TOKEN \
APP_IDS='["YOUR_APP_ID"]' \
docker-compose up -d

Configuration

All configuration properties can be passed through environment variables.

Main variables

ClickHouse related

LogsAPI related

Scheduling configuration

Other variables

License

License agreement on use of Yandex AppMetrica is available at EULA site