{
  "annotations": {
    "list": []
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "title": "Pulsar Overview",
      "type": "row",
      "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0}
    },
    {
      "title": "JVM Memory Used",
      "type": "timeseries",
      "datasource": {"type": "prometheus", "uid": "prometheus"},
      "targets": [
        {
          "expr": "jvm_memory_used_bytes{area=\"heap\"}",
          "legendFormat": "Heap Memory"
        },
        {
          "expr": "jvm_memory_used_bytes{area=\"nonheap\"}",
          "legendFormat": "Non-Heap Memory"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 1}
    },
    {
      "title": "JVM GC Collection Seconds",
      "type": "timeseries",
      "datasource": {"type": "prometheus", "uid": "prometheus"},
      "targets": [
        {
          "expr": "rate(jvm_gc_collection_seconds_sum[1m])",
          "legendFormat": "{{gc}} GC Rate"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 1}
    },
    {
      "title": "Pulsar Message Rates",
      "type": "row",
      "gridPos": {"h": 1, "w": 24, "x": 0, "y": 9}
    },
    {
      "title": "Messages In/Sec",
      "type": "timeseries",
      "datasource": {"type": "prometheus", "uid": "prometheus"},
      "targets": [
        {
          "expr": "rate(pulsar_in_bytes_total[1m])",
          "legendFormat": "In Bytes/sec"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 10}
    },
    {
      "title": "Messages Out/Sec",
      "type": "timeseries",
      "datasource": {"type": "prometheus", "uid": "prometheus"},
      "targets": [
        {
          "expr": "rate(pulsar_out_bytes_total[1m])",
          "legendFormat": "Out Bytes/sec"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 10}
    },
    {
      "title": "Pulsar Topics",
      "type": "stat",
      "datasource": {"type": "prometheus", "uid": "prometheus"},
      "targets": [
        {
          "expr": "sum(pulsar_topics_count)",
          "legendFormat": "Active Topics"
        }
      ],
      "gridPos": {"h": 8, "w": 8, "x": 0, "y": 18}
    },
    {
      "title": "Subscriptions",
      "type": "stat",
      "datasource": {"type": "prometheus", "uid": "prometheus"},
      "targets": [
        {
          "expr": "sum(pulsar_subscriptions_count)",
          "legendFormat": "Active Subscriptions"
        }
      ],
      "gridPos": {"h": 8, "w": 8, "x": 8, "y": 18}
    },
    {
      "title": "Producers",
      "type": "stat",
      "datasource": {"type": "prometheus", "uid": "prometheus"},
      "targets": [
        {
          "expr": "sum(pulsar_producers_count)",
          "legendFormat": "Active Producers"
        }
      ],
      "gridPos": {"h": 8, "w": 8, "x": 16, "y": 18}
    }
  ],
  "schemaVersion": 38,
  "style": "dark",
  "tags": ["pulsar", "smart-city"],
  "templating": {"list": []},
  "time": {"from": "now-1h", "to": "now"},
  "title": "Pulsar Metrics",
  "uid": "pulsar-metrics",
  "version": 1
}
