소스 검색

Multiple Minor Fixes

* Increase moose HF /opt/splunk to 60GB in prod
* Update sensu configuration to 3.1.11 for /opt/splunk disk check change
* Catch one exception in xdrtest. It's still ugly when you haven't saml'd.
Fred Damstra [afs macbook] 3 년 전
부모
커밋
a9f90c1772

+ 17 - 13
bin/xdrtest

@@ -158,19 +158,23 @@ if __name__ == "__main__":
             exclude_state="stopped"
        
         instances[p] = list()
-        for instance in gather_instances(ec2[p], args.tagname, args.tagvalue, exclude_state):
-            if args.instancename:
-                # At least one instance name was specified, so go through and match
-                for i in args.instancename:
-                    if fnmatch.fnmatch(instance['name'], i):
-                        print(f'{p:<30}\t{ instance["instance_id"] }\t{instance["state"]:<10}\t{instance["name"]}')
-                        instances[p].append(instance['instance_id'])
-                        instance_count += 1
-            else:
-                # No instance name specified, we add everything
-                print(f'{p:<30}\t{ instance["instance_id"] }\t{instance["state"]:<10}\t{instance["name"]}')
-                instances[p].append(instance['instance_id'])
-                instance_count += 1
+        try:
+            for instance in gather_instances(ec2[p], args.tagname, args.tagvalue, exclude_state):
+                if args.instancename:
+                    # At least one instance name was specified, so go through and match
+                    for i in args.instancename:
+                        if fnmatch.fnmatch(instance['name'], i):
+                            print(f'{p:<30}\t{ instance["instance_id"] }\t{instance["state"]:<10}\t{instance["name"]}')
+                            instances[p].append(instance['instance_id'])
+                            instance_count += 1
+                else:
+                    # No instance name specified, we add everything
+                    print(f'{p:<30}\t{ instance["instance_id"] }\t{instance["state"]:<10}\t{instance["name"]}')
+                    instances[p].append(instance['instance_id'])
+                    instance_count += 1
+        except Exception as e:
+            logger.error(f'Could not enumerate instances in profile "{p}": {e}')
+            profiles.remove(p)
 
     if instance_count == 0:
         print('')

+ 1 - 1
prod/aws-us-gov/mdr-prod-c2/096-sensu-configuration/terragrunt.hcl

@@ -13,7 +13,7 @@ locals {
 # working directory, into a temporary folder, and execute your Terraform commands in that folder.
 terraform {
   # Double slash is intentional and required to show root of modules
-  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/sensu-configuration?ref=v3.1.7"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/sensu-configuration?ref=v3.1.11"
 
 }
 

+ 1 - 1
test/aws-us-gov/mdr-test-c2/096-sensu-configuration/terragrunt.hcl

@@ -13,7 +13,7 @@ locals {
 # working directory, into a temporary folder, and execute your Terraform commands in that folder.
 terraform {
   # Double slash is intentional and required to show root of modules
-  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/sensu-configuration?ref=v3.1.7"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/sensu-configuration?ref=v3.1.11"
 }
 
 dependency "vpc-system-services" {

+ 1 - 1
test/aws-us-gov/mdr-test-c2/account.hcl

@@ -78,7 +78,7 @@ locals {
       "/var/log": 8, # minimum: 8
       "/var/log/audit": 8, # minimum: 8
       "/tmp": 4,  # minimum: 4
-      "/opt/splunk": 30, # No minimum; not in base image
+      "/opt/splunk": 60, # No minimum; not in base image
     },
   }