神策数据上报操作
Posted 程序媛2019
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了神策数据上报操作相关的知识,希望对你有一定的参考价值。
神策数据上报要打开两个命令行窗口,一个执行控制台程序,一个查看文件日志。
执行控制台程序操作如下:
先开启docker,开启容器,进入容器,打开nginx和php查看开启状态,之后
再执行如下操作
[email protected]:/var/www/work/console# ./yii shirley/test(这里填测试的文件名)
array(8) {
["$app_version"]=>
string(7) "3.3.5.1"
["$model"]=>
string(10) "vivo X710L"
["$os"]=>
string(7) "android"
["$device_id"]=>
string(15) "864855024939201"
["$time"]=>
int(1526028370146)
["$ip"]=>
string(14) "183.14.135.160"
["package_name"]=>
string(12) "cn.qlwb.qlwb"
["channel"]=>
string(8) "qlwb_czk"
}
另一个窗口的操作如下:
进入容器之后显示日志文件测试结果
C:\Users\Administrator>docker exec -it backend0512 /bin/bash(进入这个容器)
[email protected]:/#
[email protected]:/# ls
bin data etc lib media opt root sbin sys usr
boot dev home lib64 mnt proc run srv tmp var
[email protected]:/# cd /data/sa
[email protected]:/data/sa# ls
service.log.2018-05-11
[email protected]:/data/sa# tail -f service.log.2018-05-11
{"type":"track","properties":{"$lib":"php","$lib_version":"1.7.2","$app_version":"3.3.5.1","$model":"vivo X710L","$os":"android","$device_id":"864855024939201","$ip":"183.14.135.160","user_uid_v2":"900000","user_level_v3":35,"user_age":23,"user_sex_v2":"0","room_id":"110003","$is_login_id":true},"time":1526028092089,"distinct_id":"900000","lib":{"$lib":"php","$lib_version":"1.7.2","$lib_method":"code","$lib_detail":"common\\dao\\sensorsanaly\\SensorsAnalyticsDAO##track##\/var\/www\/work\/console\/common\/dao\/sensorsanaly\/SensorsAnalyticsDAO.php##53"},"project":"testqinglv","event":"OpenVoiceRoom"}
{"type":"track","properties":{"$lib":"php","$lib_version":"1.7.2","$app_version":"3.3.5.1","$model":"vivo X710L","$os":"android","$device_id":"864855024939201","$ip":"183.14.135.160","user_uid_v2":"900000","user_level_v3":35,"user_age":23,"user_sex_v2":"0","room_id":"110003","$is_login_id":true},"time":1526028160202,"distinct_id":"900000","lib":{"$lib":"php","$lib_version":"1.7.2","$lib_method":"code","$lib_detail":"common\\dao\\sensorsanaly\\SensorsAnalyticsDAO##track##\/var\/www\/work\/console\/common\/dao\/sensorsanaly\/SensorsAnalyticsDAO.php##53"},"project":"testqinglv","event":"OpenVoiceRoom"}
{"type":"track","properties":{"$lib":"php","$lib_version":"1.7.2","$app_version":"3.3.5.1","$model":"vivo X710L","$os":"android","$device_id":"864855024939201","$ip":"183.14.135.160","user_uid_v2":"900000","user_level_v3":35,"user_age":23,"user_sex_v2":"0","room_id":"110003","$is_login_id":true},"time":1526028175058,"distinct_id":"900000","lib":{"$lib":"php","$lib_version":"1.7.2","$lib_method":"code","$lib_detail":"common\\dao\\sensorsanaly\\SensorsAnalyticsDAO##track##\/var\/www\/work\/console\/common\/dao\/sensorsanaly\/SensorsAnalyticsDAO.php##53"},"project":"testqinglv","event":"OpenVoiceRoom"}
以上是关于神策数据上报操作的主要内容,如果未能解决你的问题,请参考以下文章
案例研究丨神策数据在多项目多网络场景下使用JumpServer堡垒机