Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

fix: grafana dashboard creation #54

Merged
merged 1 commit into from
Jul 4, 2023
Merged

fix: grafana dashboard creation #54

merged 1 commit into from
Jul 4, 2023

Conversation

xav
Copy link
Contributor

@xav xav commented Jul 4, 2023

Description

Remove HTTP status codes to remove mysterious Grafana deployment errors.

How Has This Been Tested?

Applied to staging

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

@xav xav temporarily deployed to infra/prod July 4, 2023 15:22 — with GitHub Actions Inactive
@xav xav temporarily deployed to infra/staging July 4, 2023 15:22 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Show Plan

[command]/home/runner/work/_temp/16ebb49d-e757-470d-9127-089c0bf94763/terraform-bin -chdir=terraform show -no-color /tmp/plan.tfplan

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.monitoring.grafana_dashboard.main will be updated in-place
  ~ resource "grafana_dashboard" "main" {
      ~ config_json  = jsonencode(
          ~ {
              ~ panels        = [
                    {
                        collapsed  = false
                        datasource = {
                            type = "datasource"
                            uid  = "grafana"
                        }
                        gridPos    = {
                            h = 1
                            w = 24
                            x = 0
                            y = 0
                        }
                        targets    = [
                            {
                                datasource = {
                                    type = "datasource"
                                    uid  = "grafana"
                                }
                            },
                        ]
                        title      = "Application"
                        type       = "row"
                    },
                  ~ {
                      ~ alert         = {
                          ~ message             = "History - Prod - ECS - CPU utilization is high (over 70)" -> "History - Prod - ECS - CPU utilization is high (over 70%)"
                            name                = "History - Prod - ECS - CPU Utilization alert"
                            # (8 unchanged attributes hidden)
                        }
                        # (10 unchanged attributes hidden)
                    },
                  ~ {
                      ~ alert         = {
                          ~ message             = "History - Prod - Memory Utilization - Memory utilization is high (over 70)" -> "History - Prod - ECS - Memory utilization is high (over 70%)"
                          ~ name                = "History - Prod - Memory Utilization - Memory Utilization alert" -> "History - Prod - ECS - Memory Utilization alert"
                            # (8 unchanged attributes hidden)
                        }
                        # (10 unchanged attributes hidden)
                    },
                    {
                        collapsed  = false
                        datasource = {
                            type = "datasource"
                            uid  = "grafana"
                        }
                        gridPos    = {
                            h = 1
                            w = 24
                            x = 0
                            y = 9
                        }
                        targets    = [
                            {
                                datasource = {
                                    type = "datasource"
                                    uid  = "grafana"
                                }
                            },
                        ]
                        title      = "History"
                        type       = "row"
                    },
                    # (7 unchanged elements hidden)
                    {
                        datasource    = {
                            type = "cloudwatch"
                            uid  = "_8t9dnQ4k"
                        }
                        description   = null
                        fieldConfig   = {
                            defaults  = {
                                color      = {
                                    mode = "palette-classic"
                                }
                                custom     = {
                                    axisPlacement     = "auto"
                                    axisSoftMax       = 5
                                    axisSoftMin       = 0
                                    barAlignment      = 0
                                    drawStyle         = "line"
                                    fillOpacity       = 0
                                    gradientMode      = "none"
                                    lineInterpolation = "linear"
                                    lineWidth         = 1
                                    pointSize         = 5
                                    scaleDistribution = {
                                        type = "linear"
                                    }
                                    showPoints        = "auto"
                                    spanNulls         = false
                                    thresholdsStyle   = {
                                        mode = "off"
                                    }
                                }
                                mappings   = []
                                thresholds = {
                                    mode  = "absolute"
                                    steps = [
                                        {
                                            color = "green"
                                            value = null
                                        },
                                    ]
                                }
                            }
                            overrides = []
                        }
                        gridPos       = {
                            h = 8
                            w = 12
                            x = 12
                            y = 35
                        }
                        links         = []
                        options       = {
                            legend  = {
                                calcs       = []
                                displayMode = "list"
                                placement   = "bottom"
                            }
                            tooltip = {
                                mode = "multi"
                                sort = "none"
                            }
                        }
                        pluginVersion = "8.4.7"
                        targets       = [
                            {
                                datasource       = {
                                    type = "cloudwatch"
                                    uid  = "_8t9dnQ4k"
                                }
                                dimensions       = {
                                    TargetGroup = "targetgroup/walletconnect-prod-history/78b4a2bb7695306a"
                                }
                                expression       = ""
                                matchExact       = false
                                metricEditorMode = 0
                                metricName       = "HealthyHostCount"
                                metricQueryType  = 1
                                namespace        = "AWS/ApplicationELB"
                                period           = "auto"
                                queryMode        = "Metrics"
                                refId            = "A"
                                region           = "default"
                                sql              = {
                                    from   = {
                                        property = {
                                            name = "AWS/ApplicationELB"
                                            type = "string"
                                        }
                                        type     = "property"
                                    }
                                    select = {
                                        name       = "MAX"
                                        parameters = [
                                            {
                                                name = "HealthyHostCount"
                                                type = "functionParameter"
                                            },
                                        ]
                                        type       = "function"
                                    }
                                    where  = {
                                        expressions = [
                                            {
                                                operator = {
                                                    name  = "="
                                                    value = "app/walletconnect-prod-history/c55de72490c4a039"
                                                }
                                                property = {
                                                    name = "LoadBalancer"
                                                    type = "string"
                                                }
                                                type     = "operator"
                                            },
                                        ]
                                        type        = "and"
                                    }
                                }
                                sqlExpression    = "SELECT MAX(HealthyHostCount) FROM \"AWS/ApplicationELB\" WHERE LoadBalancer = 'app/walletconnect-prod-history/c55de72490c4a039'"
                                statistic        = "Maximum"
                            },
                        ]
                        title         = "Healthy Hosts"
                        type          = "timeseries"
                    },
                  ~ {
                      - collapsed     = false
                      ~ datasource    = {
                          ~ type = "datasource" -> "cloudwatch"
                          ~ uid  = "grafana" -> "_8t9dnQ4k"
                        }
                      + description   = null
                      + fieldConfig   = {
                          + defaults  = {
                              + color      = {
                                  + mode = "palette-classic"
                                }
                              + custom     = {
                                  + axisPlacement     = "auto"
                                  + barAlignment      = 0
                                  + drawStyle         = "line"
                                  + fillOpacity       = 0
                                  + gradientMode      = "none"
                                  + lineInterpolation = "linear"
                                  + lineWidth         = 1
                                  + pointSize         = 5
                                  + scaleDistribution = {
                                      + type = "linear"
                                    }
                                  + showPoints        = "auto"
                                  + spanNulls         = false
                                  + thresholdsStyle   = {
                                      + mode = "off"
                                    }
                                }
                              + mappings   = []
                              + thresholds = {
                                  + mode  = "absolute"
                                  + steps = [
                                      + {
                                          + color = "green"
                                          + value = null
                                        },
                                    ]
                                }
                            }
                          + overrides = []
                        }
                      ~ gridPos       = {
                          ~ h = 1 -> 8
                          ~ w = 24 -> 8
                            # (2 unchanged attributes hidden)
                        }
                      + links         = []
                      + options       = {
                          + legend  = {
                              + calcs       = []
                              + displayMode = "list"
                              + placement   = "bottom"
                            }
                          + tooltip = {
                              + mode = "multi"
                              + sort = "none"
                            }
                        }
                      + pluginVersion = "8.4.7"
                      ~ targets       = [
                          ~ {
                              + alias            = "Requests"
                              ~ datasource       = {
                                  ~ type = "datasource" -> "cloudwatch"
                                  ~ uid  = "grafana" -> "_8t9dnQ4k"
                                }
                              + dimensions       = {
                                  + LoadBalancer = "app/walletconnect-prod-history/c55de72490c4a039"
                                }
                              + expression       = ""
                              + matchExact       = true
                              + metricEditorMode = 0
                              + metricName       = "RequestCount"
                              + metricQueryType  = 0
                              + namespace        = "AWS/ApplicationELB"
                              + period           = "auto"
                              + queryMode        = "Metrics"
                              + refId            = "Requests"
                              + region           = "default"
                              + statistic        = "Sum"
                            },
                        ]
                      ~ title         = "Database" -> "Requests"
                      ~ type          = "row" -> "timeseries"
                    },
                  ~ {
                      - alert         = {
                          - alertRuleTags       = {}
                          - conditions          = [
                              - {
                                  - evaluator = {
                                      - params = [
                                          - 50,
                                        ]
                                      - type   = "gt"
                                    }
                                  - operator  = {
                                      - type = "or"
                                    }
                                  - query     = {
                                      - params = [
                                          - "CPU_Max",
                                          - "5m",
                                          - "now",
                                        ]
                                    }
                                  - reducer   = {
                                      - params = []
                                      - type   = "avg"
                                    }
                                  - type      = "query"
                                },
                            ]
                          - executionErrorState = "alerting"
                          - for                 = "5m"
                          - frequency           = "1m"
                          - handler             = 1
                          - message             = "History - prod DocumentDB CPU alert"
                          - name                = "History - prod DocumentDB CPU alert"
                          - noDataState         = "alerting"
                          - notifications       = []
                        }
                      + collapsed     = false
                      ~ datasource    = {
                          ~ type = "cloudwatch" -> "datasource"
                          ~ uid  = "_8t9dnQ4k" -> "grafana"
                        }
                      - description   = null
                      - fieldConfig   = {
                          - defaults  = {
                              - color      = {
                                  - mode = "palette-classic"
                                }
                              - custom     = {
                                  - axisPlacement     = "auto"
                                  - axisSoftMax       = 40
                                  - axisSoftMin       = 0
                                  - barAlignment      = 0
                                  - drawStyle         = "line"
                                  - fillOpacity       = 0
                                  - gradientMode      = "none"
                                  - lineInterpolation = "linear"
                                  - lineWidth         = 1
                                  - pointSize         = 5
                                  - scaleDistribution = {
                                      - type = "linear"
                                    }
                                  - showPoints        = "auto"
                                  - spanNulls         = false
                                  - thresholdsStyle   = {
                                      - mode = "area"
                                    }
                                }
                              - mappings   = []
                              - thresholds = {
                                  - mode  = "absolute"
                                  - steps = [
                                      - {
                                          - color = "green"
                                          - value = null
                                        },
                                      - {
                                          - color = "orange"
                                          - value = 40
                                        },
                                      - {
                                          - color = "red"
                                          - value = 70
                                        },
                                    ]
                                }
                              - unit       = "percent"
                            }
                          - overrides = []
                        }
                      ~ gridPos       = {
                          ~ h = 8 -> 1
                          ~ w = 8 -> 24
                          ~ y = 44 -> 51
                            # (1 unchanged attribute hidden)
                        }
                      - links         = []
                      - options       = {
                          - legend  = {
                              - calcs       = []
                              - displayMode = "list"
                              - placement   = "bottom"
                            }
                          - tooltip = {
                              - mode = "multi"
                              - sort = "none"
                            }
                        }
                      - pluginVersion = "8.4.7"
                      ~ targets       = [
                          ~ {
                              - alias            = "CPU (Max)"
                              ~ datasource       = {
                                  ~ type = "cloudwatch" -> "datasource"
                                  ~ uid  = "_8t9dnQ4k" -> "grafana"
                                }
                              - dimensions       = {
                                  - DBClusterIdentifier = "walletconnect-prod-history-history-db-primary"
                                }
                              - expression       = ""
                              - matchExact       = true
                              - metricEditorMode = 0
                              - metricName       = "CPUUtilization"
                              - metricQueryType  = 0
                              - namespace        = "AWS/DocDB"
                              - period           = "auto"
                              - queryMode        = "Metrics"
                              - refId            = "CPU_Max"
                              - region           = "default"
                              - statistic        = "Maximum"
                            },
                          - {
                              - alias            = "CPU (Avg)"
                              - datasource       = {
                                  - type = "cloudwatch"
                                  - uid  = "_8t9dnQ4k"
                                }
                              - dimensions       = {
                                  - DBClusterIdentifier = "walletconnect-prod-history-history-db-primary"
                                }
                              - expression       = ""
                              - matchExact       = true
                              - metricEditorMode = 0
                              - metricName       = "CPUUtilization"
                              - metricQueryType  = 0
                              - namespace        = "AWS/DocDB"
                              - period           = "auto"
                              - queryMode        = "Metrics"
                              - refId            = "CPU_Avg"
                              - region           = "default"
                              - statistic        = "Average"
                            },
                        ]
                      ~ title         = "CPU Utilization" -> "Database"
                      ~ type          = "timeseries" -> "row"
                    },
                  ~ {
                      ~ alert         = {
                          ~ conditions          = [
                              ~ {
                                  ~ evaluator = {
                                      ~ params = [
                                          - 4000000000,
                                          + 50,
                                        ]
                                      ~ type   = "lt" -> "gt"
                                    }
                                  ~ operator  = {
                                      ~ type = "and" -> "or"
                                    }
                                  ~ query     = {
                                      ~ params = [
                                          - "Mem_Avg",
                                          + "CPU_Max",
                                            "5m",
                                            # (1 unchanged element hidden)
                                        ]
                                    }
                                  ~ reducer   = {
                                      ~ type   = "min" -> "avg"
                                        # (1 unchanged attribute hidden)
                                    }
                                    # (1 unchanged attribute hidden)
                                },
                            ]
                          ~ message             = "History - prod DocumentDB Freeable Memory" -> "History - prod DocumentDB CPU alert"
                          ~ name                = "History - prod DocumentDB Freeable Memory Alert" -> "History - prod DocumentDB CPU alert"
                            # (7 unchanged attributes hidden)
                        }
                      ~ fieldConfig   = {
                          ~ defaults  = {
                              ~ custom     = {
                                  ~ axisSoftMax       = 16000000000 -> 40
                                    # (13 unchanged attributes hidden)
                                }
                              ~ thresholds = {
                                  + mode  = "absolute"
                                  ~ steps = [
                                      ~ {
                                          ~ color = "red" -> "green"
                                            # (1 unchanged attribute hidden)
                                        },
                                      ~ {
                                          ~ color = "green" -> "orange"
                                          ~ value = 4000000000 -> 40
                                        },
                                      + {
                                          + color = "red"
                                          + value = 70
                                        },
                                    ]
                                }
                              ~ unit       = "decbytes" -> "percent"
                                # (2 unchanged attributes hidden)
                            }
                          ~ overrides = [
                              - {
                                  - matcher    = {
                                      - id      = "byFrameRefID"
                                      - options = "Mem_Min"
                                    }
                                  - properties = [
                                      - {
                                          - id    = "color"
                                          - value = {
                                              - fixedColor = "dark-purple"
                                              - mode       = "fixed"
                                            }
                                        },
                                    ]
                                },
                              - {
                                  - matcher    = {
                                      - id      = "byFrameRefID"
                                      - options = "Mem_Avg"
                                    }
                                  - properties = [
                                      - {
                                          - id    = "color"
                                          - value = {
                                              - fixedColor = "purple"
                                              - mode       = "fixed"
                                            }
                                        },
                                    ]
                                },
                            ]
                        }
                      ~ gridPos       = {
                          ~ x = 8 -> 0
                          ~ y = 44 -> 52
                            # (2 unchanged attributes hidden)
                        }
                      ~ targets       = [
                          ~ {
                              ~ alias            = "Freeable Memory (Min)" -> "CPU (Max)"
                              ~ metricName       = "FreeableMemory" -> "CPUUtilization"
                              ~ refId            = "Mem_Min" -> "CPU_Max"
                              ~ statistic        = "Minimum" -> "Maximum"
                                # (10 unchanged attributes hidden)
                            },
                          ~ {
                              ~ alias            = "Freeable Memory (Avg)" -> "CPU (Avg)"
                              ~ metricName       = "FreeableMemory" -> "CPUUtilization"
                              ~ refId            = "Mem_Avg" -> "CPU_Avg"
                                # (11 unchanged attributes hidden)
                            },
                        ]
                      - thresholds    = [
                          - {
                              - colorMode = "critical"
                              - op        = "lt"
                              - value     = 4000000000
                              - visible   = true
                            },
                        ]
                      ~ title         = "Available Memory" -> "CPU Utilization"
                        # (6 unchanged attributes hidden)
                    },
                  ~ {
                      + alert         = {
                          + alertRuleTags       = {}
                          + conditions          = [
                              + {
                                  + evaluator = {
                                      + params = [
                                          + 4000000000,
                                        ]
                                      + type   = "lt"
                                    }
                                  + operator  = {
                                      + type = "and"
                                    }
                                  + query     = {
                                      + params = [
                                          + "Mem_Avg",
                                          + "5m",
                                          + "now",
                                        ]
                                    }
                                  + reducer   = {
                                      + params = []
                                      + type   = "min"
                                    }
                                  + type      = "query"
                                },
                            ]
                          + executionErrorState = "alerting"
                          + for                 = "5m"
                          + frequency           = "1m"
                          + handler             = 1
                          + message             = "History - prod DocumentDB Freeable Memory"
                          + name                = "History - prod DocumentDB Freeable Memory Alert"
                          + noDataState         = "alerting"
                          + notifications       = []
                        }
                      ~ fieldConfig   = {
                          ~ defaults  = {
                              ~ custom     = {
                                  + axisSoftMax       = 16000000000
                                  + axisSoftMin       = 0
                                  ~ thresholdsStyle   = {
                                      ~ mode = "off" -> "area"
                                    }
                                    # (11 unchanged attributes hidden)
                                }
                              ~ thresholds = {
                                  - mode  = "absolute"
                                  ~ steps = [
                                      ~ {
                                          ~ color = "green" -> "red"
                                            # (1 unchanged attribute hidden)
                                        },
                                      + {
                                          + color = "green"
                                          + value = 4000000000
                                        },
                                    ]
                                }
                              + unit       = "decbytes"
                                # (2 unchanged attributes hidden)
                            }
                          ~ overrides = [
                              + {
                                  + matcher    = {
                                      + id      = "byFrameRefID"
                                      + options = "Mem_Min"
                                    }
                                  + properties = [
                                      + {
                                          + id    = "color"
                                          + value = {
                                              + fixedColor = "dark-purple"
                                              + mode       = "fixed"
                                            }
                                        },
                                    ]
                                },
                              + {
                                  + matcher    = {
                                      + id      = "byFrameRefID"
                                      + options = "Mem_Avg"
                                    }
                                  + properties = [
                                      + {
                                          + id    = "color"
                                          + value = {
                                              + fixedColor = "purple"
                                              + mode       = "fixed"
                                            }
                                        },
                                    ]
                                },
                            ]
                        }
                      ~ gridPos       = {
                          ~ x = 16 -> 8
                          ~ y = 44 -> 52
                            # (2 unchanged attributes hidden)
                        }
                      ~ targets       = [
                          ~ {
                              ~ alias            = "Database Connections" -> "Freeable Memory (Min)"
                              ~ metricName       = "DatabaseConnections" -> "FreeableMemory"
                              ~ refId            = "A" -> "Mem_Min"
                              ~ statistic        = "Average" -> "Minimum"
                                # (10 unchanged attributes hidden)
                            },
                          + {
                              + alias            = "Freeable Memory (Avg)"
                              + datasource       = {
                                  + type = "cloudwatch"
                                  + uid  = "_8t9dnQ4k"
                                }
                              + dimensions       = {
                                  + DBClusterIdentifier = "walletconnect-prod-history-history-db-primary"
                                }
                              + expression       = ""
                              + matchExact       = true
                              + metricEditorMode = 0
                              + metricName       = "FreeableMemory"
                              + metricQueryType  = 0
                              + namespace        = "AWS/DocDB"
                              + period           = "auto"
                              + queryMode        = "Metrics"
                              + refId            = "Mem_Avg"
                              + region           = "default"
                              + statistic        = "Average"
                            },
                        ]
                      + thresholds    = [
                          + {
                              + colorMode = "critical"
                              + op        = "lt"
                              + value     = 4000000000
                              + visible   = true
                            },
                        ]
                      ~ title         = "Database Connections" -> "Available Memory"
                        # (6 unchanged attributes hidden)
                    },
                  ~ {
                      - alert         = {
                          - alertRuleTags       = {}
                          - conditions          = [
                              - {
                                  - evaluator = {
                                      - params = [
                                          - 2,
                                        ]
                                      - type   = "gt"
                                    }
                                  - operator  = {
                                      - type = "and"
                                    }
                                  - query     = {
                                      - params = [
                                          - "Ops_Max",
                                          - "5m",
                                          - "now",
                                        ]
                                    }
                                  - reducer   = {
                                      - params = []
                                      - type   = "max"
                                    }
                                  - type      = "query"
                                },
                            ]
                          - executionErrorState = "alerting"
                          - for                 = "5m"
                          - frequency           = "1m"
                          - handler             = 1
                          - message             = "History - prod DocumentDB LowMem Num Operations Throttled"
                          - name                = "History - prod DocumentDB LowMem Num Operations Throttled Alert"
                          - noDataState         = "alerting"
                          - notifications       = []
                        }
                      ~ fieldConfig   = {
                          ~ defaults  = {
                              ~ custom     = {
                                  - axisSoftMax       = 10
                                  - axisSoftMin       = 0
                                  ~ thresholdsStyle   = {
                                      ~ mode = "area" -> "off"
                                    }
                                    # (11 unchanged attributes hidden)
                                }
                              ~ thresholds = {
                                  ~ steps = [
                                        {
                                            color = "green"
                                            value = null
                                        },
                                      - {
                                          - color = "red"
                                          - value = 2
                                        },
                                    ]
                                    # (1 unchanged attribute hidden)
                                }
                                # (2 unchanged attributes hidden)
                            }
                          ~ overrides = [
                              - {
                                  - matcher    = {
                                      - id      = "byFrameRefID"
                                      - options = "Ops_Max"
                                    }
                                  - properties = [
                                      - {
                                          - id    = "color"
                                          - value = {
                                              - fixedColor = "red"
                                              - mode       = "fixed"
                                            }
                                        },
                                    ]
                                },
                            ]
                        }
                      ~ gridPos       = {
                          ~ x = 0 -> 16
                            # (3 unchanged attributes hidden)
                        }
                      ~ targets       = [
                          ~ {
                              ~ alias            = "LowMem Num Operations Throttled (Avg)" -> "Database Connections"
                              ~ metricName       = "LowMemNumOperationsThrottled" -> "DatabaseConnections"
                              ~ refId            = "Ops_Max" -> "A"
                              ~ statistic        = "Maximum" -> "Average"
                                # (10 unchanged attributes hidden)
                            },
                        ]
                      ~ title         = "LowMem Num Operations Throttled" -> "Database Connections"
                        # (6 unchanged attributes hidden)
                    },
                  ~ {
                      + alert         = {
                          + alertRuleTags       = {}
                          + conditions          = [
                              + {
                                  + evaluator = {
                                      + params = [
                                          + 2,
                                        ]
                                      + type   = "gt"
                                    }
                                  + operator  = {
                                      + type = "and"
                                    }
                                  + query     = {
                                      + params = [
                                          + "Ops_Max",
                                          + "5m",
                                          + "now",
                                        ]
                                    }
                                  + reducer   = {
                                      + params = []
                                      + type   = "max"
                                    }
                                  + type      = "query"
                                },
                            ]
                          + executionErrorState = "alerting"
                          + for                 = "5m"
                          + frequency           = "1m"
                          + handler             = 1
                          + message             = "History - prod DocumentDB LowMem Num Operations Throttled"
                          + name                = "History - prod DocumentDB LowMem Num Operations Throttled Alert"
                          + noDataState         = "alerting"
                          + notifications       = []
                        }
                      ~ description   = "Max is 64TB" -> null
                      ~ fieldConfig   = {
                          ~ defaults  = {
                              ~ custom     = {
                                  + axisSoftMax       = 10
                                  + axisSoftMin       = 0
                                  ~ spanNulls         = true -> false
                                  ~ thresholdsStyle   = {
                                      ~ mode = "off" -> "area"
                                    }
                                    # (10 unchanged attributes hidden)
                                }
                              ~ thresholds = {
                                  ~ steps = [
                                        {
                                            color = "green"
                                            value = null
                                        },
                                      ~ {
                                          ~ value = 40000000000000 -> 2
                                            # (1 unchanged attribute hidden)
                                        },
                                    ]
                                    # (1 unchanged attribute hidden)
                                }
                              - unit       = "decbytes"
                                # (2 unchanged attributes hidden)
                            }
                          ~ overrides = [
                              + {
                                  + matcher    = {
                                      + id      = "byFrameRefID"
                                      + options = "Ops_Max"
                                    }
                                  + properties = [
                                      + {
                                          + id    = "color"
                                          + value = {
                                              + fixedColor = "red"
                                              + mode       = "fixed"
                                            }
                                        },
                                    ]
                                },
                            ]
                        }
                      ~ gridPos       = {
                          ~ x = 8 -> 0
                          ~ y = 52 -> 60
                            # (2 unchanged attributes hidden)
                        }
                      ~ targets       = [
                          ~ {
                              + alias            = "LowMem Num Operations Throttled (Avg)"
                              ~ matchExact       = false -> true
                              ~ metricName       = "VolumeBytesUsed" -> "LowMemNumOperationsThrottled"
                              ~ refId            = "A" -> "Ops_Max"
                                # (10 unchanged attributes hidden)
                            },
                        ]
                      ~ title         = "DocumentDB Volume" -> "LowMem Num Operations Throttled"
                        # (5 unchanged attributes hidden)
                    },
                  ~ {
                      ~ description   = "See https://docs.aws.amazon.com/documentdb/latest/developerguide/best_practices.html" -> "Max is 64TB"
                      ~ fieldConfig   = {
                          ~ defaults  = {
                              ~ custom     = {
                                  - axisSoftMax       = 100
                                  - axisSoftMin       = 90
                                  ~ spanNulls         = false -> true
                                    # (11 unchanged attributes hidden)
                                }
                              ~ thresholds = {
                                  ~ steps = [
                                        {
                                            color = "green"
                                            value = null
                                        },
                                      + {
                                          + color = "red"
                                          + value = 40000000000000
                                        },
                                    ]
                                    # (1 unchanged attribute hidden)
                                }
                              ~ unit       = "percent" -> "decbytes"
                                # (2 unchanged attributes hidden)
                            }
                            # (1 unchanged attribute hidden)
                        }
                      ~ gridPos       = {
                          ~ x = 16 -> 8
                          ~ y = 52 -> 60
                            # (2 unchanged attributes hidden)
                        }
                      ~ targets       = [
                          ~ {
                              - alias            = "Average Cache Hit %"
                              ~ matchExact       = true -> false
                              ~ metricName       = "BufferCacheHitRatio" -> "VolumeBytesUsed"
                              ~ statistic        = "Average" -> "Maximum"
                                # (10 unchanged attributes hidden)
                            },
                        ]
                      ~ title         = "DocumentDB Buffer Cache Hit Ratio" -> "DocumentDB Volume"
                        # (5 unchanged attributes hidden)
                    },
                  + {
                      + datasource    = {
                          + type = "cloudwatch"
                          + uid  = "_8t9dnQ4k"
                        }
                      + description   = "See https://docs.aws.amazon.com/documentdb/latest/developerguide/best_practices.html"
                      + fieldConfig   = {
                          + defaults  = {
                              + color      = {
                                  + mode = "palette-classic"
                                }
                              + custom     = {
                                  + axisPlacement     = "auto"
                                  + axisSoftMax       = 100
                                  + axisSoftMin       = 90
                                  + barAlignment      = 0
                                  + drawStyle         = "line"
                                  + fillOpacity       = 0
                                  + gradientMode      = "none"
                                  + lineInterpolation = "linear"
                                  + lineWidth         = 1
                                  + pointSize         = 5
                                  + scaleDistribution = {
                                      + type = "linear"
                                    }
                                  + showPoints        = "auto"
                                  + spanNulls         = false
                                  + thresholdsStyle   = {
                                      + mode = "off"
                                    }
                                }
                              + mappings   = []
                              + thresholds = {
                                  + mode  = "absolute"
                                  + steps = [
                                      + {
                                          + color = "green"
                                          + value = null
                                        },
                                    ]
                                }
                              + unit       = "percent"
                            }
                          + overrides = []
                        }
                      + gridPos       = {
                          + h = 8
                          + w = 8
                          + x = 16
                          + y = 60
                        }
                      + links         = []
                      + options       = {
                          + legend  = {
                              + calcs       = []
                              + displayMode = "list"
                              + placement   = "bottom"
                            }
                          + tooltip = {
                              + mode = "multi"
                              + sort = "none"
                            }
                        }
                      + pluginVersion = "8.4.7"
                      + targets       = [
                          + {
                              + alias            = "Average Cache Hit %"
                              + datasource       = {
                                  + type = "cloudwatch"
                                  + uid  = "_8t9dnQ4k"
                                }
                              + dimensions       = {
                                  + DBClusterIdentifier = "walletconnect-prod-history-history-db-primary"
                                }
                              + expression       = ""
                              + matchExact       = true
                              + metricEditorMode = 0
                              + metricName       = "BufferCacheHitRatio"
                              + metricQueryType  = 0
                              + namespace        = "AWS/DocDB"
                              + period           = "auto"
                              + queryMode        = "Metrics"
                              + refId            = "A"
                              + region           = "default"
                              + statistic        = "Average"
                            },
                        ]
                      + title         = "DocumentDB Buffer Cache Hit Ratio"
                      + type          = "timeseries"
                    },
                ]
                tags          = []
                # (19 unchanged attributes hidden)
            }
        )
        id           = "0:prod-history"
        # (7 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
::debug::Terraform exited with code 0.
::debug::stdout: %0ATerraform used the selected providers to generate the following execution%0Aplan. Resource actions are indicated with the following symbols:%0A  ~ update in-place%0A%0ATerraform will perform the following actions:%0A%0A  # module.monitoring.grafana_dashboard.main will be updated in-place%0A  ~ resource "grafana_dashboard" "main" {%0A      ~ config_json  = jsonencode(%0A          ~ {%0A              ~ panels        = [%0A                    {%0A                        collapsed  = false%0A                        datasource = {%0A                            type = "datasource"%0A                            uid  = "grafana"%0A                        }%0A                        gridPos    = {%0A                            h = 1%0A                            w = 24%0A                            x = 0%0A                            y = 0%0A                        }%0A                        targets    = [%0A                            {%0A                                datasource = {%0A                                    type = "datasource"%0A                                    uid  = "grafana"%0A                                }%0A                            },%0A                        ]%0A                        title      = "Application"%0A                        type       = "row"%0A                    },%0A                  ~ {%0A                      ~ alert         = {%0A                          ~ message             = "History - Prod - ECS - CPU utilization is high (over 70)" -> "History - Prod - ECS - CPU utilization is high (over 70%25)"%0A                            name                = "History - Prod - ECS - CPU Utilization alert"%0A                            # (8 unchanged attributes hidden)%0A                        }%0A                        # (10 unchanged attributes hidden)%0A                    },%0A                  ~ {%0A                      ~ alert         = {%0A                          ~ message             = "History - Prod - Memory Utilization - Memory utilization is high (over 70)" -> "History - Prod - ECS - Memory utilization is high (over 70%25)"%0A                          ~ name                = "History - Prod - Memory Utilization - Memory Utilization alert" -> "History - Prod - ECS - Memory Utilization alert"%0A                            # (8 unchanged attributes hidden)%0A                        }%0A                        # (10 unchanged attributes hidden)%0A                    },%0A                    {%0A                        collapsed  = false%0A                        datasource = {%0A                            type = "datasource"%0A                            uid  = "grafana"%0A                        }%0A                        gridPos    = {%0A                            h = 1%0A                            w = 24%0A                            x = 0%0A                            y = 9%0A                        }%0A                        targets    = [%0A                            {%0A                                datasource = {%0A                                    type = "datasource"%0A                                    uid  = "grafana"%0A                                }%0A                            },%0A                        ]%0A                        title      = "History"%0A                        type       = "row"%0A                    },%0A                    # (7 unchanged elements hidden)%0A                    {%0A                        datasource    = {%0A                            type = "cloudwatch"%0A                            uid  = "_8t9dnQ4k"%0A                        }%0A                        description   = null%0A                        fieldConfig   = {%0A                            defaults  = {%0A                                color      = {%0A                                    mode = "palette-classic"%0A                                }%0A                                custom     = {%0A                                    axisPlacement     = "auto"%0A                                    axisSoftMax       = 5%0A                                    axisSoftMin       = 0%0A                                    barAlignment      = 0%0A                                    drawStyle         = "line"%0A                                    fillOpacity       = 0%0A                                    gradientMode      = "none"%0A                                    lineInterpolation = "linear"%0A                                    lineWidth         = 1%0A                                    pointSize         = 5%0A                                    scaleDistribution = {%0A                                        type = "linear"%0A                                    }%0A                                    showPoints        = "auto"%0A                                    spanNulls         = false%0A                                    thresholdsStyle   = {%0A                                        mode = "off"%0A                                    }%0A                                }%0A                                mappings   = []%0A                                thresholds = {%0A                                    mode  = "absolute"%0A                                    steps = [%0A                                        {%0A                                            color = "green"%0A                                            value = null%0A                                        },%0A                                    ]%0A                                }%0A                            }%0A                            overrides = []%0A                        }%0A                        gridPos       = {%0A                            h = 8%0A                            w = 12%0A                            x = 12%0A                            y = 35%0A                        }%0A                        links         = []%0A                        options       = {%0A                            legend  = {%0A                                calcs       = []%0A                                displayMode = "list"%0A                                placement   = "bottom"%0A                            }%0A                            tooltip = {%0A                                mode = "multi"%0A                                sort = "none"%0A                            }%0A                        }%0A                        pluginVersion = "8.4.7"%0A                        targets       = [%0A                            {%0A                                datasource       = {%0A                                    type = "cloudwatch"%0A                                    uid  = "_8t9dnQ4k"%0A                                }%0A                                dimensions       = {%0A                                    TargetGroup = "targetgroup/walletconnect-prod-history/78b4a2bb7695306a"%0A                                }%0A                                expression       = ""%0A                                matchExact       = false%0A                                metricEditorMode = 0%0A                                metricName       = "HealthyHostCount"%0A                                metricQueryType  = 1%0A                                namespace        = "AWS/ApplicationELB"%0A                                period           = "auto"%0A                                queryMode        = "Metrics"%0A                                refId            = "A"%0A                                region           = "default"%0A                                sql              = {%0A                                    from   = {%0A                                        property = {%0A                                            name = "AWS/ApplicationELB"%0A                                            type = "string"%0A                                        }%0A                                        type     = "property"%0A                                    }%0A                                    select = {%0A                                        name       = "MAX"%0A                                        parameters = [%0A                                            {%0A                                                name = "HealthyHostCount"%0A                                                type = "functionParameter"%0A                                            },%0A                                        ]%0A                                        type       = "function"%0A                                    }%0A                                    where  = {%0A                                        expressions = [%0A                                            {%0A                                                operator = {%0A                                                    name  = "="%0A                                                    value = "app/walletconnect-prod-history/c55de72490c4a039"%0A                                                }%0A                                                property = {%0A                                                    name = "LoadBalancer"%0A                                                    type = "string"%0A                                                }%0A                                                type     = "operator"%0A                                            },%0A                                        ]%0A                                        type        = "and"%0A                                    }%0A                                }%0A                                sqlExpression    = "SELECT MAX(HealthyHostCount) FROM \"AWS/ApplicationELB\" WHERE LoadBalancer = 'app/walletconnect-prod-history/c55de72490c4a039'"%0A                                statistic        = "Maximum"%0A                            },%0A                        ]%0A                        title         = "Healthy Hosts"%0A                        type          = "timeseries"%0A                    },%0A                  ~ {%0A                      - collapsed     = false%0A                      ~ datasource    = {%0A                          ~ type = "datasource" -> "cloudwatch"%0A                          ~ uid  = "grafana" -> "_8t9dnQ4k"%0A                        }%0A                      + description   = null%0A                      + fieldConfig   = {%0A                          + defaults  = {%0A                              + color      = {%0A                                  + mode = "palette-classic"%0A                                }%0A                              + custom     = {%0A                                  + axisPlacement     = "auto"%0A                                  + barAlignment      = 0%0A                                  + drawStyle         = "line"%0A                                  + fillOpacity       = 0%0A                                  + gradientMode      = "none"%0A                                  + lineInterpolation = "linear"%0A                                  + lineWidth         = 1%0A                                  + pointSize         = 5%0A                                  + scaleDistribution = {%0A                                      + type = "linear"%0A                                    }%0A                                  + showPoints        = "auto"%0A                                  + spanNulls         = false%0A                                  + thresholdsStyle   = {%0A                                      + mode = "off"%0A                                    }%0A                                }%0A                              + mappings   = []%0A                              + thresholds = {%0A                                  + mode  = "absolute"%0A                                  + steps = [%0A                                      + {%0A                                          + color = "green"%0A                                          + value = null%0A                                        },%0A                                    ]%0A                                }%0A                            }%0A                          + overrides = []%0A                        }%0A                      ~ gridPos       = {%0A                          ~ h = 1 -> 8%0A                          ~ w = 24 -> 8%0A                            # (2 unchanged attributes hidden)%0A                        }%0A                      + links         = []%0A                      + options       = {%0A                          + legend  = {%0A                              + calcs       = []%0A                              + displayMode = "list"%0A                              + placement   = "bottom"%0A                            }%0A                          + tooltip = {%0A                              + mode = "multi"%0A                              + sort = "none"%0A                            }%0A                        }%0A                      + plug
...

Action: pull_request

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Show Plan

[command]/home/runner/work/_temp/9189a93d-32d7-42a9-96e5-5fd7cd9997e5/terraform-bin -chdir=terraform show -no-color /tmp/plan.tfplan

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.
::debug::Terraform exited with code 0.
::debug::stdout: %0ANo changes. Your infrastructure matches the configuration.%0A%0ATerraform has compared your real infrastructure against your configuration%0Aand found no differences, so no changes are needed.%0A
::debug::stderr: 
::debug::exitcode: 0

Action: pull_request

@xav xav merged commit 423ab4e into main Jul 4, 2023
@xav xav deleted the fix/grafana branch July 4, 2023 15:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant