AWSTemplateFormatVersion: "2010-09-09" # MIT License # # Copyright (c) 2021 Qumulo, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. Description: This template creates a resource group, audit log group, and dashboard for the QSTACK for easy filtering and monitoring in Cloud Watch (qs-1s6n2i67c) Metadata: cfn-lint: config: ignore_checks: - W9001 - W9002 - W9003 - W9004 - W9006 Parameters: QClusterName: Type: String QNodeNames: Type: CommaDelimitedList QStackName: Type: String TopStackName: Type: String QAuditLog: Type: String AllFlash: Type: String Region: Type: String Conditions: HDD: !Not - !Equals - !Ref AllFlash - AF CreateLog: !Not - !Equals - !Ref QAuditLog - "NO" Resources: ClusterRG: Type: "AWS::ResourceGroups::Group" Properties: Name: !Sub "Qumulo-Cluster-EC2-${TopStackName}" ResourceQuery: Type: "TAG_FILTERS_1_0" Query: ResourceTypeFilters: - "AWS::AllSupported" TagFilters: - Key: Name Values: !Ref QNodeNames ClusterRGSSD: Type: "AWS::ResourceGroups::Group" Properties: Name: !Sub "Qumulo-Cluster-SSD-${TopStackName}" ResourceQuery: Type: "TAG_FILTERS_1_0" Query: ResourceTypeFilters: - "AWS::AllSupported" TagFilters: - Key: Name Values: - !Sub "${QStackName}-gp2" - !Sub "${QStackName}-gp3" ClusterRGHDD: Type: "AWS::ResourceGroups::Group" Condition: HDD Properties: Name: !Sub "Qumulo-Cluster-HDD-${TopStackName}" ResourceQuery: Type: "TAG_FILTERS_1_0" Query: ResourceTypeFilters: - "AWS::AllSupported" TagFilters: - Key: Name Values: - !Sub "${QStackName}-st1" - !Sub "${QStackName}-sc1" ClusterLogGroup: Type: "AWS::Logs::LogGroup" Condition: CreateLog Properties: LogGroupName: !Sub "/qumulo/${QStackName}" ClusterDashboard: Type: "AWS::CloudWatch::Dashboard" Properties: DashboardName: !Sub "Qumulo-Cluster-${QStackName}" DashboardBody: !Sub '{ "widgets": [ { "type": "metric", "x": 15, "y": 0, "width": 9, "height": 6, "properties": { "metrics": [ [ "Qumulo/Metrics", "FileSystemFreeCapacity", "ClusterName", "${QClusterName}", { "id": "m2" } ] ], "view": "timeSeries", "stacked": false, "region": "${Region}", "title": "File System Available Capacity", "period": 300, "stat": "Average", "yAxis": { "left": { "label": "" } } } }, { "type": "metric", "x": 9, "y": 0, "width": 6, "height": 3, "properties": { "metrics": [ [ "Qumulo/Metrics", "RemainingNodeFailures", "ClusterName", "${QClusterName}" ] ], "view": "singleValue", "region": "${Region}", "title": "EC2 Instance Protection", "period": 300, "stat": "Minimum" } }, { "type": "metric", "x": 0, "y": 0, "width": 9, "height": 3, "properties": { "metrics": [ [ "Qumulo/Metrics", "TotalNodeCount", "ClusterName", "${QClusterName}" ], [ ".", "HealthyNodeCount", ".", "." ] ], "view": "singleValue", "region": "${Region}", "title": "Cluster EC2 Instances", "period": 300, "stat": "Minimum" } }, { "type": "metric", "x": 0, "y": 3, "width": 9, "height": 3, "properties": { "metrics": [ [ "Qumulo/Metrics", "FailedDriveCount", "ClusterName", "${QClusterName}" ] ], "view": "singleValue", "region": "${Region}", "title": "Failed EBS Volumes", "period": 300, "stat": "Maximum" } }, { "type": "metric", "x": 9, "y": 3, "width": 6, "height": 3, "properties": { "metrics": [ [ "Qumulo/Metrics", "RemainingDriveFailures", "ClusterName", "${QClusterName}" ] ], "view": "singleValue", "region": "${Region}", "title": "EBS Volume Protection", "period": 300, "stat": "Minimum" } }, { "type": "metric", "x": 0, "y": 6, "width": 9, "height": 6, "properties": { "metrics": [ [ "Qumulo/Metrics", "ProtocolReadThroughput", "ClusterName", "${QClusterName}" ], [ ".", "ProtocolWriteThroughput", ".", "." ] ], "view": "timeSeries", "stacked": false, "region": "${Region}", "title": "Protocol Throughput", "period": 60, "stat": "Average" } }, { "type": "metric", "x": 15, "y": 6, "width": 9, "height": 6, "properties": { "metrics": [ [ "Qumulo/Metrics", "ProtocolReadLatency", "ClusterName", "${QClusterName}" ], [ ".", "ProtocolWriteLatency", ".", "." ], [ ".", "ProtocolMetadataLatency", ".", "." ] ], "view": "timeSeries", "stacked": false, "region": "${Region}", "title": "Protocol Latency", "period": 60, "stat": "Average" } }, { "type": "metric", "x": 9, "y": 6, "width": 6, "height": 6, "properties": { "metrics": [ [ "Qumulo/Metrics", "ProtocolReadOps", "ClusterName", "${QClusterName}" ], [ ".", "ProtocolWriteOps", ".", "." ] ], "view": "timeSeries", "stacked": false, "region": "${Region}", "title": "Protocol IOPS", "period": 60, "stat": "Average" } } ] }' Outputs: QumuloClusterRG: Value: !Ref ClusterRG QumuloClusterSSDRG: Value: !Ref ClusterRGSSD QumuloClusterHDDRG: Condition: HDD Value: !Ref ClusterRGHDD QumuloCluserCloudWatchDashboard: Value: !Ref ClusterDashboard QumuloClusterLogGroup: Condition: CreateLog Value: !Ref ClusterLogGroup