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

fix: lb metrics #36

Merged
merged 1 commit into from
Jun 7, 2023
Merged

fix: lb metrics #36

merged 1 commit into from
Jun 7, 2023

Conversation

xav
Copy link
Contributor

@xav xav commented Jun 7, 2023

Description

Fix healthy hosts count and add active connections

How Has This Been Tested?

Not tested

Due Diligence

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

@xav xav temporarily deployed to infra/prod June 7, 2023 14:37 — with GitHub Actions Inactive
@xav xav temporarily deployed to infra/staging June 7, 2023 14:37 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

Show Plan

[command]/home/runner/work/_temp/e26ca5a0-bdfb-4faf-8d62-6b9f87272101/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        = [
                    # (9 unchanged elements hidden)
                    {
                        collapsed  = false
                        datasource = {
                            type = "datasource"
                            uid  = "grafana"
                        }
                        gridPos    = {
                            h = 1
                            w = 24
                            x = 0
                            y = 34
                        }
                        targets    = [
                            {
                                datasource = {
                                    type = "datasource"
                                    uid  = "grafana"
                                }
                            },
                        ]
                        title      = "Load Balancer"
                        type       = "row"
                    },
                  ~ {
                      ~ fieldConfig   = {
                          ~ defaults  = {
                              ~ custom     = {
                                  - axisSoftMax       = 5
                                  - axisSoftMin       = 0
                                    # (12 unchanged attributes hidden)
                                }
                                # (3 unchanged attributes hidden)
                            }
                            # (1 unchanged attribute hidden)
                        }
                      ~ targets       = [
                          ~ {
                              - alias            = "eu-central-1"
                              ~ dimensions       = {
                                  + LoadBalancer = "app/walletconnect-staging-history/60b171566a3acf0a"
                                  - TargetGroup  = "targetgroup/walletconnect-staging-history/eadfa45347d00c71"
                                }
                              ~ metricName       = "HealthyHostCount" -> "ActiveConnectionCount"
                              ~ metricQueryType  = 1 -> 0
                              ~ namespace        = "AWS/NetworkELB" -> "AWS/ApplicationELB"
                              - sql              = {
                                  - from   = {
                                      - property = {
                                          - name = "AWS/NetworkELB"
                                          - type = "string"
                                        }
                                      - type     = "property"
                                    }
                                  - select = {
                                      - name       = "MAX"
                                      - parameters = [
                                          - {
                                              - name = "HealthyHostCount"
                                              - type = "functionParameter"
                                            },
                                        ]
                                      - type       = "function"
                                    }
                                  - where  = {
                                      - expressions = [
                                          - {
                                              - operator = {
                                                  - name  = "="
                                                  - value = "app/walletconnect-staging-history/60b171566a3acf0a"
                                                }
                                              - property = {
                                                  - name = "LoadBalancer"
                                                  - type = "string"
                                                }
                                              - type     = "operator"
                                            },
                                        ]
                                      - type        = "and"
                                    }
                                }
                              - sqlExpression    = "SELECT MAX(HealthyHostCount) FROM \"AWS/NetworkELB\" WHERE LoadBalancer = 'app/walletconnect-staging-history/60b171566a3acf0a'"
                              ~ statistic        = "Maximum" -> "Average"
                                # (8 unchanged attributes hidden)
                            },
                        ]
                      ~ title         = "Healthy Hosts" -> "Active Connections"
                        # (7 unchanged attributes hidden)
                    },
                  + {
                      + datasource    = {
                          + type = "cloudwatch"
                          + uid  = "W73r_t_4k"
                        }
                      + 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  = "W73r_t_4k"
                                }
                              + dimensions       = {
                                  + TargetGroup = "targetgroup/walletconnect-staging-history/eadfa45347d00c71"
                                }
                              + 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-staging-history/60b171566a3acf0a"
                                                }
                                              + property = {
                                                  + name = "LoadBalancer"
                                                  + type = "string"
                                                }
                                              + type     = "operator"
                                            },
                                        ]
                                      + type        = "and"
                                    }
                                }
                              + sqlExpression    = "SELECT MAX(HealthyHostCount) FROM \"AWS/ApplicationELB\" WHERE LoadBalancer = 'app/walletconnect-staging-history/60b171566a3acf0a'"
                              + statistic        = "Maximum"
                            },
                        ]
                      + title         = "Healthy Hosts"
                      + type          = "timeseries"
                    },
                    {
                        collapsed  = false
                        datasource = {
                            type = "datasource"
                            uid  = "grafana"
                        }
                        gridPos    = {
                            h = 1
                            w = 24
                            x = 0
                            y = 43
                        }
                        targets    = [
                            {
                                datasource = {
                                    type = "datasource"
                                    uid  = "grafana"
                                }
                            },
                        ]
                        title      = "Database"
                        type       = "row"
                    },
                    # (6 unchanged elements hidden)
                ]
                tags          = []
                # (19 unchanged attributes hidden)
            }
        )
        id           = "0:staging-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                    # (9 unchanged elements hidden)%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 = 34%0A                        }%0A                        targets    = [%0A                            {%0A                                datasource = {%0A                                    type = "datasource"%0A                                    uid  = "grafana"%0A                                }%0A                            },%0A                        ]%0A                        title      = "Load Balancer"%0A                        type       = "row"%0A                    },%0A                  ~ {%0A                      ~ fieldConfig   = {%0A                          ~ defaults  = {%0A                              ~ custom     = {%0A                                  - axisSoftMax       = 5%0A                                  - axisSoftMin       = 0%0A                                    # (12 unchanged attributes hidden)%0A                                }%0A                                # (3 unchanged attributes hidden)%0A                            }%0A                            # (1 unchanged attribute hidden)%0A                        }%0A                      ~ targets       = [%0A                          ~ {%0A                              - alias            = "eu-central-1"%0A                              ~ dimensions       = {%0A                                  + LoadBalancer = "app/walletconnect-staging-history/60b171566a3acf0a"%0A                                  - TargetGroup  = "targetgroup/walletconnect-staging-history/eadfa45347d00c71"%0A                                }%0A                              ~ metricName       = "HealthyHostCount" -> "ActiveConnectionCount"%0A                              ~ metricQueryType  = 1 -> 0%0A                              ~ namespace        = "AWS/NetworkELB" -> "AWS/ApplicationELB"%0A                              - sql              = {%0A                                  - from   = {%0A                                      - property = {%0A                                          - name = "AWS/NetworkELB"%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-staging-history/60b171566a3acf0a"%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/NetworkELB\" WHERE LoadBalancer = 'app/walletconnect-staging-history/60b171566a3acf0a'"%0A                              ~ statistic        = "Maximum" -> "Average"%0A                                # (8 unchanged attributes hidden)%0A                            },%0A                        ]%0A                      ~ title         = "Healthy Hosts" -> "Active Connections"%0A                        # (7 unchanged attributes hidden)%0A                    },%0A                  + {%0A                      + datasource    = {%0A                          + type = "cloudwatch"%0A                          + uid  = "W73r_t_4k"%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  = "W73r_t_4k"%0A                                }%0A                              + dimensions       = {%0A                                  + TargetGroup = "targetgroup/walletconnect-staging-history/eadfa45347d00c71"%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-staging-history/60b171566a3acf0a"%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-staging-history/60b171566a3acf0a'"%0A                              + statistic        = "Maximum"%0A                            },%0A                        ]%0A                      + title         = "Healthy Hosts"%0A                      + type          = "timeseries"%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 = 43%0A                        }%0A                        targets    = [%0A                            {%0A                                datasource = {%0A                                    type = "datasource"%0A                                    uid  = "grafana"%0A                                }%0A                            },%0A                        ]%0A                        title      = "Database"%0A                        type       = "row"%0A                    },%0A                    # (6 unchanged elements hidden)%0A                ]%0A                tags          = []%0A                # (19 unchanged attributes hidden)%0A            }%0A        )%0A        id           = "0:staging-history"%0A        # (7 unchanged attributes hidden)%0A    }%0A%0APlan: 0 to add, 1 to change, 0 to destroy.%0A
