I am running QuestDB via docker, and I use env variables to configure QuestDB parameters like QDB_HTTP_NET_CONNECTION_LIMIT
or QDB_HTTP_WORKER_COUNT
.
I have about 20 different parameters right now, and I would like some way of programatically accessing to them. I could just inspect the docker container, but I need access to the docker host for that. Also, if I configure any values directly on the server.conf
file, that would not work.
Is there any more standard way of querying those config params?
About a year ago, QuestDB implemented the meta SQL functionSHOW PARAMETERS
You can just run SHOW PARAMETERS
against your questdb instance and you will get all the available parameters, even some undocumented ones.
You can also filter for specific parameters as in:
(show parameters) where env_var_name ilike '%QDB_HTTP_WORKER%'
And my personal favourite: A query to tell me which parameters don't have the default value, either set from the config file or from the environment.
(show parameters) where value_source <> 'default'
Note you can issue this query using the REST API, so you could just call
curl -G \
--data-urlencode "query=(show parameters) where value_source <> 'default';" \
http://localhost:9000/exec
And get the results back as JSON.