Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLAGGREGATE pump fails silently if org_id is not specified in API definition #707

Open
jakub-bochenski opened this issue Aug 7, 2023 · 0 comments

Comments

@jakub-bochenski
Copy link

jakub-bochenski commented Aug 7, 2023

Based on https://github.com/TykTechnologies/tyk-gateway-docker (with "enable_analytics": true)

If I remove:

"org_id": "default",

from https://github.com/TykTechnologies/tyk-gateway-docker/blob/master/apps/protected-api.json

Then the sql_aggregate pump will not produce any data. The table is created but no rows are added to tyk_aggregated.
The sql pumps continues to work normally (rows appear in the table tyk_analytics )

There is no error in the log. In fact it suggests the pump is working fine:

tyk-pump_1     | time="Aug 07 16:54:32" level=info msg="Purged 1 records..." prefix=SQL-pump
tyk-pump_1     | time="Aug 07 16:54:32" level=info msg="Purged 1 records..." prefix=SQL-aggregate-pump

pump.conf:

{
    "analytics_storage_type": "redis",
    "analytics_storage_config": {
        "type": "redis",
        "host": "redis",
        "port": 6379,
        "hosts": null,
        "username": "",
        "password": "",
        "database": 0,
        "optimisation_max_idle": 100,
        "optimisation_max_active": 0,
        "enable_cluster": false,
        "redis_use_ssl": false,
        "redis_ssl_insecure_skip_verify": false
    },
    "purge_delay": 10,
    "pumps": {
        "sql": {
            "name": "sql",
            "meta": {
                "type": "postgres",
                "connection_string": "host=postgres port=5432 user=postgres dbname=postgres password=example",
                "table_sharding": false
            }
        },
        "sql_aggregate": {
            "name": "sql_aggregate",
            "meta": {
                "type": "postgres",
                "connection_string": "host=postgres port=5432 user=postgres dbname=postgres password=example",
                "table_sharding": false
            }
        }
    },
    "dont_purge_uptime_data": true
}

Pump version: 1.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant