지난 5 분 동안의 이벤트 수의 증가/감소 비율을 지난 5 분 동안 계산해야합니다. 그래서 나는 다음과 같은 것을 필요로한다고 생각합니다 :Splunk : 이벤트 카운트의 변화율
(stats count <query A> - stats count <query B>)/stats count <query B>
작동하는 쿼리를 생성 할 수 없었습니다 - Splunk에서이를 수행 할 수 있습니까? 여기
지난 5 분 동안의 이벤트 수의 증가/감소 비율을 지난 5 분 동안 계산해야합니다. 그래서 나는 다음과 같은 것을 필요로한다고 생각합니다 :Splunk : 이벤트 카운트의 변화율
(stats count <query A> - stats count <query B>)/stats count <query B>
작동하는 쿼리를 생성 할 수 없었습니다 - Splunk에서이를 수행 할 수 있습니까? 여기
답변 : http://answers.splunk.com/answers/106765/percentage-change-in-event-counts
[email protected] l[email protected] your_search |eval Report="Second"| append [search [email protected] [email protected] your_search | eval _time = _time + 300 | eval Report="First"] | stats sum(eval(if(match(Report,"First"),1,0))) as First sum(eval(if(match(Report,"Second"),1,0))) as Second count as Total | eval DiffPercent = (First - Second)/First * 100