Not Able To View API Activity In Dashboard V0.9.3


#1

Imported Google Group message. Original thread at: https://groups.google.com/forum/#!topic/tyk-community-support/xRyEWodGJOc Import Date: 2016-01-19 21:07:44 +0000.
Sender:Jayadatta Vallabhaneni.
Date:Friday, 13 March 2015 23:56:55 UTC.

Hi,

I am trying to retrieve the activity in the Dashboard and nothing is popping up in the frontend. Below is the Tyk analytics configuration that i have. Could you please let me know if there is anything missing? I could see the log activity in MongoDb collection.

{
“listen_port”: 3000,
“tyk_api_config”: {
“Host”: “http://localhost”,
“Port”: “5000”,
“Secret”: “352d20ee67be67f6340b4c0605b044b7”
},
“mongo_url”: “mongodb://tykuser:[email protected]:27017/tyk”,
“page_size”: 10,
“admin_secret”: “12345”,
“redis_port”: 6379,
“redis_host”: “localhost”,
“redis_password”: “”,
“force_api_defaults”: false,
“notify_on_change”: false,
“license_owner”: “”
}

Thanks,
Jayadatta


#2

Imported Google Group message.
Sender:Jayadatta Vallabhaneni.
Date:Saturday, 14 March 2015 01:51:24 UTC.

Thanks Martin.

Changing the collection name to tyk_analytics did the trick.

Btw, i am seeing the tables little bit distorted when viewed in Firefox and Chrome. Hope it will be a cosmetic change.

Regards,
Jayadatta

  • show quoted text -

#3

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 13 March 2015 23:59:38 UTC.

Hi,

Can you post your Tyk.conf? That’s usually where the issue is :slight_smile:

Thanks,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/2d36dd61-b016-46ab-a819-bb41648ad7bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


#4

Imported Google Group message.
Sender:Martin Buhr.
Date:Saturday, 14 March 2015 00:03:53 UTC.

Hi Martin,

Below is my tyk conf.

{
“listen_port”: 5000,
“secret”: “352d20ee67be67f6340b4c0605b044b7”,
“template_path”: “./templates”,
“app_path”: “./apps”,
“tyk_js_path”: “./js/tyk.js”,
“middleware_path”: “./middleware”,
“use_db_app_configs”: true,
“storage”: {
“type”: “redis”,
“host”: “localhost”,
“port”: 6379,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 100
},
“enable_analytics”: true,
“analytics_config”: {
“type”: “mongo”,
“csv_dir”: “/tmp”,

    "mongo_url": "mongodb://tykuser:[email protected]:27017/tyk",
    "mongo_db_name": "tyk",
    "mongo_collection": "tykCollection",
    "purge_delay": 0,
    "ignored_ips": []
},
"health_check": {
    "enable_health_checks": true,
    "health_check_value_timeouts": 60
},
"optimisations_use_async_session_write": true,
"allow_master_keys": false

}

Thanks,
Jayadatta

  • show quoted text -

#5

Imported Google Group message.
Sender:Jayadatta Vallabhaneni.
Date:Saturday, 14 March 2015 00:09:08 UTC.

Also, change the collection name to tyk_analytics :slight_smile:

  • show quoted text -

  • show quoted text -

To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/ab1d949c-4158-41c5-8c30-97d9f8a510d5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


#6

Imported Google Group message.
Sender:Martin Buhr.
Date:Saturday, 14 March 2015 00:13:31 UTC.

Ah, there it is :slight_smile:

Set your purge_delay to 10 or so, this will get analytics purged to MongoDB for the dashboard every 10 seconds :slight_smile:

Also, make sure you are running MongoDB v2.6 or higher. We haven’t tested with 3.0 yet, but it should work too.

Let me know how it goes…

Thanks,
Martin


#7

Imported Google Group message.
Sender:Martin Buhr.
Date:Saturday, 14 March 2015 01:51:24 UTC.

Thanks Martin.

Changing the collection name to tyk_analytics did the trick.

Btw, i am seeing the tables little bit distorted when viewed in Firefox and Chrome. Hope it will be a cosmetic change.

Regards,
Jayadatta

  • show quoted text -

#8

Imported Google Group message.
Sender:Jayadatta Vallabhaneni.
Date:Saturday, 14 March 2015 02:22:51 UTC.

Great :slight_smile:

I would still recommend making purge_delay larger than 0 though, as Tyk does a KEYS command to run the purge on redis, and this can cause locks, having at 0 means it will be running that command over and over very quickly which could impact performance over time as traffic grows. Setting it to 10 or even 60 might be better.

Could you open a ticket on our GitHub page with a screenshot of what your tables look like in FF and Chrome, will remind us to fix it :slight_smile:

Cheers,
Martin