{
    "name": "Pulsar - Proxy",
    "tags": "",
    "ident": "",
    "configs": {
        "version": "3.0.0",
        "links": [],
        "var": [
            {
                "name": "datasource",
                "type": "datasource",
                "definition": "prometheus"
            },
            {
                "name": "job",
                "type": "constant",
                "datasource": {
                    "cate": "prometheus"
                },
                "definition": "pulsar-proxy"
            },
            {
                "name": "cluster",
                "type": "query",
                "datasource": {
                    "cate": "prometheus",
                    "value": "${datasource}"
                },
                "definition": "label_values(up{job=\"pulsar-bookie\", cluster=~\"pulsar-.*\"},cluster)",
                "reg": "",
                "multi": false
            },
            {
                "name": "instance",
                "type": "query",
                "datasource": {
                    "cate": "prometheus",
                    "value": "${datasource}"
                },
                "definition": "label_values(pulsar_proxy_active_connections{cluster=~\"$cluster\"},instance)",
                "reg": "",
                "multi": true,
                "allOption": true,
                "allValue": null
            }
        ],
        "panels": [
            {
                "type": "timeseries",
                "id": "0b30c864-c460-426d-92e0-82633ad781ad",
                "layout": {
                    "h": 7,
                    "w": 8,
                    "x": 0,
                    "y": 0,
                    "i": "0b30c864-c460-426d-92e0-82633ad781ad",
                    "isResizable": true
                },
                "version": "2.0.0",
                "datasourceCate": "prometheus",
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(pulsar_proxy_active_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "transformations": [
                    {
                        "id": "organize",
                        "options": {}
                    }
                ],
                "name": "Active Connections",
                "links": [],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "standardOptions": {},
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "spanNulls": false,
                    "lineWidth": 1,
                    "fillOpacity": 0.5,
                    "gradientMode": "none",
                    "stack": "off",
                    "scaleDistribution": {
                        "type": "linear"
                    }
                },
                "datasourceValue": "${datasource}"
            },
            {
                "type": "timeseries",
                "id": "eb7133e7-8c21-462e-b73d-d111b78e7f1d",
                "layout": {
                    "h": 7,
                    "w": 8,
                    "x": 8,
                    "y": 0,
                    "i": "eb7133e7-8c21-462e-b73d-d111b78e7f1d",
                    "isResizable": true
                },
                "version": "2.0.0",
                "datasourceCate": "prometheus",
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(rate(pulsar_proxy_new_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[30s])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "transformations": [
                    {
                        "id": "organize",
                        "options": {}
                    }
                ],
                "name": "New connections (conn / s)",
                "links": [],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "standardOptions": {},
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "spanNulls": false,
                    "lineWidth": 1,
                    "fillOpacity": 0.5,
                    "gradientMode": "none",
                    "stack": "off",
                    "scaleDistribution": {
                        "type": "linear"
                    }
                },
                "datasourceValue": "${datasource}"
            },
            {
                "type": "timeseries",
                "id": "896730eb-1099-4e96-8ef0-1f1b83654f25",
                "layout": {
                    "h": 7,
                    "w": 8,
                    "x": 16,
                    "y": 0,
                    "i": "896730eb-1099-4e96-8ef0-1f1b83654f25",
                    "isResizable": true
                },
                "version": "2.0.0",
                "datasourceCate": "prometheus",
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(rate(pulsar_proxy_rejected_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[30s])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "transformations": [
                    {
                        "id": "organize",
                        "options": {}
                    }
                ],
                "name": "Rejected connections (conn / s)",
                "links": [],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "standardOptions": {},
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "spanNulls": false,
                    "lineWidth": 1,
                    "fillOpacity": 0.5,
                    "gradientMode": "none",
                    "stack": "off",
                    "scaleDistribution": {
                        "type": "linear"
                    }
                },
                "datasourceValue": "${datasource}"
            },
            {
                "type": "timeseries",
                "id": "6c965b18-7498-4179-b8f3-bf8a9dcaa436",
                "layout": {
                    "h": 7,
                    "w": 8,
                    "x": 0,
                    "y": 7,
                    "i": "6c965b18-7498-4179-b8f3-bf8a9dcaa436",
                    "isResizable": true
                },
                "version": "2.0.0",
                "datasourceCate": "prometheus",
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(rate(pulsar_proxy_binary_ops{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[1m])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "transformations": [
                    {
                        "id": "organize",
                        "options": {}
                    }
                ],
                "name": "Operations per sec",
                "links": [],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "standardOptions": {},
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "spanNulls": false,
                    "lineWidth": 1,
                    "fillOpacity": 0.5,
                    "gradientMode": "none",
                    "stack": "off",
                    "scaleDistribution": {
                        "type": "linear"
                    }
                },
                "datasourceValue": "${datasource}"
            },
            {
                "type": "timeseries",
                "id": "fcf32cf6-52f4-4c9a-965f-dc5cefae43dc",
                "layout": {
                    "h": 7,
                    "w": 8,
                    "x": 8,
                    "y": 7,
                    "i": "fcf32cf6-52f4-4c9a-965f-dc5cefae43dc",
                    "isResizable": true
                },
                "version": "2.0.0",
                "datasourceCate": "prometheus",
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(rate(pulsar_proxy_binary_ops{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[1m])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "transformations": [
                    {
                        "id": "organize",
                        "options": {}
                    }
                ],
                "name": "Traffic - bytes per sec",
                "links": [],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "standardOptions": {},
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "spanNulls": false,
                    "lineWidth": 1,
                    "fillOpacity": 0.5,
                    "gradientMode": "none",
                    "stack": "off",
                    "scaleDistribution": {
                        "type": "linear"
                    }
                },
                "datasourceValue": "${datasource}"
            },
            {
                "type": "timeseries",
                "id": "b8fc931b-e993-4326-96c3-65e792c10601",
                "layout": {
                    "h": 7,
                    "w": 8,
                    "x": 16,
                    "y": 7,
                    "i": "b8fc931b-e993-4326-96c3-65e792c10601",
                    "isResizable": true
                },
                "version": "2.0.0",
                "datasourceCate": "prometheus",
                "targets": [
                    {
                        "refId": "B",
                        "expr": "sum(rate(jetty_requests_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[1m])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "transformations": [
                    {
                        "id": "organize",
                        "options": {}
                    }
                ],
                "name": "HTTP  reqs per sec",
                "links": [],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "standardOptions": {},
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "spanNulls": false,
                    "lineWidth": 1,
                    "fillOpacity": 0.5,
                    "gradientMode": "none",
                    "stack": "off",
                    "scaleDistribution": {
                        "type": "linear"
                    }
                },
                "datasourceValue": "${datasource}"
            },
            {
                "version": "2.0.0",
                "id": "8d8a18e3-da6a-4a63-b1f9-93df704aaab7",
                "type": "timeseries",
                "name": "Topic lookups per sec",
                "links": [],
                "layout": {
                    "h": 7,
                    "w": 8,
                    "x": 0,
                    "y": 14,
                    "i": "8d8a18e3-da6a-4a63-b1f9-93df704aaab7",
                    "isResizable": true
                },
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(rate(pulsar_proxy_lookup_requests{cluster=~\"$cluster\", job=~\"proxy\", instance=~\"$instance\"}[1m])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "version": "2.0.0",
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "fillOpacity": 0.5,
                    "stack": "off"
                },
                "datasourceCate": "prometheus",
                "datasourceValue": "${datasource}"
            },
            {
                "version": "2.0.0",
                "id": "6c486ab7-404b-47c6-90f1-d500f484d2a4",
                "type": "timeseries",
                "name": "GetPartitionsMetadata per sec",
                "links": [],
                "layout": {
                    "h": 7,
                    "w": 8,
                    "x": 8,
                    "y": 14,
                    "i": "6c486ab7-404b-47c6-90f1-d500f484d2a4",
                    "isResizable": true
                },
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(rate(pulsar_proxy_partitions_metadata_requests{cluster=~\"$cluster\", job=~\"proxy\", instance=~\"$instance\"}[1m])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "version": "2.0.0",
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "fillOpacity": 0.5,
                    "stack": "off"
                },
                "datasourceCate": "prometheus",
                "datasourceValue": "${datasource}"
            },
            {
                "version": "2.0.0",
                "id": "ea5152b7-85d6-4179-8624-15d63669f591",
                "type": "timeseries",
                "name": "GetNamespaceTopics per sec",
                "links": [],
                "layout": {
                    "h": 7,
                    "w": 8,
                    "x": 16,
                    "y": 14,
                    "i": "ea5152b7-85d6-4179-8624-15d63669f591",
                    "isResizable": true
                },
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(rate(pulsar_proxy_get_topics_of_namespace_requests{cluster=~\"$cluster\", job=~\"proxy\", instance=~\"$instance\"}[1m])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "version": "2.0.0",
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "fillOpacity": 0.5,
                    "stack": "off"
                },
                "datasourceCate": "prometheus",
                "datasourceValue": "${datasource}"
            },
            {
                "version": "2.0.0",
                "id": "14868d10-83f9-4359-a5db-9a507dbc4c47",
                "type": "timeseries",
                "name": "Lookups rejected per sec",
                "links": [],
                "layout": {
                    "h": 6,
                    "w": 8,
                    "x": 0,
                    "y": 21,
                    "i": "14868d10-83f9-4359-a5db-9a507dbc4c47",
                    "isResizable": true
                },
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(rate(pulsar_proxy_rejected_lookup_requests{cluster=~\"$cluster\", job=~\"proxy\", instance=~\"$instance\"}[1m])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "version": "2.0.0",
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "fillOpacity": 0.5,
                    "stack": "off"
                },
                "datasourceCate": "prometheus",
                "datasourceValue": "${datasource}"
            },
            {
                "version": "2.0.0",
                "id": "e2bc48cc-854f-4ac1-9ba4-bf29bacf50ac",
                "type": "timeseries",
                "name": "Partitions requests rejected per sec",
                "links": [],
                "layout": {
                    "h": 6,
                    "w": 8,
                    "x": 8,
                    "y": 21,
                    "i": "e2bc48cc-854f-4ac1-9ba4-bf29bacf50ac",
                    "isResizable": true
                },
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(rate(pulsar_proxy_rejected_partitions_metadata_requests{cluster=~\"$cluster\", job=~\"proxy\", instance=~\"$instance\"}[1m])) by (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "version": "2.0.0",
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "fillOpacity": 0.5,
                    "stack": "off"
                },
                "datasourceCate": "prometheus",
                "datasourceValue": "${datasource}"
            },
            {
                "version": "2.0.0",
                "id": "96d983e7-208a-4ce9-95e0-30f2b83db01f",
                "type": "timeseries",
                "name": "GetNamespaceTopics requests rejected per sec",
                "links": [],
                "layout": {
                    "h": 6,
                    "w": 8,
                    "x": 16,
                    "y": 21,
                    "i": "96d983e7-208a-4ce9-95e0-30f2b83db01f",
                    "isResizable": true
                },
                "targets": [
                    {
                        "refId": "A",
                        "expr": "sum(\n  rate(\n    pulsar_proxy_rejected_get_topics_of_namespace_requests{\n            cluster=~\"$cluster\", job=~\"proxy\", \n            instance=~\"$instance\"}[1m]\n    )\n  ) \nby (instance)",
                        "legend": "{{instance}}"
                    }
                ],
                "options": {
                    "tooltip": {
                        "mode": "all",
                        "sort": "none"
                    },
                    "legend": {
                        "displayMode": "hidden"
                    },
                    "thresholds": {
                        "steps": [
                            {
                                "color": "#634CD9",
                                "value": null,
                                "type": "base"
                            }
                        ]
                    }
                },
                "custom": {
                    "version": "2.0.0",
                    "drawStyle": "lines",
                    "lineInterpolation": "linear",
                    "fillOpacity": 0.5,
                    "stack": "off"
                },
                "datasourceCate": "prometheus",
                "datasourceValue": "${datasource}"
            }
        ]
    }
}