{"record":{"id":"a5db97a82d2d091f","repo":"risingwavelabs/risingwave","slug":"prometheus-endpoint-is-not-set","errorCode":null,"errorMessage":"Prometheus endpoint is not set","messagePattern":"Prometheus endpoint is not set","errorType":"http","errorClass":"DashboardError","httpStatus":500,"severity":"warning","filePath":"src/meta/src/dashboard/mod.rs","lineNumber":970,"sourceCode":"                }\n            }\n\n            // Set actor count for channels (using fragment actor count as approximation)\n            for (key, channel_stats) in &mut channel_data {\n                let parts: Vec<&str> = key.split('_').collect();\n                if parts.len() == 2\n                    && let Ok(fragment_id) = parts[1].parse::<u32>()\n                    && let Some(fragment_stats) = all.fragment_stats.get(&fragment_id)\n                {\n                    channel_stats.actor_count = fragment_stats.actor_count;\n                }\n            }\n\n            all.channel_stats = channel_data;\n\n            Ok(Json(all))\n        } else {\n            Err(err(anyhow!(\"Prometheus endpoint is not set\")))\n        }\n    }\n\n    pub async fn get_version(Extension(_srv): Extension<Service>) -> Result<Json<String>> {\n        Ok(Json(risingwave_common::current_cluster_version()))\n    }\n}\n\nimpl DashboardService {\n    pub async fn serve(self) -> Result<()> {\n        use handlers::*;\n        let srv = Arc::new(self);\n\n        let cors_layer = CorsLayer::new()\n            .allow_origin(cors::Any)\n            .allow_methods(vec![Method::GET]);\n\n        let api_router = Router::new()","sourceCodeStart":952,"sourceCodeEnd":988,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/dashboard/mod.rs#L952-L988","documentation":"The Prometheus-backed streaming stats path requires a configured Prometheus endpoint on the meta node. When no endpoint was provided at meta startup, the handler returns this error instead of querying metrics, because back-pressure data cannot be derived without Prometheus.","triggerScenarios":"GET /api/v1/streaming_stats when the meta node was started without `--prometheus-host`/`--prometheus-port` (no Prometheus endpoint configured).","commonSituations":"Local/dev clusters launched via risedev without Prometheus; docker deployments where the Prometheus address env/flags were omitted; clusters migrated to a config file that dropped the Prometheus section.","solutions":["Start the meta node with the Prometheus endpoint flags (e.g. --prometheus-host <host> --prometheus-port 9090) and restart.","Deploy or point to an existing Prometheus instance scraping RisingWave metrics.","Use the non-Prometheus streaming stats path, or another monitoring source, until Prometheus is configured."],"exampleFix":"// before\n./risingwave meta-node\n// after\n./risingwave meta-node --prometheus-host 127.0.0.1 --prometheus-port 9090","handlingStrategy":"fallback","validationCode":"// Check meta startup flags/config before calling the endpoint\nif (!metaConfig.prometheusHost || !metaConfig.prometheusPort) {\n  console.warn('Prometheus endpoint not configured; /streaming_stats will fail');\n}","typeGuard":"function hasPrometheusEndpoint(cfg) { return Boolean(cfg && cfg.prometheusHost && cfg.prometheusPort); }","tryCatchPattern":"try { const stats = await getStreamingStats(); } catch (e) {\n  if (String(e).includes('Prometheus endpoint is not set')) {\n    // fall back to worker-side stats or surface a 'configure Prometheus' hint\n  }\n}","preventionTips":["Always deploy RisingWave with a Prometheus component when dashboard metrics are needed.","Verify the Prometheus flags/config before starting the meta node.","Hide Prometheus-dependent dashboard panels when the endpoint is not configured."],"tags":["prometheus","configuration","monitoring","risingwave"],"backgroundTag":"missing-required-config-field","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}