diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 5893728..4b24240 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ # These are supported funding model platforms patreon: rizalgowandy +ko_fi: rizalgowandy diff --git a/.github/terraform-rizalgowandy-newrelic.png b/.github/terraform-rizalgowandy-newrelic.png new file mode 100644 index 0000000..228e155 Binary files /dev/null and b/.github/terraform-rizalgowandy-newrelic.png differ diff --git a/README.md b/README.md index 54dc195..39e0940 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,15 @@ -# terraform-rizalgowandy-newrelic +[![Release](https://img.shields.io/github/release/rizalgowandy/terraform-rizalgowandy-newrelic.svg?style=flat-square)](https://github.com/rizalgowandy/terraform-rizalgowandy-newrelic/releases) -Terraform module to interact with NewRelic. +![terraform-rizalgowandy-newrelic](https://socialify.git.ci/rizalgowandy/terraform-rizalgowandy-newrelic/image?description=1&font=Inter&logo=https%3A%2F%2Fcdn.freebiesupply.com%2Flogos%2Flarge%2F2x%2Fnew-relic-logo-png-transparent.png&pattern=Circuit%20Board&theme=Light) -### Getting Started +## Getting Started -```hcl +The idea was simple, I want to have a standardized dashboard monitoring, and alert across all services across all environments. +In order that, some automation is required. + +## Quick Start + +```terraform data "newrelic_entity" "app_grpc" { # Replace with your service name. name = "app_grpc" @@ -22,12 +27,14 @@ module "grpc_dashboard" { source = "git::https://github.com/rizalgowandy/terraform-rizalgowandy-newrelic?ref=v0.1.0" # Replace with your account id. - account_id = var.account_id + account_id = var.account_id + # Replace with your application id. application_id = data.newrelic_entity.app_grpc.application_id # Replace with your policy id. policy_id = newrelic_alert_policy.golden_signal_policy.id + # Set true to enable alert. enable_alert = false @@ -36,21 +43,25 @@ module "grpc_dashboard" { service_name = "app_grpc" # Replace with your metric name. - event_name = "grpc_performance" + event_name = "grpc_performance" + # Help make widget name more feasible with replacing long method name. # Example: # "/inventory.v1.Inventory/GetProducts" => "/v1.Inventory/GetProducts" event_method_substring = "/inventory./" event_method_replace = "" + # Replace with your metric method name. - event_methods = [ + event_methods = [ "/inventory.v1.Inventory/GetProducts", "/inventory.v1.Inventory/CheckStocks", ] } ``` -### Standardized Event Tags +## Standardized Event Tags + +In order to have all the automation works correctly. You will need to push a specific tag for each event. - metric_status => `ENUM('success', 'error', 'expected_error')` - method => e.g `"/inventory.v1.Inventory/GetProducts"`