> ## Documentation Index
> Fetch the complete documentation index at: https://parser.xdr.ooo/llms.txt
> Use this file to discover all available pages before exploring further.

# 하나의 보안 장비에서 여러 로그 유형을 처리

> Traffic·Threat·User 등 유형별 원본을 하나의 파서 프로젝트에서 분석하는 방법.

# 한 장비의 여러 로그 타입을 처리하기

**상황:** FortiGate에서 Traffic, Web Filter, IPS 로그가 함께 발생합니다. 모두 같은 필드 구조를 갖는 것은 아닙니다.

## 실습 로그

* [FortiGate Traffic 로그 2개](https://app.parser.xdr.ooo/training/parser-studio-real-scenarios-20261021/practice/04-fortigate-traffic.log)
* [FortiGate Threat 로그 2개](https://app.parser.xdr.ooo/training/parser-studio-real-scenarios-20261021/practice/04-fortigate-threat.log)
* [다중 유형 교육 영상](https://parser.xdr.ooo/ko/videos/multiple-types.md)

### 영상과 동일한 로그 원본 직접 복사

각 코드 블록의 **복사 아이콘**으로 모든 내용을 복사한 다음 Parser Studio에 붙여 넣으세요. 각 줄은 하나의 원본 이벤트이며 영상과 같은 결과를 재현하기 위해 수정하지 마세요.

[전체 화면 영상 및 다운로드 자료](https://parser.xdr.ooo/ko/videos/multiple-types.md).

#### Traffic 그룹 — FortiGate Traffic 로그 2건

**원본 크기:** 1745 bytes · **파일명:** `04-fortigate-traffic.log` · 영상과 같은 이벤트 줄 수를 유지합니다.

```text theme={null}
date=2019-05-13 time=16:29:50 logid="0000000013" type="traffic" subtype="forward" level="notice" vd="vdom1" eventtime=1557790190452146185 srcip=10.1.100.11 srcport=44258 srcintf="port12" srcintfrole="undefined" dstip=185.244.31.158 dstport=80 dstintf="port11" dstintfrole="undefined" srcuuid="ae28f494-5735-51e9-f247-d1d2ce663f4b" dstuuid="ae28f494-5735-51e9-f247-d1d2ce663f4b" poluuid="ccb269e0-5735-51e9-a218-a397dd08b7eb" sessionid=381780 proto=6 action="close" policyid=1 policytype="policy" service="HTTP" dstcountry="Germany" srccountry="Reserved" trandisp="snat" transip=172.16.200.2 transport=44258 duration=5 sentbyte=736 rcvdbyte=3138 sentpkt=14 rcvdpkt=5 appcat="unscanned" utmaction="block" countweb=1 crscore=30 craction=4194304 osname="Ubuntu" mastersrcmac="a2:e9:00:ec:40:01" srcmac="a2:e9:00:ec:40:01" srcserver=0 utmref=65497-796
date=2019-05-10 time=11:37:47 logid="0000000013" type="traffic" subtype="forward" level="notice" vd="vdom1" eventtime=1557513467369913239 srcip=10.1.100.11 srcport=58012 srcintf="port12" srcintfrole="undefined" dstip=23.59.154.35 dstport=80 dstintf="port11" dstintfrole="undefined" srcuuid="ae28f494-5735-51e9-f247-d1d2ce663f4b" dstuuid="ae28f494-5735-51e9-f247-d1d2ce663f4b" poluuid="ccb269e0-5735-51e9-a218-a397dd08b7eb" sessionid=105048 proto=6 action="close" policyid=1 policytype="policy" service="HTTP" dstcountry="Canada" srccountry="Reserved" trandisp="snat" transip=172.16.200.2 transport=58012 appid=34050 app="HTTP.BROWSER_Firefox" appcat="Web.Client" apprisk="elevated" applist="g-default" duration=116 sentbyte=1188 rcvdbyte=1224 sentpkt=17 rcvdpkt=16 utmaction="allow" countapp=1 osname="Ubuntu" mastersrcmac="a2:e9:00:ec:40:01" srcmac="a2:e9:00:ec:40:01" srcserver=0 utmref=65500-742
```

#### Threat 그룹 — FortiGate Web Filter 및 IPS 로그

**원본 크기:** 1373 bytes · **파일명:** `04-fortigate-threat.log` · 영상과 같은 이벤트 줄 수를 유지합니다.

```text theme={null}
date=2019-05-13 time=16:29:45 logid="0316013056" type="utm" subtype="webfilter" eventtype="ftgd_blk" level="warning" vd="vdom1" eventtime=1557790184975119738 policyid=1 sessionid=381780 srcip=10.1.100.11 srcport=44258 srcintf="port12" srcintfrole="undefined" dstip=185.244.31.158 dstport=80 dstintf="port11" dstintfrole="undefined" proto=6 service="HTTP" hostname="morrishittu.ddns.net" profile="test-webfilter" action="blocked" reqtype="direct" url="/" sentbyte=84 rcvdbyte=0 direction="outgoing" msg="URL belongs to a denied category in policy" method="domain" cat=26 catdesc="Malicious Websites" crscore=30 craction=4194304 crlevel="high"
date=2019-05-15 time=17:56:41 logid="0419016384" type="utm" subtype="ips" eventtype="signature" level="alert" vd="root" eventtime=1557968201 severity="critical" srcip=10.1.100.22 srccountry="Reserved" dstip=172.16.200.55 srcintf="port10" srcintfrole="lan" dstintf="port9" dstintfrole="wan" sessionid=4017 action="dropped" proto=6 service="HTTP" policyid=1 attack="Adobe.Flash.newfunction.Handling.Code.Execution" srcport=46810 dstport=80 hostname="172.16.200.55" url="/ips/sig1.pdf" direction="incoming" attackid=23305 profile="block-critical-ips" ref="http://www.fortinet.com/ids/VID23305" incidentserialno=582633933 msg="applications3: Adobe.Flash.newfunction.Handling.Code.Execution," crscore=50 craction=4096 crlevel="critical"
```

## 따라 하기

1. **Auto Parser**에서 Manufacturer를 Fortinet, Product를 FortiGate로 입력합니다.
2. **Add Another Log Type**을 눌러 두 개의 샘플 그룹을 만듭니다.
3. 첫 번째 유형 이름을 **Traffic**, 두 번째를 **Threat**로 지정하고 각각 해당 로그 2개를 입력합니다.
4. **Analyze Logs**를 실행해 **4 of 4 log events parsed completely**와 그룹별 이벤트 2건을 확인합니다.
5. **Review Fields**에서 traffic과 utm 등 실제 원본의 type/subtype 값을 살펴보고 서로 다른 필드가 유지되는지 검토합니다.
6. **Optional: one parser for several event types**의 분기 기준을 검토합니다. 이름만으로 이벤트 유형을 추정하면 안 됩니다.
7. Stellar Cyber 7.0으로 필드를 매핑하고 전체 4건을 **Run Final Test & Create Files**에서 다시 검사합니다.

## 예상 결과

제공된 공개 원본 샘플 4건은 모두 구조적으로 파싱되고, 이 샘플에 대한 통합 파서 패키지가 생성됩니다. 해당 traffic과 webfilter 예시에는 동일한 sessionid **381780**이 있습니다.

## 복구 방법

실제 장비의 이벤트 유형이 더 다양하거나 명확한 분기 필드가 없으면 억지로 하나의 조건부 파서라고 주장하지 마세요. 인식되지 않는 그룹을 따로 검토하고 추가 원본을 확보해야 합니다.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.