Ejemplo n.º 1
0
        public void Setup()
        {
            _config = ConfigTestData.ValidConfig();

            _config.AlertingGroups.First().DynamoDb.Tables = new List <Table>
            {
                new Table {
                    Name = "TableName"
                }
            };
            _config.AlertingGroups.First().Sqs = new Sqs
            {
                Queues = new List <Queue>
                {
                    new Queue {
                        Name = "QueueName"
                    }
                }
            };
            _config.AlertingGroups.First().Services = new Dictionary <string, AwsServiceAlarms>
            {
                {
                    "ServiceName", new AwsServiceAlarms
                    {
                        Resources = new List <ResourceThresholds>
                        {
                            new ResourceThresholds {
                                Pattern = "ResourceName"
                            }
                        }
                    }
                }
            };
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            _config = ConfigTestData.ValidConfig();

            _config.AlertingGroups.First().DynamoDb.Tables = new List <Table>
            {
                new Table {
                    Name = "TableName"
                }
            };
            _config.AlertingGroups.First().Sqs = new Sqs
            {
                Queues = new List <Queue>
                {
                    new Queue {
                        Name = "QueueName"
                    }
                }
            };
            _config.AlertingGroups.First().Services = new AlertingGroupServices()
            {
                AutoScaling = new AwsServiceAlarms <AutoScalingResourceConfig>
                {
                    Resources = new List <ResourceThresholds <AutoScalingResourceConfig> >
                    {
                        new ResourceThresholds <AutoScalingResourceConfig> {
                            Pattern = "ResourceName"
                        }
                    }
                }
            };
        }
        public void Setup()
        {
            _sqs = new Sqs
            {
                LengthThreshold        = 42,
                OldestMessageThreshold = 42,
                Queues = new List <Queue>
                {
                    new Queue
                    {
                        Name                   = "QueueName",
                        LengthThreshold        = 42,
                        OldestMessageThreshold = 42,
                        Errors                 = new ErrorQueue
                        {
                            LengthThreshold        = 42,
                            OldestMessageThreshold = 42
                        }
                    }
                },
                Errors = new ErrorQueue
                {
                    LengthThreshold        = 42,
                    OldestMessageThreshold = 42
                }
            };

            _config = ConfigTestData.ValidConfig();
            _config.AlertingGroups.First().Sqs = _sqs;
        }
        public void Setup()
        {
            _awsServiceAlarms = new AwsServiceAlarms <ResourceConfig>
            {
                ExcludeResourcesPrefixedWith = new List <string>
                {
                    "ExcludePrefix"
                },
                Resources = new List <ResourceThresholds <ResourceConfig> >
                {
                    new ResourceThresholds <ResourceConfig>
                    {
                        Name   = "ResourceName",
                        Values = new Dictionary <string, AlarmValues>
                        {
                            { "testThresholdLow", 42 }
                        }
                    }
                },
                Values = new Dictionary <string, AlarmValues>
                {
                    { "testThresholdHigh", 242 }
                }
            };

            _config = ConfigTestData.ValidConfig();
            _config.AlertingGroups.First().Services = new AlertingGroupServices()
            {
                Lambda = _awsServiceAlarms
            };
        }
        public void Setup()
        {
            _dynamoDb = new DynamoDb
            {
                Threshold           = 0.7,
                ThrottlingThreshold = 42,
                Tables = new List <Table>
                {
                    new Table
                    {
                        Name      = "TableName",
                        Threshold = 0.8
                    }
                }
            };

            _config = ConfigTestData.ValidConfig();
            _config.AlertingGroups.First().DynamoDb = _dynamoDb;
        }