Statistics

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:22:09 +0000.
Sender:Thabelo Mancama.
Date:Friday, 28 August 2015 23:44:23 UTC+1.

Hey;

I check up and I am aware that there was an error with stats not showing up on the dash board for 24 hours. I have checked and made sure everything checks out:

tyk.conf

“enable_analytics”: true,
“analytics_config”: {
“type”: “mongo”,
“csv_dir”: “/tmp”,
“mongo_url”: “mongodb://localhost/tyk_analytics”,
“mongo_db_name”: “tyk_analaytics”,
“mongo_collection”: “tyl_analytics”,
“purge_delay”: -1,
“ignored_ips”: []
},

starts up

INFO[0000] Using /etc/tyk/tyk.conf for configuration
INFO[0000] Setting up analytics DB connection
INFO[0000] Using MongoDB cache purge
INFO[0000] Connecting to redis on: localhost:6379
WARN[0000] Cache purge turned off, you are responsible for Redis storage maintenance.
INFO[0000] Connecting to redis on: localhost:6379
INFO[0000] Listening on port: 5000
INFO[0000] Listening on [::]:5000
INFO[0000] Using App Configuration from Mongo DB
INFO[0000] Connecting to redis on: localhost:6379
INFO[0000] Subscription started: tyk.cluster.notifications

Mongo Version

[nantoka-user@ip-111-222-333-444 dash]$ mongo --version
MongoDB shell version: 3.0.3

But I am not getting any stats in at all. I am fairly certain I have forgotten to add a true somewhere but I don’t know where.

Any help would be much appreciated.

Ta;

T

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 28 August 2015 23:54:29 UTC+1.

Hi,

Your purge delay is set to -1, this disables it, set it to a value like 10 so that analytics are written to your dashboard every 10 seconds.

Also make sure you are running the latest version of Mongo :slight_smile:

Cheers,
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/db21347a-a0b1-4c28-9af6-78688d6b8dbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Thabelo Mancama.
Date:Sunday, 30 August 2015 00:14:01 UTC+1.

Hello!

Mongo is 3.0.3 and I made that change but the stats are still not reflecting :frowning: I know that things are routing through the API and everything is working as it should be. rebooted tyk and the dash board after making the change too.

not sure what else to try.

any ideas?

Not important right now as we are neck deep in documentation but will need to have handle on usage soonish.

Let me know :slight_smile:

Ta

T

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Sunday, 30 August 2015 08:50:27 UTC+1.

Hi Thabelo,

Can you post both your Tyk.conf file and your tyk_analytics.conf file? It could be that your node is writing data but the dashboard isn’t looking for it in the right place.

Will be easier to see what’s going on then.

Cheers,
Martin


From: Thabelo Mancama [email protected]
Sent: Sunday, August 30, 2015 00:14
Subject: Re: Statistics
To: Tyk Community Support [email protected]

Hello!

Mongo is 3.0.3 and I made that change but the stats are still not reflecting :frowning: I know that things are routing through the API and everything is working as it should be. rebooted tyk and the dash board after making the change too.

not sure what else to try.

any ideas?

Not important right now as we are neck deep in documentation but will need to have handle on usage soonish.

Let me know :slight_smile:

Ta

T

On Saturday, 29 August 2015 07:44:23 UTC+9, Thabelo Mancama wrote:
Hey;

I check up and I am aware that there was an error with stats not showing up on the dash board for 24 hours. I have checked and made sure everything checks out:

tyk.conf

“enable_analytics” : true ,
“analytics_config” : {
“type” : “mongo” ,
“csv_dir” : “/tmp” ,
“mongo_url” : “mongodb://localhost/tyk_analytics” ,
“mongo_db_name” : “tyk_analaytics” ,
“mongo_collection” : “tyl_analytics” ,
“purge_delay” : - 1 ,
“ignored_ips” : []
},

starts up

