When I run this search in the Web UI I get the correct results. When it is run in a python script the "count(eval(RequestTime<2.00)) as PlaybackNumSuccessful" returns 0 when it should not. search index=cdvr host=* AND source="/var/log/nginx/access.log" AND sourcetype="gemini-ecdn-nginx-access"
| rex field=_raw ".*?\t.*?\t.*?\t.*?\t(?<Method>\w+)\s/(?<URI>.+?)\sHTTP.+?\t.*?\t(?<Status>.+?)\t.*?\t.*?\t.*?\t.*?\s.*?\t.*?\t(?<host_header>.+?)\t"
| rex field=URI "(?<RecordingID>.*)\.(?<resource>.*)?\?.*"
| dedup RecordingID
| search Method=GET resource="m3u8"
| stats
count(eval(RequestTime<2.00)) as PlaybackNumSuccessful
count(eval(RecordingID)) as PlaybackNumTotal
| eval PlaybackNumFailed=(PlaybackNumTotal-PlaybackNumSuccessful)
| eval SuccessPer = (PlaybackNumSuccessful/PlaybackNumTotal)*100
| eval PlaybackLatencyLessThan2SecSuccessRate=round(SuccessPer, 3)."%"
| fields PlaybackNumTotal PlaybackNumFailed PlaybackLatencyLessThan2SecSuccessRate Any ideas why?
... View more