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

Reconcile duplication between "Hosts being rate limited" panel vs the "Federation rate limiter" section in Grafana #14315

Closed
MadLittleMods opened this issue Oct 28, 2022 · 2 comments
Labels
A-Metrics metrics, measures, stuff we put in Prometheus T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@MadLittleMods
Copy link
Contributor

There is a Hosts being rate limited Grafana panel under the Requests section which covers the same base as the Federation rate limiter section I added below it, https://grafana.matrix.org/d/000000012/synapse?orgId=1&from=now-12h&to=now

I can't see any data from the Hosts being rate limited panel because of a Datasource ${DS_PROMETHEUS} was not found error there but would be good to consolidate those. Who worked on that one? (trying to find the person that cares about it)


The rate limit metrics were originally added in:

@MadLittleMods MadLittleMods added the A-Metrics metrics, measures, stuff we put in Prometheus label Oct 28, 2022
@DMRobertson
Copy link
Contributor

I think that was me when I was trying to confirm that #13649 worked as part of releaseing 1.66.0rc2. Feel free to remove it from grafana.

@DMRobertson DMRobertson added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Oct 28, 2022
@MadLittleMods
Copy link
Contributor Author

Removed 👍

Here is a backup in case we want to reference it:

Hosts being rate limited panel JSON
{
  "id": 225,
  "gridPos": {
    "h": 9,
    "w": 12,
    "x": 12,
    "y": 53
  },
  "type": "timeseries",
  "title": "Hosts being rate limited",
  "datasource": {
    "type": "prometheus",
    "uid": "${DS_PROMETHEUS}"
  },
  "description": "Average number of hosts being rate limited across each worker type.",
  "fieldConfig": {
    "defaults": {
      "custom": {
        "drawStyle": "line",
        "lineInterpolation": "linear",
        "barAlignment": 0,
        "lineWidth": 1,
        "fillOpacity": 0,
        "gradientMode": "none",
        "spanNulls": false,
        "showPoints": "auto",
        "pointSize": 5,
        "stacking": {
          "mode": "none",
          "group": "A"
        },
        "axisPlacement": "auto",
        "axisLabel": "",
        "axisColorMode": "text",
        "scaleDistribution": {
          "type": "linear"
        },
        "axisCenteredZero": false,
        "hideFrom": {
          "tooltip": false,
          "viz": false,
          "legend": false
        },
        "thresholdsStyle": {
          "mode": "off"
        }
      },
      "color": {
        "mode": "palette-classic"
      },
      "mappings": [],
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          }
        ]
      },
      "unit": "none"
    },
    "overrides": []
  },
  "options": {
    "tooltip": {
      "mode": "single",
      "sort": "desc"
    },
    "legend": {
      "showLegend": true,
      "displayMode": "list",
      "placement": "bottom",
      "calcs": []
    }
  },
  "targets": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "editorMode": "builder",
      "expr": "avg by(job, rate_limiter_name) (synapse_rate_limit_sleep_affected_hosts{instance=\"$instance\", job=~\"$job\", index=~\"$index\"})",
      "hide": false,
      "legendFormat": "Slept by {{job}}:{{rate_limiter_name}}",
      "range": true,
      "refId": "B"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "editorMode": "builder",
      "expr": "avg by(job, rate_limiter_name) (synapse_rate_limit_reject_affected_hosts{instance=\"$instance\", job=~\"$job\", index=~\"$index\"})",
      "legendFormat": "Rejected by {{job}}:{{rate_limiter_name}}",
      "range": true,
      "refId": "A"
    }
  ]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Metrics metrics, measures, stuff we put in Prometheus T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

No branches or pull requests

2 participants