22description : Pipeline for PFsense 
33processors :
44  - set :
5+       tag : set_ecs_version_f5923549 
56      field : ecs.version 
67      value : ' 8.17.0' 
78  - set :
9+       tag : set_observer_vendor_ad9d35cc 
810      field : observer.vendor 
911      value : netgate 
1012  - set :
13+       tag : set_observer_type_5dddf3ba 
1114      field : observer.type 
1215      value : firewall 
1316  - rename :
17+       tag : rename_message_to_event_original_56a77271 
1418      field : message 
1519      target_field : event.original 
1620      ignore_missing : true 
1721      if : ctx.event?.original == null 
1822  - set :
23+       tag : set_event_kind_de80643c 
1924      field : event.kind 
2025      value : event 
2126  - set :
27+       tag : set_event_timezone_4ca44cac 
2228      field : event.timezone 
2329      value : " {{{_tmp.tz_offset}}}" 
2430      if : ctx._tmp?.tz_offset != null && ctx._tmp?.tz_offset != 'local' 
2531  - grok :
32+       tag : grok_event_original_27d9c8c7 
2633      description : Parse syslog header 
2734      field : event.original 
2835      patterns :
@@ -41,12 +48,14 @@ processors:
4148        BASEPATH: '[[[:alnum:]]_%!$@:.,+~-]+' 
4249        META: '\[[^\]]*\]' 
4350  - date: 
51+       tag: date__tmp_timestamp8601_to_timestamp_6ac9d3ce 
4452      if: ctx._tmp.timestamp8601 != null 
4553      field: _tmp.timestamp8601 
4654      target_field: '@timestamp' 
4755      formats: 
4856        - ISO8601 
4957  - date: 
58+       tag: date__tmp_timestamp_to_timestamp_f21e536e 
5059      if: ctx.event?.timezone != null && ctx._tmp?.timestamp != null 
5160      field: _tmp.timestamp 
5261      target_field: '@timestamp' 
@@ -56,74 +65,93 @@ processors:
5665        - MMM dd HH:mm:ss 
5766      timezone: '{{{ event.timezone }}}' 
5867  - grok: 
68+       tag: grok_process_name_cef3d489 
5969      description: Set Event Provider 
6070      field: process.name 
6171      patterns: 
6272        - '^%{HYPHENATED_WORDS:event.provider}' 
6373      pattern_definitions: 
6474        HYPHENATED_WORDS: '\b[A-Za-z0-9_]+(-[A-Za-z_]+)*\b' 
6575  - pipeline: 
76+       tag: pipeline_e16851a7 
6677      name: '{{ IngestPipeline "firewall" }}' 
6778      if: ctx.event.provider == 'filterlog' 
6879  - pipeline: 
80+       tag: pipeline_828590b5 
6981      name: '{{ IngestPipeline "openvpn" }}' 
7082      if: ctx.event.provider == 'openvpn' 
7183  - pipeline: 
84+       tag: pipeline_9d37039c 
7285      name: '{{ IngestPipeline "ipsec" }}' 
7386      if: ctx.event.provider == 'charon' 
7487  - pipeline: 
88+       tag: pipeline_ad56bbca 
7589      name: '{{ IngestPipeline "dhcp" }}' 
7690      if: '["dhcpd", "dhclient", "dhcp6c"].contains(ctx.event.provider)' 
7791  - pipeline: 
92+       tag: pipeline_dd85553d 
7893      name: '{{ IngestPipeline "unbound" }}' 
7994      if: ctx.event.provider == 'unbound' 
8095  - pipeline: 
96+       tag: pipeline_720ed255 
8197      name: '{{ IngestPipeline "haproxy" }}' 
8298      if: ctx.event.provider == 'haproxy' 
8399  - pipeline: 
100+       tag: pipeline_456beba5 
84101      name: '{{ IngestPipeline "php-fpm" }}' 
85102      if: ctx.event.provider == 'php-fpm' 
86103  - pipeline: 
104+       tag: pipeline_a0d89375 
87105      name: '{{ IngestPipeline "squid" }}' 
88106      if: ctx.event.provider == 'squid' 
89107  - pipeline: 
108+       tag: pipeline_c2f1ed55 
90109      name: '{{ IngestPipeline "snort" }}' 
91110      if: ctx.event.provider == 'snort' 
92111  - drop: 
112+       tag: drop_9d7c46f8 
93113      if: '!["filterlog", "openvpn", "charon", "dhcpd", "dhclient", "dhcp6c", "unbound", "haproxy", "php-fpm", "squid", "snort"].contains(ctx.event?.provider)' 
94114  - append: 
115+       tag: append_event_category_4780a983 
95116      field: event.category 
96117      value: network 
97118      if: "ctx.network != null" 
98119  - convert: 
120+       tag: convert_source_address_to_source_ip_f5632a20 
99121      field: source.address 
100122      target_field: source.ip 
101123      type: ip 
102124      ignore_failure: true 
103125      ignore_missing: true 
104126  - convert: 
127+       tag: convert_destination_address_to_destination_ip_f1388f0c 
105128      field: destination.address 
106129      target_field: destination.ip 
107130      type: ip 
108131      ignore_failure: true 
109132      ignore_missing: true 
110133  - set: 
134+       tag: set_network_type_1f1d940a 
111135      field: network.type 
112136      value: ipv6 
113137      if: 'ctx.source?.ip != null && ctx.source.ip.contains(":")' 
114138  - set: 
139+       tag: set_network_type_69deca38 
115140      field: network.type 
116141      value: ipv4 
117142      if: 'ctx.source?.ip != null && ctx.source.ip.contains(".")' 
118143  - geoip: 
144+       tag: geoip_source_ip_to_source_geo_da2e41b2 
119145      field: source.ip 
120146      target_field: source.geo 
121147      ignore_missing: true 
122148  - geoip: 
149+       tag: geoip_destination_ip_to_destination_geo_ab5e2968 
123150      field: destination.ip 
124151      target_field: destination.geo 
125152      ignore_missing: true 
126153  - geoip: 
154+       tag: geoip_source_ip_to_source_as_28d69883 
127155      ignore_missing: true 
128156      database_file: GeoLite2-ASN.mmdb 
129157      field: source.ip 
@@ -132,6 +160,7 @@ processors:
132160        - asn 
133161        - organization_name 
134162  - geoip: 
163+       tag: geoip_destination_ip_to_destination_as_8a007787 
135164      database_file: GeoLite2-ASN.mmdb 
136165      field: destination.ip 
137166      target_field: destination.as 
@@ -140,66 +169,81 @@ processors:
140169        - organization_name 
141170      ignore_missing: true 
142171  - rename: 
172+       tag: rename_source_as_asn_to_source_as_number_a917047d 
143173      field: source.as.asn 
144174      target_field: source.as.number 
145175      ignore_missing: true 
146176  - rename: 
177+       tag: rename_source_as_organization_name_to_source_as_organization_name_f1362d0b 
147178      field: source.as.organization_name 
148179      target_field: source.as.organization.name 
149180      ignore_missing: true 
150181  - rename: 
182+       tag: rename_destination_as_asn_to_destination_as_number_3b459fcd 
151183      field: destination.as.asn 
152184      target_field: destination.as.number 
153185      ignore_missing: true 
154186  - rename: 
187+       tag: rename_destination_as_organization_name_to_destination_as_organization_name_814bd459 
155188      field: destination.as.organization_name 
156189      target_field: destination.as.organization.name 
157190      ignore_missing: true 
158191  - community_id: 
192+       tag: community_id_d2308e7a 
159193      target_field: network.community_id 
160194      ignore_failure: true 
161195  - grok: 
196+       tag: grok_observer_ingress_interface_name_968018d3 
162197      field: observer.ingress.interface.name 
163198      patterns: 
164199        - "%{DATA}.%{NONNEGINT:observer.ingress.vlan.id}" 
165200      ignore_missing: true 
166201      ignore_failure: true 
167202  - set: 
203+       tag: set_network_vlan_id_efd4d96a 
168204      field: network.vlan.id 
169205      copy_from: observer.ingress.vlan.id 
170206      ignore_empty_value: true 
171207  - append: 
208+       tag: append_related_ip_c1a6356b 
172209      field: related.ip 
173210      value: "{{{destination.ip}}}" 
174211      allow_duplicates: false 
175212      if: ctx.destination?.ip != null 
176213  - append: 
214+       tag: append_related_ip_8121c591 
177215      field: related.ip 
178216      value: "{{{source.ip}}}" 
179217      allow_duplicates: false 
180218      if: ctx.source?.ip != null 
181219  - append: 
220+       tag: append_related_ip_53b62ed8 
182221      field: related.ip 
183222      value: "{{{source.nat.ip}}}" 
184223      allow_duplicates: false 
185224      if: ctx.source?.nat?.ip != null 
186225  - append: 
226+       tag: append_related_hosts_6f162628 
187227      field: related.hosts 
188228      value: "{{{destination.domain}}}" 
189229      if: "ctx.destination?.domain != null" 
190230  - append: 
231+       tag: append_related_user_c036eec2 
191232      field: related.user 
192233      value: "{{{user.name}}}" 
193234      if: "ctx.user?.name != null" 
194235  - set: 
236+       tag: set_network_direction_cb1e3125 
195237      field: network.direction 
196238      value: "{{{network.direction}}}bound" 
197239      if: ctx.network?.direction != null && ctx.network?.direction =~ /^(in|out)$/ 
198240  - remove: 
241+       tag: remove_a82e20f2 
199242      field: 
200243        - _tmp 
201244      ignore_failure: true 
202245  - script: 
246+       tag: script_a7f2c062 
203247      lang: painless 
204248      description: This script processor iterates over the whole document to remove fields with null values. 
205249      source: | 
@@ -233,4 +277,8 @@ on_failure:
233277      value: pipeline_error 
234278  - append: 
235279      field: error.message 
236-       value: '{{{ _ingest.on_failure_message }}}' 
280+       value: >- 
281+         Processor '{{{ _ingest.on_failure_processor_type }}}' 
282+         {{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}' 
283+         {{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}' 
284+         failed with message '{{{ _ingest.on_failure_message }}}' 
0 commit comments