Skip to content

Commit

Permalink
chore(standalone): pass prometheus_listener_addr to meta (#13236)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel authored Nov 3, 2023
1 parent 7fb6baa commit fe70f9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/cmd_all/src/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ fn parse_opt_args(opts: &StandaloneOpts) -> ParsedStandaloneOpts {
if let Some(compactor_opts) = compactor_opts.as_mut() {
compactor_opts.prometheus_listener_addr = prometheus_listener_addr.clone();
}
if let Some(meta_opts) = meta_opts.as_mut() {
meta_opts.prometheus_host = Some(prometheus_listener_addr.clone());
}
}
ParsedStandaloneOpts {
meta_opts,
Expand Down Expand Up @@ -224,7 +227,9 @@ mod test {
listen_addr: "127.0.0.1:8001",
advertise_addr: "127.0.0.1:9999",
dashboard_host: None,
prometheus_host: None,
prometheus_host: Some(
"127.0.0.1:1234",
),
etcd_endpoints: "",
etcd_auth: false,
etcd_username: "",
Expand Down
2 changes: 1 addition & 1 deletion src/meta/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub struct MetaNodeOpts {
dashboard_host: Option<String>,

#[clap(long, env = "RW_PROMETHEUS_HOST")]
prometheus_host: Option<String>,
pub prometheus_host: Option<String>,

#[clap(long, env = "RW_ETCD_ENDPOINTS", default_value_t = String::from(""))]
etcd_endpoints: String,
Expand Down

0 comments on commit fe70f9e

Please sign in to comment.