INFO [ 0000 ] Using / etc / tyk / tyk . conf for configuration
INFO [ 0000 ] Setting up analytics DB connection
INFO [ 0000 ] Using MongoDB cache purge
INFO [ 0000 ] Connecting to redis on : localhost : 6379
WARN [ 0000 ] Cache purge turned off , you are responsible for Redis storage maintenance .
INFO [ 0000 ] Connecting to redis on : localhost : 6379
INFO [ 0000 ] Listening on port : 5000
INFO [ 0000 ] Listening on [::]: 5000
INFO [ 0000 ] Using App Configuration from Mongo DB
INFO [ 0000 ] Connecting to redis on : localhost : 6379
INFO [ 0000 ] Subscription started : tyk . cluster . notifications

Mongo Version

[ nantoka - user@ip - 111 - 222 - 333 - 444 dash ] $ mongo – version
MongoDB shell version : 3.0 . 3

But I am not getting any stats in at all. I am fairly certain I have forgotten to add a true somewhere but I don’t know where.

Any help would be much appreciated.

Ta;

T

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/8b7acc2b-22e0-496c-be04-e65f9aa32f91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Thabelo Mancama.
Date:Sunday, 30 August 2015 10:01:14 UTC+1.

Hi Martin!

thanks for your help.

{
“listen_port”: 5000,
“secret”: “3******************”,
“template_path”: “/etc/tyk/templates”,
“tyk_js_path”: “/etc/tyk/js/tyk.js”,
“use_db_app_configs”: true,
“app_path”: “/etc/tyk/apps”,
“middleware_path”: “/etc/tyk/middleware”,
“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://localhost/tyk_analytics”,
“mongo_db_name”: “tyk_analaytics”,
“mongo_collection”: “tyl_analytics”,

"purge_delay": 10,
"ignored_ips": []

},
“health_check”: {
“enable_health_checks”: true,
“health_check_value_timeouts”: 60
},
“optimisations_use_async_session_write”: true,
“allow_master_keys”: false,
“policies”: {
“policy_source”: “mongo”,
“policy_record_name”: “tyk_policies”
},
“hash_keys”: true,
“suppress_redis_signal_reload”: false
}

analytics config

{
“listen_port”: 3000,
“tyk_api_config”: {
“Host”: “http://localhost”,
“Port”: “5000”,
“Secret”: “352d20ee67be67f6340b4c0605b044b7”

},
"mongo_url": "mongodb://localhost/tyk_analytics",

"page_size": 10,
"admin_secret": "***************",
"redis_port": 6379,
"redis_host": "localhost",
"redis_password": "",
"force_api_defaults": true,
"notify_on_change": true,
"license_owner": "Your Name",
"hash_keys": true

}

That’s them. I am fairly certain it is a silly error on my part.

Thank you for your patience.

Warmest;

Thabelo

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Sunday, 30 August 2015 10:04:20 UTC+1.

There it is - you have a typo in your tyk.conf, I should have spotted it earlier(!):

“mongo_collection” : “tyl_analytics”

Change it to be tyk_analytics :wink:

Cheers,
Martin


From: Thabelo Mancama [email protected]
Sent: Sunday, August 30, 2015 10:01

Subject: Re: Statistics
To: Tyk Community Support [email protected]
Cc: [email protected]

Hi Martin!

thanks for your help.

{
“listen_port” : 5000 ,
“secret” : “3******************” ,
“template_path” : “/etc/tyk/templates” ,
“tyk_js_path” : “/etc/tyk/js/tyk.js” ,
“use_db_app_configs” : true ,
“app_path” : “/etc/tyk/apps” ,
“middleware_path” : “/etc/tyk/middleware” ,
“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://localhost/tyk_analytics” ,
“mongo_db_name” : “tyk_analaytics” ,
“mongo_collection” : “tyl_analytics” ,
“purge_delay” : 10 ,
“ignored_ips” : []
},
“health_check” : {
“enable_health_checks” : true ,
“health_check_value_timeouts” : 60
},
“optimisations_use_async_session_write” : true ,
“allow_master_keys” : false ,
“policies” : {
“policy_source” : “mongo” ,
“policy_record_name” : “tyk_policies”
},
“hash_keys” : true ,
“suppress_redis_signal_reload” : false
}

  • show quoted text -