Splunk에서 5 개의 다른 검색을 수행하고 있으며 해당 검색 쿼리에서 몇 개의 결과를 얻었는지 확인합니다.
여기에서이 스레드를 살펴 보았습니다.
https://answers.splunk.com/answers/757081/pie-chart-with-count-from-different-search-criteri.html
그러나 그것은 나를 위해 잘 작동하지 않습니다. 내가 원하는 것이 100 % 확실하지 않습니다.
내 검색어는 모두 다음과 같습니다.
index = A variable = "foo"message = "생성됨 *"| 통계 카운트
index = A variable = "foo"message = "삭제 *"| 통계 카운트
이상적으로는 생성, 삭제 등의 키워드에 각 쿼리를 할당 한 다음 개수를 기반으로 원형 차트를 만들고 싶습니다.
다음으로 충분합니다.
index=A variable="foo" message="Created*" OR message="Deleted*" OR message="<repeat this for any other message types you want>" | stats count by message
차트를 작성하려는 이벤트의 몇 가지 예를 더 제공 할 수있는 경우 다른 방법을 사용할 수 있습니다.
이 버전은 메시지의 핵심 부분 (생성됨, 삭제됨 등 ...)을 호출 된 필드로 추출한 mtype
다음 stats
해당 필드에서 수행 할 수 있습니다 .
index=A variable="foo" message="Created*" OR message="Deleted*" OR message="<repeat this for any other message types you want>" | rex field=message "(?<mtype>Created|Deleteted|...)" | stats count by mtype
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다