Make prometheus port configurable (#121)

* Make prometheus port configurable

* Update circleci config
This commit is contained in:
Pradeep Chhetri
2022-08-14 01:25:14 +08:00
committed by GitHub
parent be254cedd9
commit 52303cc808
8 changed files with 51 additions and 31 deletions

View File

@@ -99,7 +99,10 @@ async fn main() {
let config = get_config();
if let Some(true) = config.general.enable_prometheus_exporter {
let http_addr_str = format!("{}:{}", config.general.host, crate::prometheus::HTTP_PORT);
let http_addr_str = format!(
"{}:{}",
config.general.host, config.general.prometheus_exporter_port
);
let http_addr = match SocketAddr::from_str(&http_addr_str) {
Ok(addr) => addr,
Err(err) => {