risingwavelabs/risingwave · warning · DashboardError

Prometheus endpoint is not set

Error message

Prometheus endpoint is not set

What it means

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.

Solutions

  1. Start the meta node with the Prometheus endpoint flags (e.g. --prometheus-host <host> --prometheus-port 9090) and restart.
  2. Deploy or point to an existing Prometheus instance scraping RisingWave metrics.
  3. Use the non-Prometheus streaming stats path, or another monitoring source, until Prometheus is configured.

Example fix

// before
./risingwave meta-node
// after
./risingwave meta-node --prometheus-host 127.0.0.1 --prometheus-port 9090
Defensive patterns

Strategy: fallback

Validate before calling

// Check meta startup flags/config before calling the endpoint
if (!metaConfig.prometheusHost || !metaConfig.prometheusPort) {
  console.warn('Prometheus endpoint not configured; /streaming_stats will fail');
}

Type guard

function hasPrometheusEndpoint(cfg) { return Boolean(cfg && cfg.prometheusHost && cfg.prometheusPort); }

Try / catch

try { const stats = await getStreamingStats(); } catch (e) {
  if (String(e).includes('Prometheus endpoint is not set')) {
    // fall back to worker-side stats or surface a 'configure Prometheus' hint
  }
}

Prevention

When it happens

Trigger: GET /api/v1/streaming_stats when the meta node was started without `--prometheus-host`/`--prometheus-port` (no Prometheus endpoint configured).

Common situations: 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.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/a5db97a82d2d091f. Report an issue: GitHub.

Appendix: source

Thrown at src/meta/src/dashboard/mod.rs:970

                }
            }

            // Set actor count for channels (using fragment actor count as approximation)
            for (key, channel_stats) in &mut channel_data {
                let parts: Vec<&str> = key.split('_').collect();
                if parts.len() == 2
                    && let Ok(fragment_id) = parts[1].parse::<u32>()
                    && let Some(fragment_stats) = all.fragment_stats.get(&fragment_id)
                {
                    channel_stats.actor_count = fragment_stats.actor_count;
                }
            }

            all.channel_stats = channel_data;

            Ok(Json(all))
        } else {
            Err(err(anyhow!("Prometheus endpoint is not set")))
        }
    }

    pub async fn get_version(Extension(_srv): Extension<Service>) -> Result<Json<String>> {
        Ok(Json(risingwave_common::current_cluster_version()))
    }
}

impl DashboardService {
    pub async fn serve(self) -> Result<()> {
        use handlers::*;
        let srv = Arc::new(self);

        let cors_layer = CorsLayer::new()
            .allow_origin(cors::Any)
            .allow_methods(vec![Method::GET]);

        let api_router = Router::new()

View on GitHub (pinned to 6469eb736d)