Skip to content

Commit d368a14

Browse files
committed
Added support for multiple vservers
1 parent e965812 commit d368a14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Monitoring/ingest_nas_audit_logs_into_cloudwatch/ingest_audit_log.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,10 @@ def lambda_handler(event, context): # pylint: disable=W0613
389389
#
390390
# Process the file.
391391
processFile(fsxn, headersDownload, volumeUUID, filePath)
392-
lastFileRead[fsxn] = {vserverName: getEpoch(filePath)}
392+
if lastFileRead.get(fsxn) is None:
393+
lastFileRead[fsxn] = {vserverName: getEpoch(filePath)}
394+
else:
395+
lastFileRead[fsxn][vserverName] = getEpoch(filePath)
393396
s3Client.put_object(Key=config['statsName'], Bucket=config['s3BucketName'], Body=json.dumps(lastFileRead).encode('UTF-8'))
394397
#
395398
# Get the next set of SVMs.

0 commit comments

Comments
 (0)