Skip to content

Commit

Permalink
Removed the ability for the config reader to read but not write the p…
Browse files Browse the repository at this point in the history
…ort for prometheus (#697)

* Removed the ability for the config reader to read but not write the port for prometheus

* This test dont test this
  • Loading branch information
visill authored Oct 2, 2024
1 parent f6f37b0 commit 2615441
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions docker/copy/config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions sources/config_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2615441

Please sign in to comment.