From 2615441c68bd00013790abc4e40357127e26910d Mon Sep 17 00:00:00 2001 From: Victor <87538976+visill@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:32:25 +0500 Subject: [PATCH] Removed the ability for the config reader to read but not write the port for prometheus (#697) * Removed the ability for the config reader to read but not write the port for prometheus * This test dont test this --- docker/copy/config.conf | 3 --- sources/config_reader.c | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/copy/config.conf b/docker/copy/config.conf index fbbed9cb8..ae027cd6f 100644 --- a/docker/copy/config.conf +++ b/docker/copy/config.conf @@ -19,9 +19,6 @@ log_session yes log_query no log_stats yes stats_interval 60 -log_general_stats_prom yes -log_route_stats_prom no -promhttp_server_port 7777 workers "auto" resolvers 1 diff --git a/sources/config_reader.c b/sources/config_reader.c index 0ba688a0d..9869f15cf 100644 --- a/sources/config_reader.c +++ b/sources/config_reader.c @@ -2643,6 +2643,12 @@ static int od_config_reader_parse(od_config_reader_t *reader, continue; } case OD_LPROMHTTP_PORT: { +#ifndef PROMHTTP_FOUND + od_config_reader_error( + reader, &token, + "promhttp_server_port read failed PROMHTTP_FOUND not set"); + goto error; +#endif int port; if (!od_config_reader_number(reader, &port)) goto error;