-
Notifications
You must be signed in to change notification settings - Fork 7
Update ingest nas #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ingest nas #237
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the way credentials are obtained for FSxN file systems by allowing one secret per filesystem rather than a single secret for all credentials. Key changes include:
- Refactored functions and variable naming (e.g. processFile renamed to readFile) to support multiple credentials.
- Updated configuration and error handling logic to support either a secrets file (fsxnSecretARNsFile) or individual filesystem secret parameters.
- Revised CloudFormation template and documentation to reflect the new configuration options and improve clarity.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Monitoring/ingest_nas_audit_logs_into_cloudwatch/ingest_audit_log.py | Updated credential retrieval logic and variable naming to support multi-secret usage. |
| Monitoring/ingest_nas_audit_logs_into_cloudwatch/cloudformation-template.yaml | Modified parameter groups and descriptions for updated secret configuration. |
| Monitoring/ingest_nas_audit_logs_into_cloudwatch/README.md | Corrected documentation typos and clarified instructions regarding new parameters. |
| Monitoring/ingest_nas_audit_logs_into_cloudwatch/README-MANUAL.md | Updated runtime version and fixed documentation typos related to Lambda layer upload. |
Comments suppressed due to low confidence (2)
Monitoring/ingest_nas_audit_logs_into_cloudwatch/ingest_audit_log.py:317
- Consider using a context manager (with statement) to open the file so that it is automatically closed in case of an exception.
f = open(auditLogPath, 'r')
Monitoring/ingest_nas_audit_logs_into_cloudwatch/cloudformation-template.yaml:146
- [nitpick] Consider using a boolean parameter for 'copyToS3' instead of a string to simplify type conversion in the Lambda function.
copyToS3: "false"
| - An S3 bucket to store the "stats" file and optionally a copy of all the raw NAS audit log files. It will also | ||
| hold a Lambda layer file needed to be able to an add Lambda Layer from a CloudFormation script. | ||
| - You will need to download the [Lambda layer zip file](https://raw.githubusercontent.com/NetApp/FSx-ONTAP-samples-scripts/main/Monitoring/ingest_nas_audit_logs_into_cloudwatch/lambda_layer.zip) | ||
| from this repo and upload it to the S3 bucket. Be sure to perserve the name `lambda_layer.zip`. |
Copilot
AI
Apr 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo detected: 'perserve' should be corrected to 'preserve'.
| from this repo and upload it to the S3 bucket. Be sure to perserve the name `lambda_layer.zip`. | |
| from this repo and upload it to the S3 bucket. Be sure to preserve the name `lambda_layer.zip`. |
Changed the way it obtains credentials for the FSxN file systems. Instead of one secret with all the credentials, it will assume one secret per file system. This required also having a way to pass an unknown number of credentials.