[Solved] No analytics data pushed into MongoDB

Hello,

I have run a full reinstallation of Tyk.io on premise on Ubuntu 14.04 Server yesterday. Everything works fine, except for the analytics data.
Gateway version : 2.6.1
Dashboard version : 1.6.1
Pump version : 0.5.2

In MongoDB, I only see collections created by the dashboard :

  • portal_configurations (1)
  • tyk_analytics_users (1)
  • tyk_apis (1)
  • tyk_organisations (1)
  • tyk_policies (1)

I don’t see anymore the collections I had before (tyk_analytics, tyk_analytics_aggregates…).

My pump.conf looks like this :
{
“analytics_storage_type”: “redis”,
“analytics_storage_config”: {
“type”: “redis”,
“host”: “redis_server”,
“port”: 6379,
“hosts”: null,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 100,
“optimisation_max_active”: 0,
“enable_cluster”: false
},
“purge_delay”: 10,
“pumps”: {
“mongo”: {
“name”: “mongo”,
“meta”: {
“collection_name”: “tyk_analytics”,
“mongo_url”: “mongodb://mylogin:mypassword@mongo_db_server/tyk_analytics”
}
},
“mongo-pump-aggregate”: {
“name”: “mongo-pump-aggregate”,
“meta”: {
“mongo_url”: “mongodb://mylogin:mypassword@mongo_db_server/tyk_analytics”,
“use_mixed_collection”: true
}
}
},
“uptime_pump_config”: {
“collection_name”: “tyk_uptime_analytics”,
“mongo_url”: “mongodb://mylogin:mypassword@mongo_db_server/tyk_analytics”
},
“dont_purge_uptime_data”: false
}

Logs of the last pump start :
[May 17 14:13:40] INFO main: ## Tyk Analytics Pump, v0.5.2 ##
[May 17 14:13:40] INFO mongo-pump: – No max batch size set, defaulting to 10MB
[May 17 14:13:40] INFO mongo-pump: – No max document size set, defaulting to 10MB

Extract from the tyk.conf :
“enable_analytics”: true,
“analytics_config”: {
“type”: “”,
“ignored_ips”: ,
“enable_detailed_recording”: true,
“enable_geo_ip”: false,
“geo_ip_db_path”: “”,
“normalise_urls”: {
“enabled”: true,
“normalise_uuids”: true,
“normalise_numbers”: true,
“custom_patterns”:
}
},

With the last version of Tyk, this part was a little different :
“enable_analytics”: true,
“analytics_config”: {
“type”: “mongo”,
“pool_size”: 100,
“csv_dir”: “/tmp”,
“mongo_url”: “”,
“mongo_db_name”: “”,
“mongo_collection”: “”,
“purge_delay”: 100,
“ignored_ips”: ,
“enable_detailed_recording”: true,
“enable_geo_ip”: false,
“geo_ip_db_path”: “”,
“normalise_urls”: {
“enabled”: true,
“normalise_uuids”: true,
“normalise_numbers”: true,
“custom_patterns”:
}
},

I have tried to restore the old configuration for this section, but it didn’t help.

Would you have any idea how I could get my analytics data working again ?

Thanks !
Jerome

I have run the setup script again for Pump, still the same. After starting the service, I don’t get anything more than :
[May 17 18:16:33] INFO main: ## Tyk Analytics Pump, v0.5.2 ##
[May 17 18:16:33] INFO mongo-pump: – No max batch size set, defaulting to 10MB
[May 17 18:16:33] INFO mongo-pump: – No max document size set, defaulting to 10MB

I have the feeling it does nothing, but I can’t tell why :frowning: No trace of pumping.

Forget it, problem is solved…

Something with hostnames and IPs between the 4 machines… They could ping by the hostname but for an unknown reason, adding the mapping to each /etc/hosts file was the solution. Maybe a DNS issue.

Hi Jerome

Glad you got it resolved - are you able to share your use case for Tyk? Either here or on email with info @ Tyk.io

Thanks

James

Hi James,

Already did a few months ago :slight_smile: