{
  "annotations": { "list": [] },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "id": 1, "title": "Redis up", "type": "stat",
      "gridPos": { "h": 5, "w": 6, "x": 0, "y": 0 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "redis_up{job=\"farmafinder-redis\"}", "legendFormat": "redis" } ]
    },
    {
      "id": 2, "title": "Connected clients", "type": "timeseries",
      "gridPos": { "h": 5, "w": 9, "x": 6, "y": 0 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "redis_connected_clients{job=\"farmafinder-redis\"}", "legendFormat": "clients" } ]
    },
    {
      "id": 3, "title": "Memory used", "type": "timeseries",
      "gridPos": { "h": 5, "w": 9, "x": 15, "y": 0 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "redis_memory_used_bytes{job=\"farmafinder-redis\"}", "legendFormat": "bytes" } ],
      "fieldConfig": { "defaults": { "unit": "bytes" } }
    },
    {
      "id": 4, "title": "Commands/sec", "type": "timeseries",
      "gridPos": { "h": 6, "w": 12, "x": 0, "y": 5 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "rate(redis_commands_processed_total{job=\"farmafinder-redis\"}[5m])", "legendFormat": "cmd/s" } ]
    },
    {
      "id": 5, "title": "Keyspace hit ratio", "type": "timeseries",
      "gridPos": { "h": 6, "w": 12, "x": 12, "y": 5 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "sum(rate(redis_keyspace_hits_total{job=\"farmafinder-redis\"}[5m])) / (sum(rate(redis_keyspace_hits_total{job=\"farmafinder-redis\"}[5m])) + sum(rate(redis_keyspace_misses_total{job=\"farmafinder-redis\"}[5m])))", "legendFormat": "hit ratio" } ],
      "fieldConfig": { "defaults": { "unit": "percentunit" } }
    },
    {
      "id": 6, "title": "Postgres up", "type": "stat",
      "gridPos": { "h": 5, "w": 6, "x": 0, "y": 11 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "pg_up{job=\"farmafinder-postgres\"}", "legendFormat": "pg" } ]
    },
    {
      "id": 7, "title": "Active connections", "type": "timeseries",
      "gridPos": { "h": 5, "w": 9, "x": 6, "y": 11 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "pg_stat_activity_count{job=\"farmafinder-postgres\"}", "legendFormat": "connections" } ]
    },
    {
      "id": 8, "title": "Tuples returned / fetched", "type": "timeseries",
      "gridPos": { "h": 5, "w": 9, "x": 15, "y": 11 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "rate(pg_stat_database_tup_returned{job=\"farmafinder-postgres\"}[5m])", "legendFormat": "returned/s" }, { "expr": "rate(pg_stat_database_tup_fetched{job=\"farmafinder-postgres\"}[5m])", "legendFormat": "fetched/s" } ]
    },
    {
      "id": 9, "title": "Deadlocks / conflicts", "type": "timeseries",
      "gridPos": { "h": 6, "w": 12, "x": 0, "y": 16 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "rate(pg_stat_database_deadlocks{job=\"farmafinder-postgres\"}[5m])", "legendFormat": "deadlocks/s" }, { "expr": "rate(pg_stat_database_conflicts{job=\"farmafinder-postgres\"}[5m])", "legendFormat": "conflicts/s" } ]
    },
    {
      "id": 10, "title": "Cache hit ratio (blocks)", "type": "timeseries",
      "gridPos": { "h": 6, "w": 12, "x": 12, "y": 16 },
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "targets": [ { "expr": "pg_stat_database_blk_hit{job=\"farmafinder-postgres\"} / (pg_stat_database_blk_hit{job=\"farmafinder-postgres\"} + pg_stat_database_blk_read{job=\"farmafinder-postgres\"})", "legendFormat": "block hit ratio" } ],
      "fieldConfig": { "defaults": { "unit": "percentunit" } }
    }
  ],
  "schemaVersion": 39,
  "style": "dark",
  "tags": ["farmafinder", "datastores"],
  "templating": { "list": [] },
  "time": { "from": "now-6h", "to": "now" },
  "timepicker": {},
  "timezone": "browser",
  "title": "FarmaFinder — Datastores",
  "uid": "farmafinder-datastores",
  "version": 1,
  "weekStart": ""
}
