khang
1
I am setting up Tyk on premise and everything is working except the activity charts.
Dashboard log says level=info msg="Aggregates disabled"
And my tyk_analytics.conf is like
"mongo_url": "mongodb://10.0.3.70:27017/tyk_analytics", "redis_port": 6379, "redis_host": "10.0.3.70", "redis_password": "", "enable_cluster": false, "force_api_defaults": false, "notify_on_change": true, "redis_database": 0, "redis_hosts": null,
Any idea? Thanks.
1 Like
Martin
2
Did you use the setup helper scripts provided by us?
khang
3
Yeah I did. I got the dashboard admin usn/pwd from there.
khang
4
I also found this in pump’s log.
time="Jan 5 00:40:37" level=info msg="## Tyk Analytics Pump, v0.4.0.12 ##" time="Jan 5 00:40:37" level=info msg="-- No max batch size set, defaulting to 10MB" time="Jan 5 00:40:37" level=info msg="-- No max document size set, defaulting to 10MB" time="Jan 5 00:40:37" level=info msg="Init Pump: MongoDB Pump" time="Jan 5 00:40:37" level=info msg="-- No max batch size set, defaulting to 10MB" time="Jan 5 00:40:37" level=info msg="-- No max document size set, defaulting to 10MB" time="Jan 5 00:40:37" level=info msg="Init Uptime Pump: MongoDB Pump" time="Jan 5 00:40:37" level=info msg="Starting purge loop @2(s)" time="Jan 5 00:40:39" level=warning msg="Connection dropped, connecting.." time="Jan 5 00:40:39" level=warning msg="Connection dropped, connecting.."
khang
5
As I looked further, found out that Log Browser
tab was working fine, but everything else in API Usage Data
weren’t.
khang
6
And from dashboard log, I am getting these, I hope they are relevant.
time="Jan 5 00:48:08" level=info msg="Aggregates disabled" time="Jan 5 00:48:08" level=error msg="[ANALYTICS] Pipe iteration error: exception: the $cond operator requires an array of 3 operands"
Martin
7
You need to enable aggregates in your tyk_analytics.conf
file:
"enable_aggregate_lookups": true,
"aggregate_lookup_cutoff": "01/07/2016",
You also need ot make sure you have the aggregate pump enabled in your pump.conf
:
"pumps": {
...
"mongo-pump-aggregate": {
"name": "mongo-pump-aggregate",
"meta": {
"mongo_url": "MONGO_URL",
"use_mixed_collection": true
}
}
}
1 Like