Change feature flag of prometheus
-
Hi,
I am trying to set the Command-Line Flag "--web.enable-remote-write-receiver" to "true".Using the CLI I am getting the following error:
root@XXXXX:/app/code# ./prometheus --web.enable-remote-write-receiver ts=2023-07-11T11:07:23.963Z caller=main.go:534 level=info msg="No time or size retention was set so using the default time retention" duration=15d ts=2023-07-11T11:07:23.963Z caller=main.go:578 level=info msg="Starting Prometheus Server" mode=server version="(version=2.45.0, branch=HEAD, revision=8ef767e396bf8445f009f945b0162fd71827f445)" ts=2023-07-11T11:07:23.963Z caller=main.go:583 level=info build_context="(go=go1.20.5, platform=linux/amd64, user=root@920118f645b7, date=20230623-15:09:49, tags=netgo,builtinassets,stringlabels)" ts=2023-07-11T11:07:23.963Z caller=main.go:584 level=info host_details="(Linux 5.4.0-153-generic #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023 x86_64 534579d8-6c67-4084-8afe-f2a0b9e83487 (none))" ts=2023-07-11T11:07:23.963Z caller=main.go:585 level=info fd_limits="(soft=1048576, hard=1048576)" ts=2023-07-11T11:07:23.964Z caller=main.go:586 level=info vm_limits="(soft=unlimited, hard=unlimited)" ts=2023-07-11T11:07:23.964Z caller=query_logger.go:113 level=error component=activeQueryTracker msg="Failed to create directory for logging active queries" ts=2023-07-11T11:07:23.964Z caller=query_logger.go:91 level=error component=activeQueryTracker msg="Error opening query log file" file=/app/code/data/queries.active err="open data/queries.active: no such file or directory" panic: Unable to create mmap-ed active query log goroutine 1 [running]: github.com/prometheus/prometheus/promql.NewActiveQueryTracker({0x34bc8ac, 0x5}, 0x14, {0x3d0af20, 0xc000470280}) /app/promql/query_logger.go:121 +0x3cd main.main() /app/cmd/prometheus/main.go:640 +0x7013
How could I solve this issue?
-
If this is a startup argument to the prometheus command, then this would have to be provided at https://git.cloudron.io/cloudron/prometheus-server-app/-/blob/master/start.sh#L25 however that cannot be customized individually. Is this something all app instances would find useful?
Or maybe there is a way to enable that via ENV variables as well?