22description : Pipeline for Cisco Secure Email Gateway logs.
33processors :
44 - set :
5+ tag : set_ecs_version_f5923549
56 field : ecs.version
67 value : ' 8.17.0'
78 - set :
9+ tag : set__tmp_filepath_bc60fe22
810 field : _tmp.filepath
911 value : ' {{{log.file.path}}}'
1012 if : ctx.log?.file?.path != null
1113 - grok :
14+ tag : grok__tmp_filepath_3fc3092e
1215 field : _tmp.filepath
1316 if : ctx.log?.file?.path != null
1417 ignore_failure : true
1518 patterns :
1619 - ' ^%{DATA}[\\/]%{WORD:cisco_secure_email_gateway.log.category.name}(?:\.%{HOSTNAME:cisco_secure_email_gateway.log.host})?\.@%{GREEDYDATA}\.s$'
1720 - rename :
21+ tag : rename_message_to_event_original_56a77271
1822 field : message
1923 target_field : event.original
2024 ignore_missing : true
2125 if : ctx.event?.original == null
2226 - grok :
27+ tag : grok_event_original_0ef2f0a7
2328 field : event.original
2429 patterns :
2530 - ' ^(?:<%{NUMBER:log.syslog.priority:long}>)?%{SYSLOGTIMESTAMP:_tmp.timestamp} (?:%{HOSTNAME:cisco_secure_email_gateway.log.host} )?%{NOTSPACE:cisco_secure_email_gateway.log.category.name}: %{WORD:log.level}: %{GREEDYDATA:cisco_secure_email_gateway.log.message}$'
2631 - '^(?:<%{NUMBER:log.syslog.priority:long}>)?%{SYSLOGTIMESTAMP:_tmp.timestamp} (?:%{HOSTNAME:cisco_secure_email_gateway.log.host} )?%{NOTSPACE:cisco_secure_email_gateway.log.category.name}: %{GREEDYDATA:cisco_secure_email_gateway.log.message}$'
2732 - '^%{DATA:_tmp.timestamp} %{WORD:log.level}: %{GREEDYDATA:cisco_secure_email_gateway.log.message}$'
2833 - '^%{GREEDYDATA:cisco_secure_email_gateway.log.message}$'
2934 - trim:
35+ tag: trim_cisco_secure_email_gateway_log_message_610465ba
3036 field: cisco_secure_email_gateway.log.message
3137 ignore_failure: true
3238 - lowercase:
39+ tag: lowercase_log_level_e59b6b49
3340 field: log.level
3441 ignore_failure: true
3542 # Time zone can come from two sources, choose in order: config, locale, default to UTC.
3643 - set:
44+ tag: set__tmp_tz_5079f7eb
3745 field: _tmp.tz
3846 copy_from: _conf.tz_offset
3947 if: ctx._conf?.tz_offset != null && ctx._conf?.tz_offset != 'local'
4048 - set:
49+ tag: set__tmp_tz_43d96fc2
4150 field: _tmp.tz
4251 copy_from: event.timezone
4352 override: false
4453 if: ctx.event?.timezone != null
4554 - set:
55+ tag: set__tmp_tz_b8df3735
4656 field: _tmp.tz
4757 value: UTC
4858 override: false
4959 - set:
60+ tag: set_event_timezone_ba6cb968
5061 field: event.timezone
5162 copy_from: _tmp.tz
5263 - date:
64+ tag: date__tmp_timestamp_11c130e5
5365 field: _tmp.timestamp
5466 timezone: "{{{ event.timezone }}}"
5567 if: ctx._tmp?.timestamp != null
@@ -63,9 +75,11 @@ processors:
6375 on_failure:
6476 # Try to re-parse as UTC to catch when TZ is invalid or unknown.
6577 - remove:
78+ tag: remove_event_timezone_aeeaa3d5
6679 field: event.timezone
6780 ignore_missing: true
6881 - date:
82+ tag: date__tmp_timestamp_c043b8fc
6983 field: _tmp.timestamp
7084 if: ctx._tmp?.timestamp != null
7185 formats:
@@ -76,59 +90,76 @@ processors:
7690 - MMM dd HH:mm:ss
7791 - MMM d HH:mm:ss
7892 - pipeline:
93+ tag: pipeline_e1b0fc56
7994 name: '{{ IngestPipeline "pipeline_authentication" }}'
8095 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'authentication'
8196 - pipeline:
97+ tag: pipeline_ad806cb2
8298 name: '{{ IngestPipeline "pipeline_gui_logs" }}'
8399 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'gui_logs'
84100 - pipeline:
101+ tag: pipeline_9b0b8b89
85102 name: '{{ IngestPipeline "pipeline_anti_spam" }}'
86103 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'antispam'
87104 - pipeline:
105+ tag: pipeline_928f3e7a
88106 name: '{{ IngestPipeline "pipeline_error_logs" }}'
89107 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'error_logs'
90108 - pipeline:
109+ tag: pipeline_5281e984
91110 name: '{{ IngestPipeline "pipeline_text_mail_logs" }}'
92111 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'mail_logs'
93112 - pipeline:
113+ tag: pipeline_d6dcedc4
94114 name: '{{ IngestPipeline "pipeline_content_scanner" }}'
95115 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'content_scanner'
96116 - pipeline:
117+ tag: pipeline_580b3b8e
97118 name: '{{ IngestPipeline "pipeline_system" }}'
98119 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'system'
99120 - pipeline:
121+ tag: pipeline_1f40bd85
100122 name: '{{ IngestPipeline "pipeline_bounce" }}'
101123 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'bounces'
102124 - pipeline:
125+ tag: pipeline_181277ba
103126 name: '{{ IngestPipeline "pipeline_status" }}'
104127 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'status'
105128 - pipeline:
129+ tag: pipeline_34c6b064
106130 name: '{{ IngestPipeline "pipeline_amp" }}'
107131 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'amp'
108132 - pipeline:
133+ tag: pipeline_7d301c2a
109134 name: '{{ IngestPipeline "pipeline_consolidated_event" }}'
110135 if: '["consolidated_event", "SplunkGIS"].contains(ctx.cisco_secure_email_gateway?.log?.category?.name)'
111136 - pipeline:
137+ tag: pipeline_80b3dc7a
112138 name: '{{ IngestPipeline "pipeline_antivirus" }}'
113139 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'antivirus'
114140 - set:
141+ tag: set_email_from_address_fff7c0a5
115142 field: email.from.address
116143 value: ['{{{email.from.address}}}']
117144 if: ctx.email?.from?.address instanceof String
118145 - set:
146+ tag: set_email_to_address_52631338
119147 field: email.to.address
120148 value: ['{{{email.to.address}}}']
121149 if: ctx.email?.to?.address instanceof String
122150 - set:
151+ tag: set_event_category_d7f508d2
123152 field: event.category
124153 value: vulnerability
125154 if: ctx.cisco_secure_email_gateway?.log?.category?.name == 'antivirus'
126155 - remove:
156+ tag: remove_3f586893
127157 field:
128158 - _tmp
129159 - _conf
130160 ignore_missing: true
131161 - script:
162+ tag: script_b274a7df
132163 lang: painless
133164 source: |
134165 boolean dropEmptyFields(Object object) {
@@ -150,5 +181,8 @@ on_failure:
150181 value: pipeline_error
151182 - append:
152183 field: error.message
153- value: |-
154- Processor "{{{ _ingest.on_failure_processor_type }}}" with tag "{{{ _ingest.on_failure_processor_tag }}}" in pipeline "{{{ _ingest.on_failure_pipeline }}}" failed with message "{{{ _ingest.on_failure_message }}}"
184+ value: >-
185+ Processor '{{{ _ingest.on_failure_processor_type }}}'
186+ {{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
187+ {{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
188+ failed with message '{{{ _ingest.on_failure_message }}}'
0 commit comments