본문 바로가기
기타

스플렁크로 리텐션 구하기

by 앗사비 2024. 2. 14.
728x90
| multisearch 
    [ search index="log_pd_com" uri_path=/pd/install earliest=-22d@d latest=-21d@d 
    | eval type="install" ] 
    [ search index="log_pd_com" uri_path=/pd/playing earliest=-21d@d latest=-14d@d 
    | eval type="section_1" ] 
    [ search index="log_pd_com" uri_path=/pd/playing earliest=-14d@d latest=-7d@d 
    | eval type="section_2" ] 
    [ search index="log_pd_com" uri_path=/pd/playing earliest=-7d@d latest=-0d@d 
    | eval type="section_3" ] 
| chart dc(uuid) by uuid, type 
| where install>0 
| stats count as total, sum(section_1) as section_1, sum(section_2) as section_2, sum(section_3) as section_3
| eval week_1 = section_1 / total * 100 
| eval week_2 = section_2 / total * 100 
| eval week_3 = section_3 / total * 100 
| table week_1 week_2 week_3
| transpose column_name=weeks 
| rename "row 1" as ratio
728x90