Grafana dashboard: Telegram MTProto Proxy Status
Description: Telegram MTProto Proxy Status

Made for which used this: https://github.com/9seconds/mtg

Please configure your prometheus job likes below:
```
  - job_name: mtproto-proxy
    metrics_path: /
    static_configs:
      - targets:
        - a-mtp.example.com:3129
        labels:
          alias: a
      - targets:
        - b-mtp.example.com:3129
        labels:
          alias: b
      - targets:
        - c-mtp.example.com:3129
        labels:
          alias: c
```

{
  "__inputs": [
    {
      "name": "MTG PROMETHEUS",
      "label": "MTG Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.6.0"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 11904,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1584371001134,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "datasource": "${MTG PROMETHEUS}",
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 10,
      "links": [],
      "options": {
        "fieldOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "defaults": {
            "mappings": [
              {
                "id": 0,
                "op": "=",
                "text": "N/A",
                "type": 1,
                "value": "null"
              }
            ],
            "min": 0,
            "nullValueMode": "connected",
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "#EAB839",
                  "value": 1073741824
                },
                {
                  "color": "dark-orange",
                  "value": 1099511627776
                },
                {
                  "color": "dark-red",
                  "value": 8796093022208
                }
              ]
            },
            "title": "",
            "unit": "decbytes"
          },
          "overrides": [],
          "values": false
        },
        "orientation": "horizontal",
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "6.6.0",
      "targets": [
        {
          "expr": "mtg_traffic{alias=~\"$Node\", direction=\"egress\"}",
          "instant": false,
          "legendFormat": "{{alias}} {{direction}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Traffic",
      "type": "gauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${MTG PROMETHEUS}",
      "decimals": 0,
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "hideEmpty": false,
        "hideZero": false,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "sideWidth": null,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "mtg_connections{alias=~\"$Node\"}",
          "instant": false,
          "intervalFactor": 1,
          "legendFormat": "{{alias}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Connections",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "locale",
          "label": "",
          "logBase": 2,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": null,
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "datasource": "${MTG PROMETHEUS}",
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 6
      },
      "id": 11,
      "links": [],
      "options": {
        "fieldOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "defaults": {
            "mappings": [
              {
                "id": 0,
                "op": "=",
                "text": "N/A",
                "type": 1,
                "value": "null"
              }
            ],
            "min": 0,
            "nullValueMode": "connected",
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "#EAB839",
                  "value": 1073741824
                },
                {
                  "color": "dark-orange",
                  "value": 1099511627776
                },
                {
                  "color": "dark-red",
                  "value": 8796093022208
                }
              ]
            },
            "title": "",
            "unit": "decbytes"
          },
          "overrides": [],
          "values": false
        },
        "orientation": "horizontal",
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "6.6.0",
      "targets": [
        {
          "expr": "mtg_traffic{alias=~\"$Node\", direction=\"ingress\"}",
          "legendFormat": "{{alias}} {{direction}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Traffic",
      "type": "gauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${MTG PROMETHEUS}",
      "decimals": 0,
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 6
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "mtg_authentication_failed{alias=~\"$Node\"}",
          "legendFormat": "{{alias}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Authentication Failed",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "locale",
          "label": null,
          "logBase": 2,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${MTG PROMETHEUS}",
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 0,
        "y": 12
      },
      "hiddenSeries": false,
      "id": 8,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "delta(mtg_traffic{alias=~\"$Node\", direction=\"ingress\"}[30s])",
          "legendFormat": "i->{{alias}}",
          "refId": "A"
        },
        {
          "expr": "delta(mtg_traffic{alias=~\"$Node\", direction=\"egress\"}[30s])",
          "legendFormat": "o<-{{alias}}",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Traffic",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "decbytes",
          "label": null,
          "logBase": 2,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${MTG PROMETHEUS}",
      "decimals": 0,
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 12,
        "y": 12
      },
      "hiddenSeries": false,
      "id": 6,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "label_replace(mtg_telegram_connections{alias=~\"$Node\", dc=\"0\"}, \"dci\", \"DC1\", \"dc\", \"(.*)\")",
          "legendFormat": "{{alias}} - {{dci}} ({{protocol}})",
          "refId": "A"
        },
        {
          "expr": "label_replace(mtg_telegram_connections{alias=~\"$Node\", dc=\"1\"}, \"dci\", \"DC2\", \"dc\", \"(.*)\")",
          "legendFormat": "{{alias}} - {{dci}} ({{protocol}})",
          "refId": "B"
        },
        {
          "expr": "label_replace(mtg_telegram_connections{alias=~\"$Node\", dc=\"2\"}, \"dci\", \"DC3\", \"dc\", \"(.*)\")",
          "legendFormat": "{{alias}} - {{dci}} ({{protocol}})",
          "refId": "C"
        },
        {
          "expr": "label_replace(mtg_telegram_connections{alias=~\"$Node\", dc=\"3\"}, \"dci\", \"DC4\", \"dc\", \"(.*)\")",
          "legendFormat": "{{alias}} - {{dci}} ({{protocol}})",
          "refId": "D"
        },
        {
          "expr": "label_replace(mtg_telegram_connections{alias=~\"$Node\", dc=\"4\"}, \"dci\", \"DC5\", \"dc\", \"(.*)\")",
          "legendFormat": "{{alias}} - {{dci}} ({{protocol}})",
          "refId": "E"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Telegram Connections",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "locale",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "10s",
  "schemaVersion": 22,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${MTG PROMETHEUS}",
        "definition": "label_values(mtg_connections, alias)",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "Node",
        "options": [],
        "query": "label_values(mtg_connections, alias)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-3h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Telegram MTProto Proxy Status",
  "uid": "H-N6bDuWz",
  "version": 10,
  "description": "Telegram MTProto Proxy Status"
}