Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: client registrations chart #332

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

chris13524
Copy link
Member

@chris13524 chris13524 commented May 17, 2024

Description

This chart is confusing since it shows registrations over the past hour, but per sec or per rate interval is really what we care about.

Also it was an up/down counter which was strange and the Grafana didn't like with that (it was warning). Moving to only-up counter to get us closer to a req/s i.e. understanding of load vs the arbitrary amount of registrations we currently have.

How Has This Been Tested?

Not tested

Due Diligence

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

@chris13524 chris13524 self-assigned this May 17, 2024
@arein arein added the accepted The issue has been accepted into the project label May 17, 2024
Copy link
Contributor

@geekbrother geekbrother left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes!

Copy link
Contributor

Show Plan

[command]/home/runner/work/_temp/93e81935-ba65-49ce-89de-3af74f9e0332/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
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.ecs.aws_ecs_service.app_service will be updated in-place
  ~ resource "aws_ecs_service" "app_service" {
        id                                 = "arn:aws:ecs:eu-central-1:898587786287:service/staging-push/staging-push-service"
        name                               = "staging-push-service"
        tags                               = {}
      ~ task_definition                    = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push:185" -> (known after apply)
        # (15 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.ecs.aws_ecs_task_definition.app_task_definition must be replaced
-/+ resource "aws_ecs_task_definition" "app_task_definition" {
      ~ arn                      = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push:185" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push" -> (known after apply)
      ~ container_definitions    = (sensitive value) # forces replacement
      ~ id                       = "staging-push" -> (known after apply)
      ~ revision                 = 185 -> (known after apply)
      - tags                     = {} -> null
        # (11 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.monitoring.grafana_dashboard.at_a_glance will be updated in-place
  ~ resource "grafana_dashboard" "at_a_glance" {
      ~ config_json  = jsonencode(
          ~ {
              ~ panels               = [
                    {
                        datasource    = {
                            type = "prometheus"
                            uid  = "LAMKK7wVz"
                        }
                        description   = ""
                        fieldConfig   = {
                            defaults  = {
                                color      = {
                                    mode = "thresholds"
                                }
                                mappings   = []
                                thresholds = {
                                    mode  = "absolute"
                                    steps = [
                                        {
                                            color = "green"
                                            value = null
                                        },
                                    ]
                                }
                            }
                            overrides = []
                        }
                        gridPos       = {
                            h = 8
                            w = 11
                            x = 0
                            y = 0
                        }
                        options       = {
                            colorMode     = "value"
                            graphMode     = "area"
                            justifyMode   = "auto"
                            orientation   = "auto"
                            reduceOptions = {
                                calcs  = [
                                    "lastNotNull",
                                ]
                                fields = ""
                                values = false
                            }
                            text          = {}
                            textMode      = "auto"
                        }
                        pluginVersion = "8.4.7"
                        targets       = [
                            {
                                datasource   = {
                                    type = "prometheus"
                                    uid  = "LAMKK7wVz"
                                }
                                expr         = "sum(rate(received_notifications{}[1h]))"
                                legendFormat = "__auto"
                                refId        = "Received"
                            },
                            {
                                datasource   = {
                                    type = "prometheus"
                                    uid  = "LAMKK7wVz"
                                }
                                editorMode   = "code"
                                expr         = "sum(increase(sent_apns_notifications{}[1h]))"
                                hide         = false
                                legendFormat = "__auto"
                                range        = true
                                refId        = "SentAPNS"
                            },
                            {
                                datasource   = {
                                    type = "prometheus"
                                    uid  = "LAMKK7wVz"
                                }
                                editorMode   = "code"
                                expr         = "sum(increase(sent_fcm_notifications{}[1h]))"
                                hide         = false
                                legendFormat = "__auto"
                                range        = true
                                refId        = "SentFCM"
                            },
                        ]
                        title         = "Notifications per Hour"
                        type          = "stat"
                    },
                  - {
                      - datasource    = {
                          - type = "prometheus"
                          - uid  = "LAMKK7wVz"
                        }
                      - fieldConfig   = {
                          - defaults  = {
                              - color      = {
                                  - mode = "thresholds"
                                }
                              - mappings   = []
                              - thresholds = {
                                  - mode  = "absolute"
                                  - steps = [
                                      - {
                                          - color = "green"
                                          - value = null
                                        },
                                      - {
                                          - color = "red"
                                          - value = 80
                                        },
                                    ]
                                }
                            }
                          - overrides = []
                        }
                      - gridPos       = {
                          - h = 8
                          - w = 10
                          - x = 11
                          - y = 0
                        }
                      - options       = {
                          - colorMode     = "value"
                          - graphMode     = "area"
                          - justifyMode   = "auto"
                          - orientation   = "auto"
                          - reduceOptions = {
                              - calcs  = [
                                  - "lastNotNull",
                                ]
                              - fields = ""
                              - values = false
                            }
                          - textMode      = "auto"
                        }
                      - pluginVersion = "8.4.7"
                      - targets       = [
                          - {
                              - datasource   = {
                                  - type = "prometheus"
                                  - uid  = "LAMKK7wVz"
                                }
                              - exemplar     = true
                              - expr         = "sum(rate(registered_clients{}[1h]))"
                              - interval     = ""
                              - legendFormat = ""
                              - refId        = "A"
                            },
                        ]
                      - title         = "Client Registrations per Hour"
                      - type          = "stat"
                    },
                    {
                        gridPos = {
                            h = 1
                            w = 24
                            x = 0
                            y = 8
                        }
                        title   = "Graphs"
                        type    = "row"
                    },
                    {
                        datasource  = {
                            type = "prometheus"
                            uid  = "LAMKK7wVz"
                        }
                        fieldConfig = {
                            defaults  = {
                                color      = {
                                    mode = "palette-classic"
                                }
                                custom     = {
                                    axisLabel         = "Notifications"
                                    axisPlacement     = "auto"
                                    barAlignment      = 0
                                    drawStyle         = "line"
                                    fillOpacity       = 0
                                    gradientMode      = "none"
                                    hideFrom          = {
                                        legend  = false
                                        tooltip = false
                                        viz     = false
                                    }
                                    lineInterpolation = "linear"
                                    lineWidth         = 1
                                    pointSize         = 5
                                    scaleDistribution = {
                                        type = "linear"
                                    }
                                    showPoints        = "auto"
                                    spanNulls         = false
                                    stacking          = {
                                        group = "A"
                                        mode  = "none"
                                    }
                                    thresholdsStyle   = {
                                        mode = "off"
                                    }
                                }
                                mappings   = []
                                thresholds = {
                                    mode  = "absolute"
                                    steps = [
                                        {
                                            color = "green"
                                            value = null
                                        },
                                    ]
                                }
                                unit       = "none"
                            }
                            overrides = [
                                {
                                    __systemRef = "hideSeriesFrom"
                                    matcher     = {
                                        id      = "byNames"
                                        options = {
                                            mode     = "exclude"
                                            names    = [
                                                "sum(received_notifications{})",
                                            ]
                                            prefix   = "All except:"
                                            readOnly = true
                                        }
                                    }
                                    properties  = [
                                        {
                                            id    = "custom.hideFrom"
                                            value = {
                                                legend  = false
                                                tooltip = false
                                                viz     = true
                                            }
                                        },
                                    ]
                                },
                            ]
                        }
                        gridPos     = {
                            h = 8
                            w = 11
                            x = 0
                            y = 9
                        }
                        options     = {
                            legend  = {
                                calcs       = []
                                displayMode = "list"
                                placement   = "bottom"
                            }
                            tooltip = {
                                mode = "single"
                                sort = "none"
                            }
                        }
                        targets     = [
                            {
                                datasource   = {
                                    type = "prometheus"
                                    uid  = "LAMKK7wVz"
                                }
                                exemplar     = true
                                expr         = "sum(increase(received_notifications{}[1h]))"
                                format       = "time_series"
                                interval     = ""
                                legendFormat = ""
                                refId        = "Notifications"
                            },
                        ]
                        title       = "Received Notifications"
                        type        = "timeseries"
                    },
                  ~ {
                      ~ targets     = [
                          ~ {
                              ~ expr         = "sum(increase(registered_clients{}[1h]))" -> "sum(rate(registered_clients{}[$__rate_interval]))"
                                # (5 unchanged attributes hidden)
                            },
                        ]
                      ~ title       = "Registered Clients past 1h" -> "Client registration rate"
                        # (5 unchanged attributes hidden)
                    },
                    {
                        collapsed = false
                        gridPos   = {
                            h = 1
                            w = 24
                            x = 0
                            y = 17
                        }
                        panels    = []
                        title     = "AWS Load Balancer"
                        type      = "row"
                    },
                    # (3 unchanged elements hidden)
                ]
                tags                 = []
                # (15 unchanged attributes hidden)
            }
        )
        id           = "0:staging-push"
        # (8 unchanged attributes hidden)
    }

Plan: 1 to add, 2 to change, 1 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-/+ destroy and then create replacement%0A%0ATerraform will perform the following actions:%0A%0A  # module.ecs.aws_ecs_service.app_service will be updated in-place%0A  ~ resource "aws_ecs_service" "app_service" {%0A        id                                 = "arn:aws:ecs:eu-central-1:898587786287:service/staging-push/staging-push-service"%0A        name                               = "staging-push-service"%0A        tags                               = {}%0A      ~ task_definition                    = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push:185" -> (known after apply)%0A        # (15 unchanged attributes hidden)%0A%0A        # (4 unchanged blocks hidden)%0A    }%0A%0A  # module.ecs.aws_ecs_task_definition.app_task_definition must be replaced%0A-/+ resource "aws_ecs_task_definition" "app_task_definition" {%0A      ~ arn                      = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push:185" -> (known after apply)%0A      ~ arn_without_revision     = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push" -> (known after apply)%0A      ~ container_definitions    = (sensitive value) # forces replacement%0A      ~ id                       = "staging-push" -> (known after apply)%0A      ~ revision                 = 185 -> (known after apply)%0A      - tags                     = {} -> null%0A        # (11 unchanged attributes hidden)%0A%0A        # (1 unchanged block hidden)%0A    }%0A%0A  # module.monitoring.grafana_dashboard.at_a_glance will be updated in-place%0A  ~ resource "grafana_dashboard" "at_a_glance" {%0A      ~ config_json  = jsonencode(%0A          ~ {%0A              ~ panels               = [%0A                    {%0A                        datasource    = {%0A                            type = "prometheus"%0A                            uid  = "LAMKK7wVz"%0A                        }%0A                        description   = ""%0A                        fieldConfig   = {%0A                            defaults  = {%0A                                color      = {%0A                                    mode = "thresholds"%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 = 11%0A                            x = 0%0A                            y = 0%0A                        }%0A                        options       = {%0A                            colorMode     = "value"%0A                            graphMode     = "area"%0A                            justifyMode   = "auto"%0A                            orientation   = "auto"%0A                            reduceOptions = {%0A                                calcs  = [%0A                                    "lastNotNull",%0A                                ]%0A                                fields = ""%0A                                values = false%0A                            }%0A                            text          = {}%0A                            textMode      = "auto"%0A                        }%0A                        pluginVersion = "8.4.7"%0A                        targets       = [%0A                            {%0A                                datasource   = {%0A                                    type = "prometheus"%0A                                    uid  = "LAMKK7wVz"%0A                                }%0A                                expr         = "sum(rate(received_notifications{}[1h]))"%0A                                legendFormat = "__auto"%0A                                refId        = "Received"%0A                            },%0A                            {%0A                                datasource   = {%0A                                    type = "prometheus"%0A                                    uid  = "LAMKK7wVz"%0A                                }%0A                                editorMode   = "code"%0A                                expr         = "sum(increase(sent_apns_notifications{}[1h]))"%0A                                hide         = false%0A                                legendFormat = "__auto"%0A                                range        = true%0A                                refId        = "SentAPNS"%0A                            },%0A                            {%0A                                datasource   = {%0A                                    type = "prometheus"%0A                                    uid  = "LAMKK7wVz"%0A                                }%0A                                editorMode   = "code"%0A                                expr         = "sum(increase(sent_fcm_notifications{}[1h]))"%0A                                hide         = false%0A                                legendFormat = "__auto"%0A                                range        = true%0A                                refId        = "SentFCM"%0A                            },%0A                        ]%0A                        title         = "Notifications per Hour"%0A                        type          = "stat"%0A                    },%0A                  - {%0A                      - datasource    = {%0A                          - type = "prometheus"%0A                          - uid  = "LAMKK7wVz"%0A                        }%0A                      - fieldConfig   = {%0A                          - defaults  = {%0A                              - color      = {%0A                                  - mode = "thresholds"%0A                                }%0A                              - mappings   = []%0A                              - thresholds = {%0A                                  - mode  = "absolute"%0A                                  - steps = [%0A                                      - {%0A                                          - color = "green"%0A                                          - value = null%0A                                        },%0A                                      - {%0A                                          - color = "red"%0A                                          - value = 80%0A                                        },%0A                                    ]%0A                                }%0A                            }%0A                          - overrides = []%0A                        }%0A                      - gridPos       = {%0A                          - h = 8%0A                          - w = 10%0A                          - x = 11%0A                          - y = 0%0A                        }%0A                      - options       = {%0A                          - colorMode     = "value"%0A                          - graphMode     = "area"%0A                          - justifyMode   = "auto"%0A                          - orientation   = "auto"%0A                          - reduceOptions = {%0A                              - calcs  = [%0A                                  - "lastNotNull",%0A                                ]%0A                              - fields = ""%0A                              - values = false%0A                            }%0A                          - textMode      = "auto"%0A                        }%0A                      - pluginVersion = "8.4.7"%0A                      - targets       = [%0A                          - {%0A                              - datasource   = {%0A                                  - type = "prometheus"%0A                                  - uid  = "LAMKK7wVz"%0A                                }%0A                              - exemplar     = true%0A                              - expr         = "sum(rate(registered_clients{}[1h]))"%0A                              - interval     = ""%0A                              - legendFormat = ""%0A                              - refId        = "A"%0A                            },%0A                        ]%0A                      - title         = "Client Registrations per Hour"%0A                      - type          = "stat"%0A                    },%0A                    {%0A                        gridPos = {%0A                            h = 1%0A                            w = 24%0A                            x = 0%0A                            y = 8%0A                        }%0A                        title   = "Graphs"%0A                        type    = "row"%0A                    },%0A                    {%0A                        datasource  = {%0A                            type = "prometheus"%0A                            uid  = "LAMKK7wVz"%0A                        }%0A                        fieldConfig = {%0A                            defaults  = {%0A                                color      = {%0A                                    mode = "palette-classic"%0A                                }%0A                                custom     = {%0A                                    axisLabel         = "Notifications"%0A                                    axisPlacement     = "auto"%0A                                    barAlignment      = 0%0A                                    drawStyle         = "line"%0A                                    fillOpacity       = 0%0A                                    gradientMode      = "none"%0A                                    hideFrom          = {%0A                                        legend  = false%0A                                        tooltip = false%0A                                        viz     = false%0A                                    }%0A                                    lineInterpolation = "linear"%0A                                    lineWidth         = 1%0A                                    pointSize         = 5%0A                                    scaleDistribution = {%0A                                        type = "linear"%0A                                    }%0A                                    showPoints        = "auto"%0A                                    spanNulls         = false%0A                                    stacking          = {%0A                                        group = "A"%0A                                        mode  = "none"%0A                                    }%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                                unit       = "none"%0A                            }%0A                            overrides = [%0A                                {%0A                                    __systemRef = "hideSeriesFrom"%0A                                    matcher     = {%0A                                        id      = "byNames"%0A                                        options = {%0A                                            mode     = "exclude"%0A                                            names    = [%0A                                                "sum(received_notifications{})",%0A                                            ]%0A                                            prefix   = "All except:"%0A                                            readOnly = true%0A                                        }%0A                                    }%0A                                    properties  = [%0A                                        {%0A                                            id    = "custom.hideFrom"%0A                                            value = {%0A                                                legend  = false%0A                                                tooltip = false%0A                                                viz     = true%0A                                            }%0A                                        },%0A                                    ]%0A                                },%0A                            ]%0A                        }%0A                        gridPos     = {%0A                            h = 8%0A                            w = 11%0A                            x = 0%0A                            y = 9%0A                        }%0A                        options     = {%0A                            legend  = {%0A                                calcs       = []%0A                                displayMode = "list"%0A                                placement   = "bottom"%0A                            }%0A                            tooltip = {%0A                                mode = "single"%0A                                sort = "none"%0A                            }%0A                        }%0A                        targets     = [%0A                            {%0A                                datasource   = {%0A                                    type = "prometheus"%0A                                    uid  = "LAMKK7wVz"%0A                                }%0A                                exemplar     = true%0A                                expr         = "sum(increase(received_notifications{}[1h]))"%0A                                format       = "time_series"%0A                                interval     = ""%0A                                legendFormat = ""%0A                                refId        = "Notifications"%0A                            },%0A                        ]%0A                        title       = "Received Notifications"%0A                        type        = "timeseries"%0A                    },%0A                  ~ {%0A                      ~ targets     = [%0A                          ~ {%0A                              ~ expr         = "sum(increase(registered_clients{}[1h]))" -> "sum(rate(registered_clients{}[$__rate_interval]))"%0A                                # (5 unchanged attributes hidden)%0A                            },%0A                        ]%0A                      ~ title       = "Registered Clients past 1h" -> "Client registration rate"%0A                        # (5 unchanged attributes hidden)%0A                    },%0A                    {%0A                        collapsed = false%0A                        gridPos   = {%0A                            h = 1%0A                            w = 24%0A                            x = 0%0A                            y = 17%0A                        }%0A                        panels    = []%0A                        title     = "AWS Load Balancer"%0A                        type      = "row"%0A                    },%0A                    # (3 unchanged elements hidden)%0A                ]%0A                tags                 = []%0A                # (15 unchanged attributes hidden)%0A            }%0A        )%0A        id           = "0:staging-push"%0A        # (8 unchanged attributes hidden)%0A    }%0A%0APlan: 1 to add, 2 to change, 1 to destroy.%0A
::debug::stderr: 
::debug::exitcode: 0

Action: pull_request

@@ -149,71 +149,6 @@ resource "grafana_dashboard" "at_a_glance" {
"title" : "Notifications per Hour",
"type" : "stat"
},
{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant chart

Copy link
Contributor

Show Plan

[command]/home/runner/work/_temp/5c9de869-84a8-4d30-95b7-ab8e7e89fbc9/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
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.ecs.aws_ecs_service.app_service will be updated in-place
  ~ resource "aws_ecs_service" "app_service" {
        id                                 = "arn:aws:ecs:eu-central-1:898587786287:service/staging-push/staging-push-service"
        name                               = "staging-push-service"
        tags                               = {}
      ~ task_definition                    = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push:185" -> (known after apply)
        # (15 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.ecs.aws_ecs_task_definition.app_task_definition must be replaced
-/+ resource "aws_ecs_task_definition" "app_task_definition" {
      ~ arn                      = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push:185" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push" -> (known after apply)
      ~ container_definitions    = (sensitive value) # forces replacement
      ~ id                       = "staging-push" -> (known after apply)
      ~ revision                 = 185 -> (known after apply)
      - tags                     = {} -> null
        # (11 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.monitoring.grafana_dashboard.at_a_glance will be updated in-place
  ~ resource "grafana_dashboard" "at_a_glance" {
      ~ config_json  = jsonencode(
          ~ {
              ~ panels               = [
                    {
                        datasource    = {
                            type = "prometheus"
                            uid  = "LAMKK7wVz"
                        }
                        description   = ""
                        fieldConfig   = {
                            defaults  = {
                                color      = {
                                    mode = "thresholds"
                                }
                                mappings   = []
                                thresholds = {
                                    mode  = "absolute"
                                    steps = [
                                        {
                                            color = "green"
                                            value = null
                                        },
                                    ]
                                }
                            }
                            overrides = []
                        }
                        gridPos       = {
                            h = 8
                            w = 11
                            x = 0
                            y = 0
                        }
                        options       = {
                            colorMode     = "value"
                            graphMode     = "area"
                            justifyMode   = "auto"
                            orientation   = "auto"
                            reduceOptions = {
                                calcs  = [
                                    "lastNotNull",
                                ]
                                fields = ""
                                values = false
                            }
                            text          = {}
                            textMode      = "auto"
                        }
                        pluginVersion = "8.4.7"
                        targets       = [
                            {
                                datasource   = {
                                    type = "prometheus"
                                    uid  = "LAMKK7wVz"
                                }
                                expr         = "sum(rate(received_notifications{}[1h]))"
                                legendFormat = "__auto"
                                refId        = "Received"
                            },
                            {
                                datasource   = {
                                    type = "prometheus"
                                    uid  = "LAMKK7wVz"
                                }
                                editorMode   = "code"
                                expr         = "sum(increase(sent_apns_notifications{}[1h]))"
                                hide         = false
                                legendFormat = "__auto"
                                range        = true
                                refId        = "SentAPNS"
                            },
                            {
                                datasource   = {
                                    type = "prometheus"
                                    uid  = "LAMKK7wVz"
                                }
                                editorMode   = "code"
                                expr         = "sum(increase(sent_fcm_notifications{}[1h]))"
                                hide         = false
                                legendFormat = "__auto"
                                range        = true
                                refId        = "SentFCM"
                            },
                        ]
                        title         = "Notifications per Hour"
                        type          = "stat"
                    },
                  - {
                      - datasource    = {
                          - type = "prometheus"
                          - uid  = "LAMKK7wVz"
                        }
                      - fieldConfig   = {
                          - defaults  = {
                              - color      = {
                                  - mode = "thresholds"
                                }
                              - mappings   = []
                              - thresholds = {
                                  - mode  = "absolute"
                                  - steps = [
                                      - {
                                          - color = "green"
                                          - value = null
                                        },
                                      - {
                                          - color = "red"
                                          - value = 80
                                        },
                                    ]
                                }
                            }
                          - overrides = []
                        }
                      - gridPos       = {
                          - h = 8
                          - w = 10
                          - x = 11
                          - y = 0
                        }
                      - options       = {
                          - colorMode     = "value"
                          - graphMode     = "area"
                          - justifyMode   = "auto"
                          - orientation   = "auto"
                          - reduceOptions = {
                              - calcs  = [
                                  - "lastNotNull",
                                ]
                              - fields = ""
                              - values = false
                            }
                          - textMode      = "auto"
                        }
                      - pluginVersion = "8.4.7"
                      - targets       = [
                          - {
                              - datasource   = {
                                  - type = "prometheus"
                                  - uid  = "LAMKK7wVz"
                                }
                              - exemplar     = true
                              - expr         = "sum(rate(registered_clients{}[1h]))"
                              - interval     = ""
                              - legendFormat = ""
                              - refId        = "A"
                            },
                        ]
                      - title         = "Client Registrations per Hour"
                      - type          = "stat"
                    },
                    {
                        gridPos = {
                            h = 1
                            w = 24
                            x = 0
                            y = 8
                        }
                        title   = "Graphs"
                        type    = "row"
                    },
                    {
                        datasource  = {
                            type = "prometheus"
                            uid  = "LAMKK7wVz"
                        }
                        fieldConfig = {
                            defaults  = {
                                color      = {
                                    mode = "palette-classic"
                                }
                                custom     = {
                                    axisLabel         = "Notifications"
                                    axisPlacement     = "auto"
                                    barAlignment      = 0
                                    drawStyle         = "line"
                                    fillOpacity       = 0
                                    gradientMode      = "none"
                                    hideFrom          = {
                                        legend  = false
                                        tooltip = false
                                        viz     = false
                                    }
                                    lineInterpolation = "linear"
                                    lineWidth         = 1
                                    pointSize         = 5
                                    scaleDistribution = {
                                        type = "linear"
                                    }
                                    showPoints        = "auto"
                                    spanNulls         = false
                                    stacking          = {
                                        group = "A"
                                        mode  = "none"
                                    }
                                    thresholdsStyle   = {
                                        mode = "off"
                                    }
                                }
                                mappings   = []
                                thresholds = {
                                    mode  = "absolute"
                                    steps = [
                                        {
                                            color = "green"
                                            value = null
                                        },
                                    ]
                                }
                                unit       = "none"
                            }
                            overrides = [
                                {
                                    __systemRef = "hideSeriesFrom"
                                    matcher     = {
                                        id      = "byNames"
                                        options = {
                                            mode     = "exclude"
                                            names    = [
                                                "sum(received_notifications{})",
                                            ]
                                            prefix   = "All except:"
                                            readOnly = true
                                        }
                                    }
                                    properties  = [
                                        {
                                            id    = "custom.hideFrom"
                                            value = {
                                                legend  = false
                                                tooltip = false
                                                viz     = true
                                            }
                                        },
                                    ]
                                },
                            ]
                        }
                        gridPos     = {
                            h = 8
                            w = 11
                            x = 0
                            y = 9
                        }
                        options     = {
                            legend  = {
                                calcs       = []
                                displayMode = "list"
                                placement   = "bottom"
                            }
                            tooltip = {
                                mode = "single"
                                sort = "none"
                            }
                        }
                        targets     = [
                            {
                                datasource   = {
                                    type = "prometheus"
                                    uid  = "LAMKK7wVz"
                                }
                                exemplar     = true
                                expr         = "sum(increase(received_notifications{}[1h]))"
                                format       = "time_series"
                                interval     = ""
                                legendFormat = ""
                                refId        = "Notifications"
                            },
                        ]
                        title       = "Received Notifications"
                        type        = "timeseries"
                    },
                  ~ {
                      ~ targets     = [
                          ~ {
                              ~ expr         = "sum(increase(registered_clients{}[1h]))" -> "sum(rate(registered_clients{}[$__rate_interval]))"
                                # (5 unchanged attributes hidden)
                            },
                        ]
                      ~ title       = "Registered Clients past 1h" -> "Client registration rate"
                        # (5 unchanged attributes hidden)
                    },
                    {
                        collapsed = false
                        gridPos   = {
                            h = 1
                            w = 24
                            x = 0
                            y = 17
                        }
                        panels    = []
                        title     = "AWS Load Balancer"
                        type      = "row"
                    },
                    # (3 unchanged elements hidden)
                ]
                tags                 = []
                # (15 unchanged attributes hidden)
            }
        )
        id           = "0:staging-push"
        # (8 unchanged attributes hidden)
    }

Plan: 1 to add, 2 to change, 1 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-/+ destroy and then create replacement%0A%0ATerraform will perform the following actions:%0A%0A  # module.ecs.aws_ecs_service.app_service will be updated in-place%0A  ~ resource "aws_ecs_service" "app_service" {%0A        id                                 = "arn:aws:ecs:eu-central-1:898587786287:service/staging-push/staging-push-service"%0A        name                               = "staging-push-service"%0A        tags                               = {}%0A      ~ task_definition                    = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push:185" -> (known after apply)%0A        # (15 unchanged attributes hidden)%0A%0A        # (4 unchanged blocks hidden)%0A    }%0A%0A  # module.ecs.aws_ecs_task_definition.app_task_definition must be replaced%0A-/+ resource "aws_ecs_task_definition" "app_task_definition" {%0A      ~ arn                      = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push:185" -> (known after apply)%0A      ~ arn_without_revision     = "arn:aws:ecs:eu-central-1:898587786287:task-definition/staging-push" -> (known after apply)%0A      ~ container_definitions    = (sensitive value) # forces replacement%0A      ~ id                       = "staging-push" -> (known after apply)%0A      ~ revision                 = 185 -> (known after apply)%0A      - tags                     = {} -> null%0A        # (11 unchanged attributes hidden)%0A%0A        # (1 unchanged block hidden)%0A    }%0A%0A  # module.monitoring.grafana_dashboard.at_a_glance will be updated in-place%0A  ~ resource "grafana_dashboard" "at_a_glance" {%0A      ~ config_json  = jsonencode(%0A          ~ {%0A              ~ panels               = [%0A                    {%0A                        datasource    = {%0A                            type = "prometheus"%0A                            uid  = "LAMKK7wVz"%0A                        }%0A                        description   = ""%0A                        fieldConfig   = {%0A                            defaults  = {%0A                                color      = {%0A                                    mode = "thresholds"%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 = 11%0A                            x = 0%0A                            y = 0%0A                        }%0A                        options       = {%0A                            colorMode     = "value"%0A                            graphMode     = "area"%0A                            justifyMode   = "auto"%0A                            orientation   = "auto"%0A                            reduceOptions = {%0A                                calcs  = [%0A                                    "lastNotNull",%0A                                ]%0A                                fields = ""%0A                                values = false%0A                            }%0A                            text          = {}%0A                            textMode      = "auto"%0A                        }%0A                        pluginVersion = "8.4.7"%0A                        targets       = [%0A                            {%0A                                datasource   = {%0A                                    type = "prometheus"%0A                                    uid  = "LAMKK7wVz"%0A                                }%0A                                expr         = "sum(rate(received_notifications{}[1h]))"%0A                                legendFormat = "__auto"%0A                                refId        = "Received"%0A                            },%0A                            {%0A                                datasource   = {%0A                                    type = "prometheus"%0A                                    uid  = "LAMKK7wVz"%0A                                }%0A                                editorMode   = "code"%0A                                expr         = "sum(increase(sent_apns_notifications{}[1h]))"%0A                                hide         = false%0A                                legendFormat = "__auto"%0A                                range        = true%0A                                refId        = "SentAPNS"%0A                            },%0A                            {%0A                                datasource   = {%0A                                    type = "prometheus"%0A                                    uid  = "LAMKK7wVz"%0A                                }%0A                                editorMode   = "code"%0A                                expr         = "sum(increase(sent_fcm_notifications{}[1h]))"%0A                                hide         = false%0A                                legendFormat = "__auto"%0A                                range        = true%0A                                refId        = "SentFCM"%0A                            },%0A                        ]%0A                        title         = "Notifications per Hour"%0A                        type          = "stat"%0A                    },%0A                  - {%0A                      - datasource    = {%0A                          - type = "prometheus"%0A                          - uid  = "LAMKK7wVz"%0A                        }%0A                      - fieldConfig   = {%0A                          - defaults  = {%0A                              - color      = {%0A                                  - mode = "thresholds"%0A                                }%0A                              - mappings   = []%0A                              - thresholds = {%0A                                  - mode  = "absolute"%0A                                  - steps = [%0A                                      - {%0A                                          - color = "green"%0A                                          - value = null%0A                                        },%0A                                      - {%0A                                          - color = "red"%0A                                          - value = 80%0A                                        },%0A                                    ]%0A                                }%0A                            }%0A                          - overrides = []%0A                        }%0A                      - gridPos       = {%0A                          - h = 8%0A                          - w = 10%0A                          - x = 11%0A                          - y = 0%0A                        }%0A                      - options       = {%0A                          - colorMode     = "value"%0A                          - graphMode     = "area"%0A                          - justifyMode   = "auto"%0A                          - orientation   = "auto"%0A                          - reduceOptions = {%0A                              - calcs  = [%0A                                  - "lastNotNull",%0A                                ]%0A                              - fields = ""%0A                              - values = false%0A                            }%0A                          - textMode      = "auto"%0A                        }%0A                      - pluginVersion = "8.4.7"%0A                      - targets       = [%0A                          - {%0A                              - datasource   = {%0A                                  - type = "prometheus"%0A                                  - uid  = "LAMKK7wVz"%0A                                }%0A                              - exemplar     = true%0A                              - expr         = "sum(rate(registered_clients{}[1h]))"%0A                              - interval     = ""%0A                              - legendFormat = ""%0A                              - refId        = "A"%0A                            },%0A                        ]%0A                      - title         = "Client Registrations per Hour"%0A                      - type          = "stat"%0A                    },%0A                    {%0A                        gridPos = {%0A                            h = 1%0A                            w = 24%0A                            x = 0%0A                            y = 8%0A                        }%0A                        title   = "Graphs"%0A                        type    = "row"%0A                    },%0A                    {%0A                        datasource  = {%0A                            type = "prometheus"%0A                            uid  = "LAMKK7wVz"%0A                        }%0A                        fieldConfig = {%0A                            defaults  = {%0A                                color      = {%0A                                    mode = "palette-classic"%0A                                }%0A                                custom     = {%0A                                    axisLabel         = "Notifications"%0A                                    axisPlacement     = "auto"%0A                                    barAlignment      = 0%0A                                    drawStyle         = "line"%0A                                    fillOpacity       = 0%0A                                    gradientMode      = "none"%0A                                    hideFrom          = {%0A                                        legend  = false%0A                                        tooltip = false%0A                                        viz     = false%0A                                    }%0A                                    lineInterpolation = "linear"%0A                                    lineWidth         = 1%0A                                    pointSize         = 5%0A                                    scaleDistribution = {%0A                                        type = "linear"%0A                                    }%0A                                    showPoints        = "auto"%0A                                    spanNulls         = false%0A                                    stacking          = {%0A                                        group = "A"%0A                                        mode  = "none"%0A                                    }%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                                unit       = "none"%0A                            }%0A                            overrides = [%0A                                {%0A                                    __systemRef = "hideSeriesFrom"%0A                                    matcher     = {%0A                                        id      = "byNames"%0A                                        options = {%0A                                            mode     = "exclude"%0A                                            names    = [%0A                                                "sum(received_notifications{})",%0A                                            ]%0A                                            prefix   = "All except:"%0A                                            readOnly = true%0A                                        }%0A                                    }%0A                                    properties  = [%0A                                        {%0A                                            id    = "custom.hideFrom"%0A                                            value = {%0A                                                legend  = false%0A                                                tooltip = false%0A                                                viz     = true%0A                                            }%0A                                        },%0A                                    ]%0A                                },%0A                            ]%0A                        }%0A                        gridPos     = {%0A                            h = 8%0A                            w = 11%0A                            x = 0%0A                            y = 9%0A                        }%0A                        options     = {%0A                            legend  = {%0A                                calcs       = []%0A                                displayMode = "list"%0A                                placement   = "bottom"%0A                            }%0A                            tooltip = {%0A                                mode = "single"%0A                                sort = "none"%0A                            }%0A                        }%0A                        targets     = [%0A                            {%0A                                datasource   = {%0A                                    type = "prometheus"%0A                                    uid  = "LAMKK7wVz"%0A                                }%0A                                exemplar     = true%0A                                expr         = "sum(increase(received_notifications{}[1h]))"%0A                                format       = "time_series"%0A                                interval     = ""%0A                                legendFormat = ""%0A                                refId        = "Notifications"%0A                            },%0A                        ]%0A                        title       = "Received Notifications"%0A                        type        = "timeseries"%0A                    },%0A                  ~ {%0A                      ~ targets     = [%0A                          ~ {%0A                              ~ expr         = "sum(increase(registered_clients{}[1h]))" -> "sum(rate(registered_clients{}[$__rate_interval]))"%0A                                # (5 unchanged attributes hidden)%0A                            },%0A                        ]%0A                      ~ title       = "Registered Clients past 1h" -> "Client registration rate"%0A                        # (5 unchanged attributes hidden)%0A                    },%0A                    {%0A                        collapsed = false%0A                        gridPos   = {%0A                            h = 1%0A                            w = 24%0A                            x = 0%0A                            y = 17%0A                        }%0A                        panels    = []%0A                        title     = "AWS Load Balancer"%0A                        type      = "row"%0A                    },%0A                    # (3 unchanged elements hidden)%0A                ]%0A                tags                 = []%0A                # (15 unchanged attributes hidden)%0A            }%0A        )%0A        id           = "0:staging-push"%0A        # (8 unchanged attributes hidden)%0A    }%0A%0APlan: 1 to add, 2 to change, 1 to destroy.%0A
::debug::stderr: 
::debug::exitcode: 0

Action: pull_request

@chris13524 chris13524 merged commit a74ad70 into main May 17, 2024
9 checks passed
@chris13524 chris13524 deleted the fix/client-registrations-chart branch May 17, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted The issue has been accepted into the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants