databasequestdb

Get QuestDB config variables remotely


I have a QuestDB instance and I would like to be able to see the configuration values remotely. I can ssh into the instance and check the server.conf file, or I could scp, but I am not too happy with the approach.

Are there any best practices for this, rather than exposing the server.conf file?


Solution

  • You can issue a query like

    (SHOW PARAMETERS) WHERE property_path ilike '%wal%';
    

    And you can just call that SQL statement using the REST API

    curl -G --data-urlencode "query=(SHOW PARAMETERS) WHERE property_path ilike '%wal%';"  http://localhost:9000/exec
    

    Note that when using QuestDB Cloud or QuestDB Enterprise you will need to pass the credentials via token to the API endpoint