::debug::stderr: 
::debug::exitcode: 0

Action: pull_request

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

Show Plan

[command]/home/runner/work/_temp/0ef6a48d-1ae8-4ea4-ac14-8ce065769dc7/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        = [
                    # (9 unchanged elements hidden)
                    {
                        collapsed  = false
                        datasource = {
                            type = "datasource"
                            uid  = "grafana"
                        }
                        gridPos    = {
                            h = 1
                            w = 24
                            x = 0
                            y = 34
                        }
                        targets    = [
                            {
                                datasource = {
                                    type = "datasource"
                                    uid  = "grafana"
                                }
                            },
                        ]
                        title      = "Load Balancer"
                        type       = "row"
                    },
                  ~ {
                      ~ fieldConfig   = {
                          ~ defaults  = {
                              ~ custom     = {
                                  - axisSoftMax       = 5
                                  - axisSoftMin       = 0
                                    # (12 unchanged attributes hidden)
                                }
                                # (3 unchanged attributes hidden)
                            }
                            # (1 unchanged attribute hidden)
                        }
                      ~ targets       = [
                          ~ {
                              - alias            = "eu-central-1"
                              ~ dimensions       = {
                                  + LoadBalancer = "app/walletconnect-prod-history/c55de72490c4a039"
                                  - TargetGroup  = "targetgroup/walletconnect-prod-history/78b4a2bb7695306a"
                                }
                              ~ metricName       = "HealthyHostCount" -> "ActiveConnectionCount"
                              ~ metricQueryType  = 1 -> 0
                              ~ namespace        = "AWS/NetworkELB" -> "AWS/ApplicationELB"
                              - sql              = {
                                  - from   = {
                                      - property = {
                                          - name = "AWS/NetworkELB"
                                          - 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/NetworkELB\" WHERE LoadBalancer = 'app/walletconnect-prod-history/c55de72490c4a039'"
                              ~ statistic        = "Maximum" -> "Average"
                                # (8 unchanged attributes hidden)
                            },
                        ]
                      ~ title         = "Healthy Hosts" -> "Active Connections"
                        # (7 unchanged attributes 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"
                            uid  = "grafana"
                        }
                        gridPos    = {
                            h = 1
                            w = 24
                            x = 0
                            y = 43
                        }
                        targets    = [
                            {
                                datasource = {
                                    type = "datasource"
                                    uid  = "grafana"
                                }
                            },
                        ]
                        title      = "Database"
                        type       = "row"
                    },
                    # (6 unchanged elements hidden)
                ]
                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                    # (9 unchanged elements hidden)%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 = 34%0A                        }%0A                        targets    = [%0A                            {%0A                                datasource = {%0A                                    type = "datasource"%0A                                    uid  = "grafana"%0A                                }%0A                            },%0A                        ]%0A                        title      = "Load Balancer"%0A                        type       = "row"%0A                    },%0A                  ~ {%0A                      ~ fieldConfig   = {%0A                          ~ defaults  = {%0A                              ~ custom     = {%0A                                  - axisSoftMax       = 5%0A                                  - axisSoftMin       = 0%0A                                    # (12 unchanged attributes hidden)%0A                                }%0A                                # (3 unchanged attributes hidden)%0A                            }%0A                            # (1 unchanged attribute hidden)%0A                        }%0A                      ~ targets       = [%0A                          ~ {%0A                              - alias            = "eu-central-1"%0A                              ~ dimensions       = {%0A                                  + LoadBalancer = "app/walletconnect-prod-history/c55de72490c4a039"%0A                                  - TargetGroup  = "targetgroup/walletconnect-prod-history/78b4a2bb7695306a"%0A                                }%0A                              ~ metricName       = "HealthyHostCount" -> "ActiveConnectionCount"%0A                              ~ metricQueryType  = 1 -> 0%0A                              ~ namespace        = "AWS/NetworkELB" -> "AWS/ApplicationELB"%0A                              - sql              = {%0A                                  - from   = {%0A                                      - property = {%0A                                          - name = "AWS/NetworkELB"%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/NetworkELB\" WHERE LoadBalancer = 'app/walletconnect-prod-history/c55de72490c4a039'"%0A                              ~ statistic        = "Maximum" -> "Average"%0A                                # (8 unchanged attributes hidden)%0A                            },%0A                        ]%0A                      ~ title         = "Healthy Hosts" -> "Active Connections"%0A                        # (7 unchanged attributes hidden)%0A                    },%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"%0A                            uid  = "grafana"%0A                        }%0A                        gridPos    = {%0A                            h = 1%0A                            w = 24%0A                            x = 0%0A                            y = 43%0A                        }%0A                        targets    = [%0A                            {%0A                                datasource = {%0A                                    type = "datasource"%0A                                    uid  = "grafana"%0A                                }%0A                            },%0A                        ]%0A                        title      = "Database"%0A                        type       = "row"%0A                    },%0A                    # (6 unchanged elements hidden)%0A                ]%0A                tags          = []%0A                # (19 unchanged attributes hidden)%0A            }%0A        )%0A        id           = "0:prod-history"%0A        # (7 unchanged attributes hidden)%0A    }%0A%0APlan: 0 to add, 1 to change, 0 to destroy.%0A
::debug::stderr: 
::debug::exitcode: 0

Action: pull_request

@xav xav added this pull request to the merge queue Jun 7, 2023
Merged via the queue into main with commit f73f16c Jun 7, 2023
@xav xav deleted the fix/metrics branch June 7, 2023 14:45
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