vlead / analytics-dashboard

Other
1 stars 2 forks source link

Dynamically pushing the feedback data into base4 test container(16324). #8

Open mrudhvika940 opened 7 years ago

mrudhvika940 commented 7 years ago

Currently We have pushed some data in 16324 container and using the same for testing. this data is static and it needs to be dynamically updated by pulling the current data from the feedback service database. Cron job needs to be setup in the 16324 container so that current data is updated after every 12/24 hours.

ksripathi commented 7 years ago

@mrudhvika940 Please update issue with sample record to be pushed into elastic search vm also mention the API of elastic search where data to be pushed in

mrudhvika940 commented 7 years ago

@ksripathi API of elastic search is [http://feedback-analytics.vlabs.ac.in/vlabs/feedback/_search?size=100000](Feedback Analytics) Sample record { "_index": "vlabs", "_type": "feedback", "_id": "uMvyMQiDQjKm3vLa35rXHA", "_score": 1, "_source": { "user_id": "Sonawane Mayur Sanjay", "responses": [], "exp_name": "None", "lab_name": "None", "version": "virtual-labs-feedback-v1.0", "gateway_ip": "10.100.1.7", "date": "21-03-2016", "id": "268" } }, { "_index": "vlabs", "_type": "feedback", "_id": "GOYMhU2YRuu9nublRA6pzg", "_score": 1, "_source": { "user_id": "amol popat pokharkar", "responses": [ { "question": { "name": "how_useful_are_labs", "question_type": "textarea", "id": "11" }, "id": "364", "answers": [ { "name": "accurate reading & easy to undstand", "id": "356" } ] } ], "exp_name": "None", "lab_name": "None", "version": "virtual-labs-feedback-v1.0", "gateway_ip": "10.100.1.7", "date": "21-03-2016", "id": "271" } }, { "_index": "vlabs", "_type": "feedback", "_id": "Uv8zt3hqQ1KZe9KMZNFVsw", "_score": 1, "_source": { "user_id": "Jaybhaye Archana Shahadev", "responses": [ { "question": { "name": "feedback_about_experiment", "question_type": "textarea", "id": "9" }, "id": "59", "answers": [ { "name": "None", "id": "30" } ] }, { "question": { "name": "feedback_about_lab", "question_type": "textarea", "id": "10" }, "id": "60", "answers": [ { "name": "None", "id": "30" } ] }, { "question": { "name": "how_useful_are_labs", "question_type": "textarea", "id": "11" }, "id": "365", "answers": [ { "name": "virtual lab is very useful for engg. student because it increases IQ of students.", "id": "358" } ] }, { "question": { "name": "suggestions_about_experiment", "question_type": "textarea", "id": "12" }, "id": "62", "answers": [ { "name": "None", "id": "30" } ] }, { "question": { "name": "suggestions_about_lab", "question_type": "textarea", "id": "13" }, "id": "63", "answers": [ { "name": "None", "id": "30" } ] }, { "question": { "name": "suggestions_in_general", "question_type": "textarea", "id": "14" }, "id": "236", "answers": [ { "name": "no suggestion", "id": "213" } ] } ], "exp_name": "None", "lab_name": "None", "version": "virtual-labs-feedback-v1.0", "gateway_ip": "10.100.1.7", "date": "21-03-2016", "id": "275" } }

ksripathi commented 7 years ago

Refer link https://github.com/vlead/feedback-portal/blob/2096f1ac4f5fea452185561c6daa7f3894ac67f8/src/feedback_dump_to_elastic_db.org#dump-regular-feedback-data-to-elastic-search-database for script that will fetch feedback records and pushes into elastic search

ksripathi commented 7 years ago

And also used command "echo '00 00 * root python /var/www/feedback_elastic_search.py' >> /etc/crontab" to set the cronjob for every 24 hours