{
  "title": "Infrastructure",
  "uid": "trails-infra",
  "annotations": {
    "list": [
      {
        "name": "Deploys",
        "enable": true,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "iconColor": "rgba(0, 211, 255, 1)",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [
            "deploy"
          ],
          "type": "tags"
        }
      }
    ]
  },
  "timezone": "browser",
  "refresh": "30s",
  "panels": [
    {
      "title": "Process Memory (RSS)",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "targets": [
        {
          "expr": "process_resident_memory_bytes",
          "legendFormat": "{{job}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "bytes"
        }
      }
    },
    {
      "title": "CPU Usage",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "targets": [
        {
          "expr": "rate(process_cpu_seconds_total[5m])",
          "legendFormat": "{{job}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percentunit"
        }
      }
    },
    {
      "title": "Event Loop Lag",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "targets": [
        {
          "expr": "nodejs_eventloop_lag_seconds",
          "legendFormat": "{{job}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "s"
        }
      }
    },
    {
      "title": "Open File Descriptors",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 8
      },
      "targets": [
        {
          "expr": "process_open_fds",
          "legendFormat": "{{job}}"
        }
      ]
    }
  ]
}
