-
Notifications
You must be signed in to change notification settings - Fork 450
/
Copy pathdefault.yml
215 lines (215 loc) · 8.36 KB
/
default.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
---
description: Pipeline for Cisco ISE logs.
processors:
- set:
field: ecs.version
value: '8.17.0'
- rename:
field: message
target_field: event.original
ignore_missing: true
if: ctx.event?.original == null
- grok:
field: event.original
tag: grok_time_details
patterns:
- '^(?:<%{NUMBER:log.syslog.priority:long}>)?%{SYSLOGTIMESTAMP:_tmp.timestamp} %{ISO8601_TIMEZONE:_tmp.timezone} %{DATA:host.hostname} %{DATA:cisco_ise.log.category.name} %{GREEDYDATA:_tmp.message}$'
- '^(?:<%{NUMBER:log.syslog.priority:long}>)?%{SYSLOGTIMESTAMP:_tmp.timestamp} %{DATA:host.hostname} %{DATA:cisco_ise.log.category.name} %{GREEDYDATA:_tmp.message}$'
- '^%{TIMEONLYSTAMP_ISO8601:_tmp.timestamp}%{ISO8601_TIMEZONE:_tmp.timezone} %{DATA:host.hostname} %{DATA:cisco_ise.log.category.name} %{GREEDYDATA:_tmp.message}$'
- '^%{DATA:cisco_ise.log.category.name} %{DATA:cisco_ise.log.message.id} %{NONNEGINT:cisco_ise.log.segment.total:long} %{NONNEGINT:cisco_ise.log.segment.number:long} %{GREEDYDATA:_tmp.message}$'
pattern_definitions:
TIMEONLYSTAMP_ISO8601: '%{YEAR}-%{MONTHNUM}-%{MONTHDAY}[T]%{HOUR}:?%{MINUTE}(?::?%{SECOND})?'
on_failure:
- append:
field: error.message
value: '{{{ _ingest.on_failure_processor_tag }}}: {{{_ingest.on_failure_message}}}'
- grok:
field: _tmp.message
tag: grok_message_details
if: ctx._tmp?.message != null
patterns:
- '^%{NOTCOLON:cisco_ise.log.log_severity_level}%{SPACE}: %{NOTCOLON:event.action}%{SPACE}: %{GREEDYDATA:message}$'
- ^%{NUMBER:cisco_ise.log.message.id} %{NUMBER:cisco_ise.log.segment.total:long} %{NUMBER:cisco_ise.log.segment.number:long} %{GREEDYDATA:message}$
- ^%{GREEDYDATA:message}$
pattern_definitions:
NOTCOLON: '[^:]*?'
on_failure:
- append:
field: error.message
value: '{{{ _ingest.on_failure_processor_tag }}}: {{{_ingest.on_failure_message}}}'
- trim:
field: message
ignore_failure: true
- convert:
if: ctx.host?.hostname != null && ctx.host.hostname != ''
field: host.hostname
target_field: host.ip
type: ip
ignore_failure: true
ignore_missing: true
- remove:
field: host.hostname
if: ctx.host?.ip != null
- append:
field: related.ip
value: '{{{host.ip}}}'
if: ctx.host?.ip != null
allow_duplicates: false
ignore_failure: true
- append:
field: related.hosts
value: '{{{host.hostname}}}'
if: ctx.host?.hostname != null
allow_duplicates: false
ignore_failure: true
- rename:
field: _conf.tz_offset
target_field: event.timezone
if: ctx._conf?.tz_offset != null
tag: rename_tz_offset
ignore_missing: true
- rename:
field: _tmp.timezone
tag: rename_tmp_timezone
target_field: event.timezone
if: ctx.event?.timezone == null # If user has not provided the timezone offset.
ignore_missing: true
- date:
field: _tmp.timestamp
tag: default-tmp-timestamp parsing
formats:
- MMM [ ]d[d] HH:mm:ss[.SSSSSS][.SSS]
- ISO8601
on_failure:
- remove:
field: _tmp.timestamp
ignore_missing: true
- append:
field: error.message
value: '{{{ _ingest.on_failure_processor_tag }}}: {{{_ingest.on_failure_message}}}'
- date:
if: ctx.event?.timezone != null && ctx.event.timezone != ''
field: _tmp.timestamp
timezone: '{{{event.timezone}}}'
tag: default-tmp-timestamp-with timezone parsing
formats:
- MMM [ ]d[d] HH:mm:ss[.SSSSSS][.SSS]
- ISO8601
on_failure:
- remove:
field: _tmp.timestamp
ignore_missing: true
- append:
field: error.message
value: '{{{ _ingest.on_failure_processor_tag }}}: {{{_ingest.on_failure_message}}}'
- pipeline:
name: '{{ IngestPipeline "pipeline_policy_diagnostics" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_Policy_Diagnostics'
- pipeline:
name: '{{ IngestPipeline "pipeline_guest" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_Guest'
- pipeline:
name: '{{ IngestPipeline "pipeline_mydevices" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_MyDevices'
- pipeline:
name: '{{ IngestPipeline "pipeline_internal_operations_diagnostics" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_Internal_Operations_Diagnostics'
- pipeline:
name: '{{ IngestPipeline "pipeline_threat_centric_nac" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_Threat_Centric_NAC'
- pipeline:
name: '{{ IngestPipeline "pipeline_posture_and_client_provisioning_audit" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_Posture_and_Client_Provisioning_Audit'
- pipeline:
name: '{{ IngestPipeline "pipeline_radius_accounting" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_RADIUS_Accounting'
- pipeline:
name: '{{ IngestPipeline "pipeline_failed_attempts" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_Failed_Attempts'
- pipeline:
name: '{{ IngestPipeline "pipeline_passed_authentications" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_Passed_Authentications'
- pipeline:
name: '{{ IngestPipeline "pipeline_radius_diagnostics" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_RADIUS_Diagnostics'
- pipeline:
name: '{{ IngestPipeline "pipeline_ad_connector" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_AD_Connector'
- pipeline:
name: '{{ IngestPipeline "pipeline_authentication_flow_diagnostics" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_Authentication_Flow_Diagnostics'
- pipeline:
name: '{{ IngestPipeline "pipeline_administrative_and_operational_audit" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_Administrative_and_Operational_Audit'
- pipeline:
name: '{{ IngestPipeline "pipeline_system_statistics" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_System_Statistics'
- pipeline:
name: '{{ IngestPipeline "pipeline_tacacs_accounting" }}'
if: ctx.cisco_ise?.log?.category?.name == 'CISE_TACACS_Accounting'
- pipeline:
name: '{{ IngestPipeline "pipeline_identity_stores_diagnostics" }}'
if: ctx.cisco_ise?.log?.category?.name == "CISE_Identity_Stores_Diagnostics"
- pipeline:
name: '{{ IngestPipeline "pipeline_alarm" }}'
if: ctx.cisco_ise?.log?.category?.name == "CISE_Alarm"
- pipeline:
name: '{{ IngestPipeline "pipeline_monitoring_data_purge_audit" }}'
if: ctx.cisco_ise?.log?.category?.name?.toUpperCase() == 'CISE_MONITORING_DATA_PURGE_AUDIT'
- set:
field: host.ip
value: ['{{{host.ip}}}']
if: ctx.host?.ip instanceof String
- convert:
field: cisco_ise.log.log_details.ConfigVersionId
target_field: cisco_ise.log.config_version.id
type: long
ignore_missing: true
on_failure:
- append:
field: error.message
value: "{{{ _ingest.on_failure_message }}}"
- remove:
field: cisco_ise.log.log_details.ConfigVersionId
ignore_missing: true
- lowercase:
field: log.syslog.severity.name
ignore_failure: true
ignore_missing: true
- set:
field: log.level
copy_from: log.syslog.severity.name
ignore_empty_value: true
- remove:
field:
- _tmp
- cisco_ise.log.log_details_raw
ignore_missing: true
- set:
field: event.code
copy_from: cisco_ise.log.message.code
if: ctx.cisco_ise?.log?.message?.code != null
ignore_failure: true
- script:
lang: painless
source:
boolean dropEmptyFields(Object object) {
if (object == null || object == '') {
return true;
} else if (object instanceof Map) {
((Map) object).values().removeIf(value -> dropEmptyFields(value));
return (((Map) object).size() == 0);
} else if (object instanceof List) {
((List) object).removeIf(value -> dropEmptyFields(value));
return (((List) object).length == 0);
}
return false;
}
dropEmptyFields(ctx);
on_failure:
- set:
field: event.kind
value: pipeline_error
- append:
field: error.message
value: '{{{_ingest.on_failure_message}}}'