{
  "name": "supabase",
  "title": "Supabase",
  "version": "0.1.0",
  "release": "beta",
  "source": {
    "license": "Elastic-2.0"
  },
  "description": "Collect metrics from Supabase using the OTel Prometheus receiver. Covers infrastructure, PostgreSQL, Supavisor, PostgREST, Auth, Realtime, and Storage metrics.",
  "type": "integration",
  "download": "/epr/supabase/supabase-0.1.0.zip",
  "path": "/package/supabase/0.1.0",
  "icons": [
    {
      "src": "/img/supabase-logo.svg",
      "path": "/package/supabase/0.1.0/img/supabase-logo.svg",
      "title": "Supabase logo",
      "size": "256x256",
      "type": "image/svg+xml"
    }
  ],
  "conditions": {
    "kibana": {
      "version": "^9.4.0"
    },
    "elastic": {
      "subscription": "basic"
    }
  },
  "owner": {
    "type": "elastic",
    "github": "elastic/obs-infraobs-integrations"
  },
  "categories": [
    "observability",
    "monitoring",
    "cloud",
    "opentelemetry"
  ],
  "signature_path": "/epr/supabase/supabase-0.1.0.zip.sig",
  "requires": {
    "input": [
      {
        "package": "prometheus_input_otel",
        "version": "0.1.1"
      }
    ],
    "content": [
      {
        "package": "supabase_otel",
        "version": "0.1.0"
      }
    ]
  },
  "format_version": "3.6.2",
  "readme": "/package/supabase/0.1.0/docs/README.md",
  "license": "basic",
  "assets": [
    "/package/supabase/0.1.0/LICENSE.txt",
    "/package/supabase/0.1.0/changelog.yml",
    "/package/supabase/0.1.0/manifest.yml",
    "/package/supabase/0.1.0/docs/README.md",
    "/package/supabase/0.1.0/img/supabase-logo.svg",
    "/package/supabase/0.1.0/data_stream/metrics/manifest.yml",
    "/package/supabase/0.1.0/data_stream/metrics/fields/base-fields.yml",
    "/package/supabase/0.1.0/data_stream/metrics/agent/stream/prometheus_input_otel-input.yml.hbs"
  ],
  "policy_templates": [
    {
      "name": "supabase",
      "title": "Supabase Metrics",
      "description": "Collect metrics from Supabase's Prometheus-compatible Metrics API",
      "data_streams": [
        "metrics"
      ],
      "inputs": [
        {
          "type": "otelcol",
          "vars": [
            {
              "name": "targets",
              "type": "text",
              "title": "Supabase Metrics Endpoint",
              "description": "Supabase Metrics API endpoint in host:port format. Use your project ref: <project-ref>.supabase.co:443\n",
              "multi": true,
              "required": true,
              "show_user": true,
              "default": [
                "<project-ref>.supabase.co:443"
              ]
            },
            {
              "name": "scrape_interval",
              "type": "duration",
              "title": "Scrape Interval",
              "description": "How frequently to scrape the Supabase metrics endpoint. Supabase recommends once per minute.",
              "multi": false,
              "required": false,
              "show_user": true,
              "default": "60s"
            },
            {
              "name": "metrics_path",
              "type": "text",
              "title": "Metrics Path",
              "description": "The HTTP resource path to fetch metrics from Supabase.",
              "multi": false,
              "required": false,
              "show_user": true,
              "default": "/customer/v1/privileged/metrics"
            },
            {
              "name": "scheme",
              "type": "select",
              "title": "Scheme",
              "description": "Protocol scheme. Supabase Metrics API requires HTTPS.",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": "https"
            },
            {
              "name": "username",
              "type": "text",
              "title": "Username",
              "description": "HTTP Basic Auth username for the Supabase Metrics API.\n",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "service_role"
            },
            {
              "name": "password",
              "type": "password",
              "title": "Service Role Key",
              "description": "The service_role JWT key from the Supabase dashboard (Settings > API > Project API keys > service_role).\n",
              "multi": false,
              "required": true,
              "show_user": true
            }
          ],
          "title": "Supabase Metrics",
          "description": "Scrape Supabase metrics using the OTel Collector Prometheus receiver"
        }
      ],
      "multiple": true,
      "deployment_modes": {
        "default": {
          "enabled": true
        },
        "agentless": {
          "enabled": true,
          "is_default": true
        }
      }
    }
  ],
  "data_streams": [
    {
      "type": "metrics",
      "dataset": "supabase.metrics",
      "title": "Supabase Metrics",
      "release": "beta",
      "streams": [
        {
          "input": "otelcol",
          "vars": [
            {
              "name": "scrape_timeout",
              "type": "duration",
              "title": "Scrape Timeout",
              "description": "Timeout for scraping (must be less than scrape_interval)",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": "10s"
            },
            {
              "name": "honor_labels",
              "type": "bool",
              "title": "Honor Labels",
              "description": "Honor labels from the scraped metrics",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": false
            },
            {
              "name": "honor_timestamps",
              "type": "bool",
              "title": "Honor Timestamps",
              "description": "Honor timestamps from the scraped metrics",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": true
            },
            {
              "name": "tls_enabled",
              "type": "bool",
              "title": "Enable TLS Configuration",
              "description": "Enable TLS configuration for HTTPS endpoints",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": false
            },
            {
              "name": "tls_skip_verify",
              "type": "bool",
              "title": "Skip TLS Verification",
              "description": "Skip verification of the server certificate (use for self-signed certificates)",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": false
            },
            {
              "name": "tls_ca_file",
              "type": "text",
              "title": "CA Certificate Path",
              "description": "Path to the CA certificate file for verifying the server",
              "multi": false,
              "required": false,
              "show_user": false
            },
            {
              "name": "tls_cert_file",
              "type": "text",
              "title": "Client Certificate Path",
              "description": "Path to the client certificate file for mutual TLS authentication. Must be used together with Client Key Path.",
              "multi": false,
              "required": false,
              "show_user": false
            },
            {
              "name": "tls_key_file",
              "type": "text",
              "title": "Client Key Path",
              "description": "Path to the client private key file for mutual TLS authentication. Must be used together with Client Certificate Path.",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "Supabase Metrics",
          "description": "All metrics from the Supabase Metrics API: infrastructure (CPU, memory, disk, network), PostgreSQL, Supavisor, PostgREST, Auth, Realtime, and Storage.\n",
          "enabled": true
        }
      ],
      "package": "supabase",
      "elasticsearch": {},
      "path": "metrics"
    }
  ]
}
