Skip to content

Commit 382b164

Browse files
committed
Changed the logic so it would not skip event types that hadn't been veted.
1 parent bc774c6 commit 382b164

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Monitoring/ingest_nas_audit_logs_into_cloudwatch/ingest_audit_log.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,8 @@ def createCWEvent(event):
186186
str += ", InformationSet=Null"
187187
else:
188188
str += f", InformationSet={data['#text']}"
189-
elif data['@Name'] in ['ObjectType', 'WriteOffset', 'WriteCount', 'NewSD', 'OldSD', 'SubjectUserIsLocal', 'OldPath', 'NewPath', 'OldRotateLimit', 'NewRotateLimit', 'OldLogFormat', 'NewLogFormat', 'OldRetentionDuration', 'NewRetentionDuration', 'AuditGuarantee', 'OldDestinationPath', 'NewDestinationPath']: # These don't require special handling.
189+
else: # Assume the rest of the fields don't need special handling.
190190
str += f", {data['@Name']}={data['#text']}"
191-
else:
192-
print(f"Unknown data type: {data['@Name']}")
193191

194192
return {'timestamp': t, 'message': str}
195193

0 commit comments

Comments
 (0)