2023년 6월 26일 월요일

Splunk의 makeresults

테스트용으로 간단한 테이블 구조 만들 때 유용한 makeresults.


2023년 6월 23일 금요일

Splunk DB Connect - 3rd

다음은 로그스태시 jdbc 인풋 연동 결과. unhex 함수를 이용한 쿼리문이 정상 동작함을 알 수 있다.
[2023-06-23T13:19:13,487][INFO ][logstash.agent           ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]} [2023-06-23T13:20:00,593][INFO ][logstash.inputs.jdbc     ][main][02f2fe91bcdc2cef22f19291d544a8551a0d1ce4c1b2aabf7a101153deed4fe1] (0.002507s) select a.timestamp, a.cid, b.sig_name, unhex(c.data_payload) from event a, signature b, data c where a.signature = b.sig_id and a.sid = c.sid and a.cid = c.cid and a.cid > 0

2023년 6월 22일 목요일

Splunk DB Connect - 2nd

로그스태시는 jdbc 인풋 플러그인을 이용해서 RDB 연동을 지원한다. 이때 schedule 옵션은 연동 쿼리문의 실행 간격을 조정하는 역할. 

schedule

  • Value type is string
  • There is no default value for this setting.

Schedule of when to periodically run statement, in Cron format for example: "* * * * *" (execute query every minute, on the minute)

There is no schedule by default. If no schedule is given, then the statement is run exactly once.

2023년 6월 15일 목요일

VIM 꼼수의 발견 - 10th

후방탐색 기능은 다른 정규표현식과 달리 왼쪽과 오른쪽을 왕복하는 검사 방식 때문에 자원 소모가 많다.

데이터 분석이 쉬워지는 정규표현식(195p)

2023년 6월 8일 목요일

apache log to iis format

아파치든 IIS든 요청과 응답이 조합된 웹로그 성격은 똑같다. 필드 구성만 다를뿐.

apache log

2023년 6월 6일 화요일

VIM 백업과 히스토리 남기기

윈도우용 gvim은 파일 편집 시 원본 파일의 백업과 undo 및 redo 작업을 가능하게 해주는 히스토리 파일을 남긴다. log~는 백업, log.un~는 히스토리 파일.


2023년 6월 3일 토요일

Common vs Combined

아파치 로그는 Common과
147.229.9.14 - - [28/May/2022:16:52:07 +0000] "GET /images/jordan-80.png HTTP/1.1" 304 45

Combined 포맷의 로그로 나뉜다.
147.229.9.14 - - [28/May/2022:16:52:07 +0000] "GET /images/jordan-80.png HTTP/1.1" 304 45 "http://www.semicomplete.com/articles/dynamic-dns-with-dhcp/" "Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0"

크리에이티브 커먼즈 라이선스