대시보드 차트에서 IP 조건 검색을 하고 싶다.
IP 검색 조건을 추가한 드릴다운 작업 생성.
포트 정보 조건 검색도 하고 싶다면?
준비된 검색 구문은 IP 정보만 사용 가능하기 때문에 검색 실패.
클릭값 조건에 따라 검색 구문을 바꿔야 한다. 다음은 대시보드 원본 소스.
<form version="1.1" theme="light"> <label>winfirewall2</label> <fieldset submitButton="false"> <input type="time" token="field1"> <label></label> <default> <earliest>-24h@h</earliest> <latest>now</latest> </default> </input> </fieldset> <row> <panel> <table> <title>발생현황</title> <search> <query>index=winfirewall| stats count by protocol, dst_ip, dst_port, action, path</query> <earliest>$field1.earliest$</earliest> <latest>$field1.latest$</latest> </search> <option name="drilldown">cell</option> <drilldown> <link target="_blank">search?q=index%3Dwinfirewall%20dst_ip%3D$click.value2$%0A%7C%20stats%20count%20by%20protocol%2C%20dst_ip%2C%20dst_port%2C%20action%2C%20path&earliest=$field1.earliest$&latest=$field1.latest$</link> </drilldown> </table> </panel> </row></form>
다음은 드릴다운 작업 조건문을 적용한 결과.
<form version="1.1" theme="light"> <label>winfirewall2</label> <fieldset submitButton="false"> <input type="time" token="field1"> <label></label> <default> <earliest>-24h@h</earliest> <latest>now</latest> </default> </input> </fieldset> <row> <panel> <table> <title>발생현황</title> <search> <query>index=winfirewall| stats count by protocol, dst_ip, dst_port, action, path</query> <earliest>$field1.earliest$</earliest> <latest>$field1.latest$</latest> </search> <option name="drilldown">cell</option> <drilldown> <condition field="dst_ip"> <link target="_blank">search?q=index%3Dwinfirewall%20dst_ip%3D$click.value2$%0A%7C%20stats%20count%20by%20protocol%2C%20dst_ip%2C%20dst_port%2C%20action%2C%20path&earliest=$field1.earliest$&latest=$field1.latest$</link> </condition> <condition field="dst_port"> <link target="_blank">search?q=index%3Dwinfirewall%20dst_port%3D$click.value2$%0A%7C%20stats%20count%20by%20protocol%2C%20dst_ip%2C%20dst_port%2C%20action%2C%20path&earliest=$field1.earliest$&latest=$field1.latest$</link> </condition> </drilldown> </table> </panel> </row></form>
이제 원하는 검색 조건을 선택할 수 있다.
관련 글
댓글 없음:
댓글 쓰기