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

Object stats are not working? #115

Open
siccovansas opened this issue Aug 3, 2015 · 3 comments
Open

Object stats are not working? #115

siccovansas opened this issue Aug 3, 2015 · 3 comments

Comments

@siccovansas
Copy link
Member

E.g., see http://api.opencultuurdata.nl/v0/openbeelden/4558763df1b233a57f0176839dc572e9e8726a02/stats
Is this a bug or is it not yet fully implemented (if so, what needs to be done to make it work?).

@justinvw
Copy link
Contributor

justinvw commented Aug 4, 2015

The stats functionality is implemented: for most request to the REST api a log message is generated which is indexed into Elasticsearch by a separate process. To get an idea of how this works, have a look at the code that generates the log message (e.g. https://github.com/openstate/open-cultuur-data/blob/master/ocd_frontend/rest/views.py#L308-L328) and the Celery task that is responsible for indexing the message (found here: https://github.com/openstate/open-cultuur-data/blob/master/ocd_frontend/rest/tasks.py).

Maybe the Celery worker responsible for indexing the log messages is not running?

@siccovansas
Copy link
Member Author

Thanks for the info!
The Celery workers are up and running. Also, the ocd_usage_logs index is empty so nothing was ever indexed. Any other ideas?

@justinvw
Copy link
Contributor

Are you sure the ocd application is pointing to the correct Redis instance and Celery queue? On what server are you testing this? I just tried it in a clean Ubuntu 14.04 install (using Vagrant) and logging seams to work fine there (index gets created, log documents get added when the API is hit).

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

2 participants