Skip to content

Commit

Permalink
Merge pull request #111 from SumoLogic/npande_qtr_1_fy23
Browse files Browse the repository at this point in the history
Npande qtr 1 fy23
  • Loading branch information
himsharma01 authored Jul 29, 2022
2 parents a8fe7c5 + d845fdc commit 9913680
Show file tree
Hide file tree
Showing 137 changed files with 60,779 additions and 2,838 deletions.
23 changes: 20 additions & 3 deletions aws-observability-terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.42.0, < 4.0.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1.0 |
| <a name="requirement_sumologic"></a> [sumologic](#requirement\_sumologic) | >= 2.13.0 |
| <a name="requirement_sumologic"></a> [sumologic](#requirement\_sumologic) | >= 2.14.0 |
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.7.1 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_sumologic"></a> [sumologic](#provider\_sumologic) | 2.13.0 |
| <a name="provider_sumologic"></a> [sumologic](#provider\_sumologic) | 2.16.2 |
| <a name="provider_time"></a> [time](#provider\_time) | 0.7.2 |

## Modules

Expand All @@ -30,7 +31,9 @@
| [sumologic_field.apiname](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.cacheclusterid](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.clustername](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.dbclusteridentifier](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.dbidentifier](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.dbinstanceidentifier](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.functionname](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.instanceid](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.loadbalancer](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
Expand All @@ -39,6 +42,20 @@
| [sumologic_field.networkloadbalancer](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.region](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.tablename](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field.topicname](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityAlbAccessLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityApiGatewayCloudTrailLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityDynamoDBCloudTrailLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityEC2CloudTrailLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityECSCloudTrailLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityElastiCacheCloudTrailLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityElbAccessLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityFieldExtractionRule](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityGenericCloudWatchLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityLambdaCloudWatchLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilityRdsCloudTrailLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [sumologic_field_extraction_rule.AwsObservabilitySNSCloudTrailLogsFER](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/field_extraction_rule) | resource |
| [time_sleep.wait_for_10_seconds](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |

## Inputs

Expand All @@ -57,4 +74,4 @@
| Name | Description |
|------|-------------|
| <a name="output_Apps"></a> [Apps](#output\_Apps) | All outputs related to apps. |
| <a name="output_Collection"></a> [Collection](#output\_Collection) | All outputs related to collection and sources. |
| <a name="output_Collection"></a> [Collection](#output\_Collection) | All outputs related to collection and sources. |
13 changes: 10 additions & 3 deletions aws-observability-terraform/app-modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.1 |
| <a name="requirement_sumologic"></a> [sumologic](#requirement\_sumologic) | >= 2.13.0 |
| <a name="requirement_sumologic"></a> [sumologic](#requirement\_sumologic) | >= 2.14.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_sumologic"></a> [sumologic](#provider\_sumologic) | >= 2.13.0 |
| <a name="provider_time"></a> [time](#provider\_time) | n/a |
| <a name="provider_sumologic"></a> [sumologic](#provider\_sumologic) | 2.16.2 |
| <a name="provider_time"></a> [time](#provider\_time) | 0.7.2 |

## Modules

Expand All @@ -29,6 +29,7 @@
| <a name="module_overview_app"></a> [overview\_app](#module\_overview\_app) | ./overview | n/a |
| <a name="module_rce_app"></a> [rce\_app](#module\_rce\_app) | ./rce | n/a |
| <a name="module_rds_app"></a> [rds\_app](#module\_rds\_app) | ./rds | n/a |
| <a name="module_sns_app"></a> [sns\_app](#module\_sns\_app) | ./sns | n/a |

## Resources

Expand Down Expand Up @@ -74,6 +75,7 @@

| Name | Description |
|------|-------------|
| <a name="output_sumologic_apps_folder"></a> [sumologic\_apps\_folder](#output\_sumologic\_apps\_folder) | This output contains AWS Observability Parent App folder. |
| <a name="output_sumologic_content_alb"></a> [sumologic\_content\_alb](#output\_sumologic\_content\_alb) | This output contains alb App. |
| <a name="output_sumologic_content_apigateway"></a> [sumologic\_content\_apigateway](#output\_sumologic\_content\_apigateway) | This output contains apigateway App. |
| <a name="output_sumologic_content_dynamodb"></a> [sumologic\_content\_dynamodb](#output\_sumologic\_content\_dynamodb) | This output contains dynamodb App. |
Expand All @@ -86,6 +88,7 @@
| <a name="output_sumologic_content_overview"></a> [sumologic\_content\_overview](#output\_sumologic\_content\_overview) | This output contains overview App. |
| <a name="output_sumologic_content_rce"></a> [sumologic\_content\_rce](#output\_sumologic\_content\_rce) | This output contains rce Apps. |
| <a name="output_sumologic_content_rds"></a> [sumologic\_content\_rds](#output\_sumologic\_content\_rds) | This output contains rds App. |
| <a name="output_sumologic_content_sns"></a> [sumologic\_content\_sns](#output\_sumologic\_content\_sns) | This output contains sns App. |
| <a name="output_sumologic_field_alb"></a> [sumologic\_field\_alb](#output\_sumologic\_field\_alb) | This output contains fields required for alb app. |
| <a name="output_sumologic_field_apigateway"></a> [sumologic\_field\_apigateway](#output\_sumologic\_field\_apigateway) | This output contains fields required for apigateway app. |
| <a name="output_sumologic_field_dynamodb"></a> [sumologic\_field\_dynamodb](#output\_sumologic\_field\_dynamodb) | This output contains fields required for dynamodb app. |
Expand All @@ -101,9 +104,13 @@
| <a name="output_sumologic_field_extraction_rule_elb"></a> [sumologic\_field\_extraction\_rule\_elb](#output\_sumologic\_field\_extraction\_rule\_elb) | This output contains Field Extraction rules required for classic elb app. |
| <a name="output_sumologic_field_extraction_rule_lambda"></a> [sumologic\_field\_extraction\_rule\_lambda](#output\_sumologic\_field\_extraction\_rule\_lambda) | This output contains Field Extraction rules required for lambda app. |
| <a name="output_sumologic_field_extraction_rule_rds"></a> [sumologic\_field\_extraction\_rule\_rds](#output\_sumologic\_field\_extraction\_rule\_rds) | This output contains Field Extraction rules required for rds app. |
| <a name="output_sumologic_field_extraction_rule_sns"></a> [sumologic\_field\_extraction\_rule\_sns](#output\_sumologic\_field\_extraction\_rule\_sns) | This output contains Field Extraction rules required for sns app. |
| <a name="output_sumologic_field_lambda"></a> [sumologic\_field\_lambda](#output\_sumologic\_field\_lambda) | This output contains fields required for lambda app. |
| <a name="output_sumologic_field_nlb"></a> [sumologic\_field\_nlb](#output\_sumologic\_field\_nlb) | This output contains fields required for nlb app. |
| <a name="output_sumologic_field_overview"></a> [sumologic\_field\_overview](#output\_sumologic\_field\_overview) | This output contains fields required for overview app. |
| <a name="output_sumologic_field_rds"></a> [sumologic\_field\_rds](#output\_sumologic\_field\_rds) | This output contains fields required for rds app. |
| <a name="output_sumologic_field_sns"></a> [sumologic\_field\_sns](#output\_sumologic\_field\_sns) | This output contains fields required for sns app. |
| <a name="output_sumologic_hierarchy"></a> [sumologic\_hierarchy](#output\_sumologic\_hierarchy) | This output contains Sumologic Hierarchy. |
| <a name="output_sumologic_metric_rules_nlb"></a> [sumologic\_metric\_rules\_nlb](#output\_sumologic\_metric\_rules\_nlb) | This output contains metric rules required for nlb app. |
| <a name="output_sumologic_metric_rules_rds"></a> [sumologic\_metric\_rules\_rds](#output\_sumologic\_metric\_rules\_rds) | This output contains metric rules required for rds app. |
| <a name="output_sumologic_monitors_folder"></a> [sumologic\_monitors\_folder](#output\_sumologic\_monitors\_folder) | This output contains AWS Observability Monitors folder. |
25 changes: 1 addition & 24 deletions aws-observability-terraform/app-modules/alb/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,7 @@ module "alb_module" {

# ********************** No Metric Rules for ALB ********************** #

# ********************** Fields ********************** #
# managed_fields = {
# "LoadBalancer" = {
# field_name = "loadbalancer"
# data_type = "String"
# state = true
# }
# }

# ********************** FERs ********************** #
managed_field_extraction_rules = {
"AlbAccessLogsFieldExtractionRule" = {
name = "AwsObservabilityAlbAccessLogsFER"
scope = "account=* region=* (http or https or h2 or grpcs or ws or wss)"
parse_expression = <<EOT
| parse "* * * * * * * * * * * * \"*\" \"*\" * * * \"*\"" as Type, DateTime, loadbalancer, Client, Target, RequestProcessingTime, TargetProcessingTime, ResponseProcessingTime, ElbStatusCode, TargetStatusCode, ReceivedBytes, SentBytes, Request, UserAgent, SslCipher, SslProtocol, TargetGroupArn, TraceId
| where Type in ("http", "https", "h2", "grpcs", "ws", "wss")
| where !isBlank(loadbalancer)
| "aws/applicationelb" as namespace
| tolowercase(loadbalancer) as loadbalancer | fields loadbalancer, namespace
EOT
enabled = true
}
}
# ********************** Required Fields and FERs are created at aws-observability-terraform/field.tf ********************** #

# ********************** Apps ********************** #
managed_apps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ No resources.
| <a name="input_email_notifications"></a> [email\_notifications](#input\_email\_notifications) | Email Notifications to be sent by the alert. | <pre>list(object(<br> {<br> connection_type = string,<br> recipients = list(string),<br> subject = string,<br> time_zone = string,<br> message_body = string,<br> run_for_trigger_types = list(string)<br> }<br> ))</pre> | n/a | yes |
| <a name="input_environment"></a> [environment](#input\_environment) | Enter au, ca, de, eu, jp, us2, in, fed or us1. Visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security | `string` | n/a | yes |
| <a name="input_group_notifications"></a> [group\_notifications](#input\_group\_notifications) | Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true. | `bool` | `true` | no |
| <a name="input_json_file_directory_path"></a> [json\_file\_directory\_path](#input\_json\_file\_directory\_path) | Directory path where all the JSONs are present. | `string` | n/a | yes |
| <a name="input_monitor_folder_id"></a> [monitor\_folder\_id](#input\_monitor\_folder\_id) | Please provide a folder ID where you would like the monitors to be installed. | `string` | `""` | no |
| <a name="input_monitors_disabled"></a> [monitors\_disabled](#input\_monitors\_disabled) | Whether the monitors are enabled or not? | `bool` | `true` | no |

Expand Down
26 changes: 1 addition & 25 deletions aws-observability-terraform/app-modules/apigateway/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,7 @@ module "apigateway_module" {

# ********************** No Metric Rules for API Gateway ********************** #

# ********************** Fields ********************** #
# managed_fields = {
# "APIName" = {
# field_name = "apiname"
# data_type = "String"
# state = true
# }
# }

# ********************** FERs ********************** #
managed_field_extraction_rules = {
"CloudTrailFieldExtractionRule" = {
name = "AwsObservabilityApiGatewayCloudTrailLogsFER"
scope = "account=* eventname eventsource \"apigateway.amazonaws.com\""
parse_expression = <<EOT
| json "eventSource", "awsRegion", "responseElements", "recipientAccountId" as eventSource, region, responseElements, accountid nodrop
| where eventSource = "apigateway.amazonaws.com"
| "aws/apigateway" as namespace
| json field=responseElements "name" as ApiName nodrop
| tolowercase(ApiName) as apiname
| fields region, namespace, apiname, accountid
EOT
enabled = true
}
}
# ********************** Required Fields and FERs are created at aws-observability-terraform/field.tf ********************** #

# ********************** Apps ********************** #
managed_apps = {
Expand Down
1 change: 1 addition & 0 deletions aws-observability-terraform/app-modules/dynamodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ No resources.
| <a name="input_email_notifications"></a> [email\_notifications](#input\_email\_notifications) | Email Notifications to be sent by the alert. | <pre>list(object(<br> {<br> connection_type = string,<br> recipients = list(string),<br> subject = string,<br> time_zone = string,<br> message_body = string,<br> run_for_trigger_types = list(string)<br> }<br> ))</pre> | n/a | yes |
| <a name="input_environment"></a> [environment](#input\_environment) | Enter au, ca, de, eu, jp, us2, in, fed or us1. Visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security | `string` | n/a | yes |
| <a name="input_group_notifications"></a> [group\_notifications](#input\_group\_notifications) | Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true. | `bool` | `true` | no |
| <a name="input_json_file_directory_path"></a> [json\_file\_directory\_path](#input\_json\_file\_directory\_path) | Directory path where all the JSONs are present. | `string` | n/a | yes |
| <a name="input_monitor_folder_id"></a> [monitor\_folder\_id](#input\_monitor\_folder\_id) | Please provide a folder ID where you would like the monitors to be installed. | `string` | `""` | no |
| <a name="input_monitors_disabled"></a> [monitors\_disabled](#input\_monitors\_disabled) | Whether the monitors are enabled or not? | `bool` | `true` | no |

Expand Down
25 changes: 1 addition & 24 deletions aws-observability-terraform/app-modules/dynamodb/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,7 @@ module "dynamodb_module" {

# ********************** No Metric Rules for DynamoDB ********************** #

# ********************** Fields ********************** #
# managed_fields = {
# "TableName" = {
# field_name = "tablename"
# data_type = "String"
# state = true
# }
# }

# ********************** FERs ********************** #
managed_field_extraction_rules = {
"CloudTrailFieldExtractionRule" = {
name = "AwsObservabilityDynamoDBCloudTrailLogsFER"
scope = "account=* eventname eventsource \"dynamodb.amazonaws.com\""
parse_expression = <<EOT
| json "eventSource", "awsRegion", "requestParameters.tableName", "recipientAccountId" as eventSource, region, tablename, accountid nodrop
| where eventSource = "dynamodb.amazonaws.com"
| "aws/dynamodb" as namespace
| tolowercase(tablename) as tablename
| fields region, namespace, tablename, accountid
EOT
enabled = true
}
}
# ********************** Required Fields and FERs are created at aws-observability-terraform/field.tf ********************** #

# ********************** Apps ********************** #
managed_apps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ No resources.
| <a name="input_email_notifications"></a> [email\_notifications](#input\_email\_notifications) | Email Notifications to be sent by the alert. | <pre>list(object(<br> {<br> connection_type = string,<br> recipients = list(string),<br> subject = string,<br> time_zone = string,<br> message_body = string,<br> run_for_trigger_types = list(string)<br> }<br> ))</pre> | n/a | yes |
| <a name="input_environment"></a> [environment](#input\_environment) | Enter au, ca, de, eu, jp, us2, in, fed or us1. Visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security | `string` | n/a | yes |
| <a name="input_group_notifications"></a> [group\_notifications](#input\_group\_notifications) | Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true. | `bool` | `true` | no |
| <a name="input_json_file_directory_path"></a> [json\_file\_directory\_path](#input\_json\_file\_directory\_path) | Directory path where all the JSONs are present. | `string` | n/a | yes |
| <a name="input_monitor_folder_id"></a> [monitor\_folder\_id](#input\_monitor\_folder\_id) | Please provide a folder ID where you would like the monitors to be installed. | `string` | `""` | no |
| <a name="input_monitors_disabled"></a> [monitors\_disabled](#input\_monitors\_disabled) | Whether the monitors are enabled or not? | `bool` | `true` | no |

Expand Down
Loading

0 comments on commit 9913680

Please sign in to comment.